diff --git a/.rubocop.yml b/.rubocop.yml index 7354c6b..ec38420 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -5,3 +5,9 @@ AllCops: TargetRubyVersion: 3.0 Exclude: - lib/tapioca/**/*.rb + +Style/DocumentationMethod: + Enabled: false + +Style/TrailingCommaInArguments: + Enabled: false diff --git a/Gemfile b/Gemfile index 553f723..06d75a4 100644 --- a/Gemfile +++ b/Gemfile @@ -11,3 +11,4 @@ gem 'rake', '~> 13.0' # automation tasks gem 'rubocop-espago', '~> 1.0' # ruby linter gem 'shoulda-context', '~> 2.0' # more pleasant test syntax gem 'solargraph', '~> 0.48' # language server +gem 'tapioca', '> 0.13' # RBI generator for sorbet diff --git a/Gemfile.lock b/Gemfile.lock index 5a802f2..81408db 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,9 @@ PATH remote: . specs: shale-builder (0.1.5) + booleans (>= 0.1) shale (< 2.0) + sorbet-runtime (> 0.5) GEM remote: https://rubygems.org/ @@ -10,9 +12,11 @@ GEM ast (2.4.2) backport (1.2.0) benchmark (0.2.1) + booleans (0.1.1) byebug (11.1.3) diff-lcs (1.5.0) e2mmap (0.1.0) + erubi (1.12.0) jaro_winkler (1.5.4) json (2.6.3) kramdown (2.4.0) @@ -20,6 +24,7 @@ GEM kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) minitest (5.17.0) + netrc (0.11.0) nokogiri (1.14.2-arm64-darwin) racc (~> 1.4) nokogiri (1.14.2-x86_64-linux) @@ -27,9 +32,13 @@ GEM parallel (1.22.1) parser (3.2.1.0) ast (~> 2.4.1) + prism (0.29.0) racc (1.6.2) rainbow (3.1.1) rake (13.0.6) + rbi (0.1.13) + prism (>= 0.18.0, < 1.0.0) + sorbet-runtime (>= 0.5.9204) regexp_parser (2.7.0) reverse_markdown (2.1.1) nokogiri @@ -66,12 +75,37 @@ GEM thor (~> 1.0) tilt (~> 2.0) yard (~> 0.9, >= 0.9.24) + sorbet (0.5.11372) + sorbet-static (= 0.5.11372) + sorbet-runtime (0.5.11372) + sorbet-static (0.5.11372-universal-darwin) + sorbet-static (0.5.11372-x86_64-linux) + sorbet-static-and-runtime (0.5.11372) + sorbet (= 0.5.11372) + sorbet-runtime (= 0.5.11372) + spoom (1.3.2) + erubi (>= 1.10.0) + prism (>= 0.19.0) + sorbet-static-and-runtime (>= 0.5.10187) + thor (>= 0.19.2) + tapioca (0.14.1) + bundler (>= 2.2.25) + netrc (>= 0.11.0) + parallel (>= 1.21.0) + rbi (>= 0.1.4, < 0.2) + sorbet-static-and-runtime (>= 0.5.11087) + spoom (>= 1.2.0) + thor (>= 1.2.0) + yard-sorbet thor (1.2.1) tilt (2.1.0) unicode-display_width (2.4.2) webrick (1.7.0) yard (0.9.28) webrick (~> 1.7.0) + yard-sorbet (0.8.1) + sorbet-runtime (>= 0.5) + yard (>= 0.9) PLATFORMS arm64-darwin-20 @@ -86,6 +120,7 @@ DEPENDENCIES shale-builder! shoulda-context (~> 2.0) solargraph (~> 0.48) + tapioca (> 0.13) BUNDLED WITH 2.4.7 diff --git a/bin/tapioca b/bin/tapioca new file mode 100755 index 0000000..a6ae757 --- /dev/null +++ b/bin/tapioca @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'tapioca' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("tapioca", "tapioca") diff --git a/lib/shale/attribute.rb b/lib/shale/attribute.rb new file mode 100644 index 0000000..51b0319 --- /dev/null +++ b/lib/shale/attribute.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true +# typed: true + +require 'shale' + +module Shale + class Attribute # rubocop:disable Style/Documentation + extend T::Sig + + # Contains the documentation comment for the shale attribute + # in a Ruby String. + sig { returns(T.nilable(String)) } + attr_accessor :doc + end +end diff --git a/lib/shale/builder.rb b/lib/shale/builder.rb index 13d33dd..a2d4ee6 100644 --- a/lib/shale/builder.rb +++ b/lib/shale/builder.rb @@ -1,8 +1,11 @@ # frozen_string_literal: true +# typed: true require 'shale' +require 'sorbet-runtime' require_relative 'builder/version' +require_relative 'attribute' module Shale # It's meant to be included in subclasses of `Shale::Mapper` @@ -37,11 +40,13 @@ module Shale # end # module Builder + extend T::Helpers + class << self + extend T::Sig + # Gets called after including this module in a module or class. - # - # @param mod [Module, Class] - # @return [void] + sig { params(mod: Module).void } def included(mod) mod.extend ClassMethods Builder.prepare_mod(mod) @@ -49,9 +54,7 @@ def included(mod) # Prepares the received module or class # for dynamic method definition. - # - # @param mod [Module, Class] - # @return [void] + sig { params(mod: Module).void } def prepare_mod(mod) builder_methods_module = ::Module.new mod.instance_variable_set :@builder_methods_module, builder_methods_module @@ -61,8 +64,12 @@ def prepare_mod(mod) # Class methods provided by `Shale::Builder` module ClassMethods - # @param subclass [Class] - # @return [void] + extend T::Sig + extend T::Generic + abstract! + has_attached_class! + + sig { params(subclass: Class).void } def inherited(subclass) super Builder.prepare_mod(subclass) @@ -70,27 +77,37 @@ def inherited(subclass) # Contains overridden getter methods for attributes # with complex types (so that they accept a block for building) - # - # @return [Module] + sig { returns(Module) } attr_reader :builder_methods_module - # @return [Class, nil] - attr_accessor :request_class - - # @yieldparam [self] - # @return [self] - def build + sig { params(_block: T.proc.params(arg0: T.attached_class).void).returns(T.attached_class) } + def build(&_block) body = new yield(body) body end - # @param name [String, Symbol] - # @param type [Class] - # @return [void] - def attribute(name, type, *args, collection: false, **kwargs, &block) - super + sig { abstract.returns(T.attached_class) } + def new; end + + sig { abstract.returns(T::Hash[Symbol, Shale::Attribute]) } + def attributes; end + + sig do + params( + name: T.any(String, Symbol), + type: Class, + collection: T::Boolean, + default: T.nilable(Proc), + doc: T.nilable(String), + kwargs: Object, + block: T.nilable(T.proc.void), + ).void + end + def attribute(name, type, collection: false, default: nil, doc: nil, **kwargs, &block) + super(name, type, collection: collection, default: default, **kwargs, &block) + attributes[name.to_sym]&.doc = doc # add doc to the attribute return unless type < ::Shale::Mapper if collection @@ -121,5 +138,7 @@ def #{name} # def amount end + mixes_in_class_methods(ClassMethods) + end end diff --git a/lib/shale/builder/version.rb b/lib/shale/builder/version.rb index b3a11fc..dea1349 100644 --- a/lib/shale/builder/version.rb +++ b/lib/shale/builder/version.rb @@ -2,7 +2,6 @@ module Shale module Builder - # @return [String] VERSION = '0.1.5' end end diff --git a/lib/tapioca/dsl/compilers/shale.rb b/lib/tapioca/dsl/compilers/shale.rb index ab39e51..5860ba3 100644 --- a/lib/tapioca/dsl/compilers/shale.rb +++ b/lib/tapioca/dsl/compilers/shale.rb @@ -2,6 +2,7 @@ # frozen_string_literal: true require 'shale' +require 'booleans' begin require 'shale/builder' rescue LoadError @@ -10,9 +11,12 @@ module Tapioca module Compilers class Shale < Tapioca::Dsl::Compiler + extend T::Sig ConstantType = type_member { { fixed: T.class_of(::Shale::Mapper) } } class << self + extend T::Sig + sig { override.returns(T::Enumerable[Module]) } def gather_constants # Collect all the classes that inherit from Shale::Mapper @@ -28,11 +32,16 @@ def decorate # For each attribute defined in the class constant.attributes.each_value do |attribute| + attribute = T.let(attribute, ::Shale::Attribute) non_nilable_type, nilable_type = shale_type_to_sorbet_type(attribute) type = nilable_type if attribute.collection? type = "T.nilable(T::Array[#{non_nilable_type}])" end + comments = T.let([], T::Array[RBI::Comment]) + if shale_builder_defined? && attribute.doc + comments << RBI::Comment.new(T.must(attribute.doc)) + end if has_shale_builder && attribute.type < ::Shale::Mapper sigs = T.let([], T::Array[RBI::Sig]) @@ -49,10 +58,11 @@ def decorate klass.create_method_with_sigs( attribute.name, sigs: sigs, + comments: comments, parameters: [RBI::BlockParam.new('block')], ) else - klass.create_method(attribute.name, return_type: type) + klass.create_method(attribute.name, return_type: type, comments: comments) end # setter @@ -60,6 +70,7 @@ def decorate "#{attribute.name}=", parameters: [create_param('value', type: type)], return_type: type, + comments: comments, ) end end @@ -75,6 +86,9 @@ def includes_shale_builder(klass) klass < ::Shale::Builder end + sig { returns(T::Boolean) } + def shale_builder_defined? = Boolean(defined?(::Shale::Builder)) + SHALE_TYPES_MAP = T.let( { ::Shale::Type::Value => Object, diff --git a/shale-builder.gemspec b/shale-builder.gemspec index 678bf15..6dafef3 100644 --- a/shale-builder.gemspec +++ b/shale-builder.gemspec @@ -22,7 +22,8 @@ Gem::Specification.new do |spec| # The `git ls-files -z` loads the files in the RubyGem that have been added into git. spec.files = Dir.chdir(__dir__) do `git ls-files -z`.split("\x0").reject do |f| - (File.expand_path(f) == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)}) + (File.expand_path(f) == __FILE__) || + f.match(%r{\A(?:(?:bin|test|spec|features|sorbet)/|\.(?:git|circleci)|appveyor)}) end end spec.bindir = 'exe' @@ -30,6 +31,8 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] # Uncomment to register a new dependency of your gem + spec.add_dependency 'booleans', '>= 0.1' spec.add_dependency 'shale', '< 2.0' + spec.add_dependency 'sorbet-runtime', '> 0.5' spec.metadata['rubygems_mfa_required'] = 'true' end diff --git a/sorbet/config b/sorbet/config new file mode 100644 index 0000000..983d2f1 --- /dev/null +++ b/sorbet/config @@ -0,0 +1,4 @@ +--dir +. +--ignore=tmp/ +--ignore=vendor/ diff --git a/sorbet/rbi/annotations/.gitattributes b/sorbet/rbi/annotations/.gitattributes new file mode 100644 index 0000000..d2eacd2 --- /dev/null +++ b/sorbet/rbi/annotations/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-vendored=true diff --git a/sorbet/rbi/annotations/rainbow.rbi b/sorbet/rbi/annotations/rainbow.rbi new file mode 100644 index 0000000..0d2cb4e --- /dev/null +++ b/sorbet/rbi/annotations/rainbow.rbi @@ -0,0 +1,269 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module Rainbow + # @shim: https://github.com/sickill/rainbow/blob/master/lib/rainbow.rb#L10-L12 + sig { returns(T::Boolean) } + attr_accessor :enabled + + class Color + sig { returns(Symbol) } + attr_reader :ground + + sig { params(ground: Symbol, values: T.any([Integer], [Integer, Integer, Integer])).returns(Color) } + def self.build(ground, values); end + + sig { params(hex: String).returns([Integer, Integer, Integer]) } + def self.parse_hex_color(hex); end + + class Indexed < Rainbow::Color + sig { returns(Integer) } + attr_reader :num + + sig { params(ground: Symbol, num: Integer).void } + def initialize(ground, num); end + + sig { returns(T::Array[Integer]) } + def codes; end + end + + class Named < Rainbow::Color::Indexed + NAMES = T.let(nil, T::Hash[Symbol, Integer]) + + sig { params(ground: Symbol, name: Symbol).void } + def initialize(ground, name); end + + sig { returns(T::Array[Symbol]) } + def self.color_names; end + + sig { returns(String) } + def self.valid_names; end + end + + class RGB < Rainbow::Color::Indexed + sig { returns(Integer) } + attr_reader :r, :g, :b + + sig { params(ground: Symbol, values: Integer).void } + def initialize(ground, *values); end + + sig { returns(T::Array[Integer]) } + def codes; end + + sig { params(value: Numeric).returns(Integer) } + def self.to_ansi_domain(value); end + end + + class X11Named < Rainbow::Color::RGB + include Rainbow::X11ColorNames + + sig { params(ground: Symbol, name: Symbol).void } + def initialize(ground, name); end + + sig { returns(T::Array[Symbol]) } + def self.color_names; end + + sig { returns(String) } + def self.valid_names; end + end + end + + sig { returns(Wrapper) } + def self.global; end + + sig { returns(T::Boolean) } + def self.enabled; end + + sig { params(value: T::Boolean).returns(T::Boolean) } + def self.enabled=(value); end + + sig { params(string: String).returns(String) } + def self.uncolor(string); end + + class NullPresenter < String + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def color(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def foreground(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def fg(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def background(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def bg(*values); end + + sig { returns(NullPresenter) } + def reset; end + + sig { returns(NullPresenter) } + def bright; end + + sig { returns(NullPresenter) } + def faint; end + + sig { returns(NullPresenter) } + def italic; end + + sig { returns(NullPresenter) } + def underline; end + + sig { returns(NullPresenter) } + def blink; end + + sig { returns(NullPresenter) } + def inverse; end + + sig { returns(NullPresenter) } + def hide; end + + sig { returns(NullPresenter) } + def cross_out; end + + sig { returns(NullPresenter) } + def black; end + + sig { returns(NullPresenter) } + def red; end + + sig { returns(NullPresenter) } + def green; end + + sig { returns(NullPresenter) } + def yellow; end + + sig { returns(NullPresenter) } + def blue; end + + sig { returns(NullPresenter) } + def magenta; end + + sig { returns(NullPresenter) } + def cyan; end + + sig { returns(NullPresenter) } + def white; end + + sig { returns(NullPresenter) } + def bold; end + + sig { returns(NullPresenter) } + def dark; end + + sig { returns(NullPresenter) } + def strike; end + end + + class Presenter < String + TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer]) + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def color(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def foreground(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def fg(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def background(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def bg(*values); end + + sig { returns(Presenter) } + def reset; end + + sig { returns(Presenter) } + def bright; end + + sig { returns(Presenter) } + def faint; end + + sig { returns(Presenter) } + def italic; end + + sig { returns(Presenter) } + def underline; end + + sig { returns(Presenter) } + def blink; end + + sig { returns(Presenter) } + def inverse; end + + sig { returns(Presenter) } + def hide; end + + sig { returns(Presenter) } + def cross_out; end + + sig { returns(Presenter) } + def black; end + + sig { returns(Presenter) } + def red; end + + sig { returns(Presenter) } + def green; end + + sig { returns(Presenter) } + def yellow; end + + sig { returns(Presenter) } + def blue; end + + sig { returns(Presenter) } + def magenta; end + + sig { returns(Presenter) } + def cyan; end + + sig { returns(Presenter) } + def white; end + + sig { returns(Presenter) } + def bold; end + + sig { returns(Presenter) } + def dark; end + + sig { returns(Presenter) } + def strike; end + end + + class StringUtils + sig { params(string: String, codes: T::Array[Integer]).returns(String) } + def self.wrap_with_sgr(string, codes); end + + sig { params(string: String).returns(String) } + def self.uncolor(string); end + end + + VERSION = T.let(nil, String) + + class Wrapper + sig { returns(T::Boolean) } + attr_accessor :enabled + + sig { params(enabled: T::Boolean).void } + def initialize(enabled = true); end + + sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) } + def wrap(string); end + end + + module X11ColorNames + NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]]) + end +end + +sig { params(string: String).returns(Rainbow::Presenter) } +def Rainbow(string); end 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 new file mode 100644 index 0000000..e0ae88e --- /dev/null +++ b/sorbet/rbi/gems/ast@2.4.2.rbi @@ -0,0 +1,585 @@ +# 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/backport@1.2.0.rbi b/sorbet/rbi/gems/backport@1.2.0.rbi new file mode 100644 index 0000000..1e40a3f --- /dev/null +++ b/sorbet/rbi/gems/backport@1.2.0.rbi @@ -0,0 +1,523 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `backport` gem. +# Please instead update this file by running `bin/tapioca gem backport`. + + +# An event-driven IO library. +# +# source://backport//lib/backport/version.rb#1 +module Backport + class << self + # @return [Logger] + # + # source://backport//lib/backport.rb#75 + def logger; end + + # Prepare an interval server to run in Backport. + # + # @param period [Float] Seconds between intervals + # @return [void] + # + # source://backport//lib/backport.rb#35 + def prepare_interval(period, &block); end + + # Prepare a STDIO server to run in Backport. + # + # @param adapter [Adapter] + # @return [void] + # + # source://backport//lib/backport.rb#17 + def prepare_stdio_server(adapter: T.unsafe(nil)); end + + # Prepare a TCP server to run in Backport. + # + # @param host [String] + # @param port [Integer] + # @param adapter [Adapter] + # @return [void] + # + # source://backport//lib/backport.rb#27 + def prepare_tcp_server(host: T.unsafe(nil), port: T.unsafe(nil), adapter: T.unsafe(nil)); end + + # Run the Backport machine. The provided block will be executed before the + # machine starts. Program execution is blocked until the machine stops. + # + # @example Print "tick" once per second + # Backport.run do + # Backport.prepare_interval 1 do + # puts "tick" + # end + # end + # @return [void] + # + # source://backport//lib/backport.rb#50 + def run(&block); end + + # Stop all running Backport machines. + # + # For more accurate control, consider stopping the machine + # from the self reference in Machine#run, e.g.: + # + # ``` + # Backport.run do |machine| + # # ... + # machine.stop + # end + # ``` + # + # @return [void] + # + # source://backport//lib/backport.rb#70 + def stop; end + + private + + # @return [Array] + # + # source://backport//lib/backport.rb#82 + def machines; end + end +end + +# The application interface between Backport servers and clients. +# +# source://backport//lib/backport/adapter.rb#4 +class Backport::Adapter + # @param output [IO] + # @param remote [Hash{Symbol => String, Integer}] + # @return [Adapter] a new instance of Adapter + # + # source://backport//lib/backport/adapter.rb#7 + def initialize(output, remote = T.unsafe(nil)); end + + # Close the client connection. + # + # @note The adapter sets #closed? to true and runs the #closing callback. + # The server is responsible for implementation details like closing the + # client's socket. + # @return [void] + # + # source://backport//lib/backport/adapter.rb#80 + def close; end + + # @return [Boolean] + # + # source://backport//lib/backport/adapter.rb#69 + def closed?; end + + # A callback triggered when a client connection is closing. Subclasses + # and/or modules should override this method to provide their own + # functionality. + # + # @return [void] + # + # source://backport//lib/backport/adapter.rb#41 + def closing; end + + # A callback triggered when a client connection is opening. Subclasses + # and/or modules should override this method to provide their own + # functionality. + # + # @return [void] + # + # source://backport//lib/backport/adapter.rb#34 + def opening; end + + # A callback triggered when the server receives data from the client. + # Subclasses and/or modules should override this method to provide their + # own functionality. + # + # @param data [String] + # @return [void] + # + # source://backport//lib/backport/adapter.rb#49 + def receiving(data); end + + # A hash of information about the client connection. The data can vary + # based on the transport, e.g., :hostname and :address for TCP connections + # or :filename for file streams. + # + # @return [Hash{Symbol => String, Integer}] + # + # source://backport//lib/backport/adapter.rb#25 + def remote; end + + # Send data to the client. + # + # @param data [String] + # @return [void] + # + # source://backport//lib/backport/adapter.rb#55 + def write(data); end + + # Send a line of data to the client. + # + # @param data [String] + # @return [void] + # + # source://backport//lib/backport/adapter.rb#64 + def write_line(data); end +end + +# A client connected to a connectable Backport server. +# +# source://backport//lib/backport/client.rb#6 +class Backport::Client + include ::Observable + + # @param input [IO] + # @param output [IO] + # @param adapter [Class, Module] + # @param remote [Hash] + # @return [Client] a new instance of Client + # + # source://backport//lib/backport/client.rb#16 + def initialize(input, output, adapter, remote = T.unsafe(nil)); end + + # @return [Adapter] + # + # source://backport//lib/backport/client.rb#10 + def adapter; end + + # Start running the client. This method will start the thread that reads + # client input from IO. + # + # @deprecated Prefer #start to #run for non-blocking client/server methods + # @return [void] + # + # source://backport//lib/backport/client.rb#50 + def run; end + + # Start running the client. This method will start the thread that reads + # client input from IO. + # + # @return [void] + # + # source://backport//lib/backport/client.rb#50 + def start; end + + # Close the client connection. + # + # callback. The server is responsible for implementation details like + # closing the client's socket. + # + # @note The client sets #stopped? to true and runs the adapter's #closing + # @return [void] + # + # source://backport//lib/backport/client.rb#38 + def stop; end + + # True if the client is stopped. + # + # @return [Boolean] + # + # source://backport//lib/backport/client.rb#27 + def stopped?; end + + # Handle a tick from the server. This method will check for client input + # and update the adapter accordingly, or stop the client if the adapter is + # closed. + # + # @return [void] + # + # source://backport//lib/backport/client.rb#64 + def tick; end + + private + + # @param mod_cls [Module, Class] The Adapter module or class + # @param remote [Hash] Remote client data + # @return [Adapter] + # + # source://backport//lib/backport/client.rb#86 + def make_adapter(mod_cls, remote); end + + # @return [Mutex] + # + # source://backport//lib/backport/client.rb#98 + def mutex; end + + # Read the client input. Return nil if the input buffer is empty. + # + # @return [String, nil] + # + # source://backport//lib/backport/client.rb#74 + def read; end + + # Read input from the client. + # + # @return [void] + # + # source://backport//lib/backport/client.rb#112 + def read_input; end + + # Start the thread that checks the input IO for client data. + # + # @return [void] + # + # source://backport//lib/backport/client.rb#103 + def run_input_thread; end +end + +# The Backport server controller. +# +# source://backport//lib/backport/machine.rb#4 +class Backport::Machine + # @return [Machine] a new instance of Machine + # + # source://backport//lib/backport/machine.rb#5 + def initialize; end + + # Add a server to the machine. The server will be started when the machine + # starts. If the machine is already running, the server will be started + # immediately. + # + # @param server [Server::Base] + # @return [void] + # + # source://backport//lib/backport/machine.rb#45 + def prepare(server); end + + # Run the machine. If a block is provided, it gets executed before the + # maching starts its main loop. The main loop blocks program execution + # until the machine is stopped. + # + # @return [void] + # @yieldparam [self] + # + # source://backport//lib/backport/machine.rb#16 + def run; end + + # @return [Array] + # + # source://backport//lib/backport/machine.rb#52 + def servers; end + + # Stop the machine. + # + # @return [void] + # + # source://backport//lib/backport/machine.rb#27 + def stop; end + + # True if the machine is stopped. + # + # @return [Boolean] + # + # source://backport//lib/backport/machine.rb#35 + def stopped?; end + + # @param server [Server::Base] + # @return [void] + # + # source://backport//lib/backport/machine.rb#58 + def update(server); end + + private + + # @return [Mutex] + # + # source://backport//lib/backport/machine.rb#70 + def mutex; end + + # Start the thread that updates servers via the #tick method. + # + # @return [void] + # + # source://backport//lib/backport/machine.rb#75 + def run_server_thread; end +end + +# Classes and modules for Backport servers. +# +# source://backport//lib/backport/server.rb#4 +module Backport::Server; end + +# An extendable server class that provides basic start/stop functionality +# and common callbacks. +# +# source://backport//lib/backport/server/base.rb#8 +class Backport::Server::Base + include ::Observable + + # Start the server. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#14 + def start; end + + # @return [Boolean] + # + # source://backport//lib/backport/server/base.rb#31 + def started?; end + + # A callback triggered when a Machine starts running or the server is + # added to a running machine. Subclasses should override this method to + # provide their own functionality. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#44 + def starting; end + + # Stop the server. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#23 + def stop; end + + # @return [Boolean] + # + # source://backport//lib/backport/server/base.rb#35 + def stopped?; end + + # A callback triggered when the server is stopping. Subclasses should + # override this method to provide their own functionality. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#50 + def stopping; end + + # A callback triggered from the main loop of a running Machine. + # Subclasses should override this method to provide their own + # functionality. + # + # @return [void] + # + # source://backport//lib/backport/server/base.rb#57 + def tick; end +end + +# A mixin for Backport servers that communicate with clients. +# +# Connectable servers check clients for incoming data on each tick. +# +# source://backport//lib/backport/server/connectable.rb#7 +module Backport::Server::Connectable + # @return [Array] + # + # source://backport//lib/backport/server/connectable.rb#19 + def clients; end + + # @return [void] + # + # source://backport//lib/backport/server/connectable.rb#9 + def starting; end + + # @return [void] + # + # source://backport//lib/backport/server/connectable.rb#14 + def stopping; end + + private + + # @return [Mutex] + # + # source://backport//lib/backport/server/connectable.rb#26 + def mutex; end +end + +# A Backport periodical interval server. +# +# source://backport//lib/backport/server/interval.rb#5 +class Backport::Server::Interval < ::Backport::Server::Base + # @param period [Float] The interval time in seconds. + # @param block [Proc] The proc to run on each interval. + # @return [Interval] a new instance of Interval + # @yieldparam [Interval] + # + # source://backport//lib/backport/server/interval.rb#9 + def initialize(period, &block); end + + # source://backport//lib/backport/server/interval.rb#16 + def starting; end + + # source://backport//lib/backport/server/interval.rb#21 + def tick; end + + private + + # @return [void] + # + # source://backport//lib/backport/server/interval.rb#32 + def run_ready_thread; end +end + +# A Backport STDIO server. +# +# source://backport//lib/backport/server/stdio.rb#5 +class Backport::Server::Stdio < ::Backport::Server::Base + include ::Backport::Server::Connectable + + # @param input [IO] + # @param output [IO] + # @param adapter [Module, Class] + # @return [Stdio] a new instance of Stdio + # + # source://backport//lib/backport/server/stdio.rb#11 + def initialize(input: T.unsafe(nil), output: T.unsafe(nil), adapter: T.unsafe(nil)); end + + # @param client [Client] + # @return [void] + # + # source://backport//lib/backport/server/stdio.rb#22 + def update(client); end +end + +# A Backport TCP server. It runs a thread to accept incoming connections +# and automatically stops when the socket is closed. +# +# source://backport//lib/backport/server/tcpip.rb#8 +class Backport::Server::Tcpip < ::Backport::Server::Base + include ::Backport::Server::Connectable + + # @param host [String] + # @param port [Integer] + # @param adapter [Module, Class] + # @param socket_class [Class] + # @return [Tcpip] a new instance of Tcpip + # + # source://backport//lib/backport/server/tcpip.rb#15 + def initialize(host: T.unsafe(nil), port: T.unsafe(nil), adapter: T.unsafe(nil), socket_class: T.unsafe(nil)); end + + # Accept an incoming connection using accept_nonblock. Return the + # resulting Client if a connection was accepted or nil if no connections + # are pending. + # + # @return [Client, nil] + # + # source://backport//lib/backport/server/tcpip.rb#41 + def accept; end + + # source://backport//lib/backport/server/tcpip.rb#21 + def starting; end + + # source://backport//lib/backport/server/tcpip.rb#25 + def stopping; end + + # @param client [Client] + # @return [void] + # + # source://backport//lib/backport/server/tcpip.rb#78 + def update(client); end + + private + + # @return [TCPSocket] + # + # source://backport//lib/backport/server/tcpip.rb#89 + def socket; end + + # @return [void] + # + # source://backport//lib/backport/server/tcpip.rb#92 + def start_accept_thread; end +end + +# source://backport//lib/backport/version.rb#2 +Backport::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/benchmark@0.2.1.rbi b/sorbet/rbi/gems/benchmark@0.2.1.rbi new file mode 100644 index 0000000..209bc76 --- /dev/null +++ b/sorbet/rbi/gems/benchmark@0.2.1.rbi @@ -0,0 +1,589 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `benchmark` gem. +# Please instead update this file by running `bin/tapioca gem benchmark`. + + +# The Benchmark module provides methods to measure and report the time +# used to execute Ruby code. +# +# * Measure the time to construct the string given by the expression +# "a"*1_000_000_000: +# +# require 'benchmark' +# +# puts Benchmark.measure { "a"*1_000_000_000 } +# +# On my machine (OSX 10.8.3 on i5 1.7 GHz) this generates: +# +# 0.350000 0.400000 0.750000 ( 0.835234) +# +# This report shows the user CPU time, system CPU time, the sum of +# the user and system CPU times, and the elapsed real time. The unit +# of time is seconds. +# +# * Do some experiments sequentially using the #bm method: +# +# require 'benchmark' +# +# n = 5000000 +# Benchmark.bm do |x| +# x.report { for i in 1..n; a = "1"; end } +# x.report { n.times do ; a = "1"; end } +# x.report { 1.upto(n) do ; a = "1"; end } +# end +# +# The result: +# +# user system total real +# 1.010000 0.000000 1.010000 ( 1.014479) +# 1.000000 0.000000 1.000000 ( 0.998261) +# 0.980000 0.000000 0.980000 ( 0.981335) +# +# * Continuing the previous example, put a label in each report: +# +# require 'benchmark' +# +# n = 5000000 +# Benchmark.bm(7) do |x| +# x.report("for:") { for i in 1..n; a = "1"; end } +# x.report("times:") { n.times do ; a = "1"; end } +# x.report("upto:") { 1.upto(n) do ; a = "1"; end } +# end +# +# The result: +# +# user system total real +# for: 1.010000 0.000000 1.010000 ( 1.015688) +# times: 1.000000 0.000000 1.000000 ( 1.003611) +# upto: 1.030000 0.000000 1.030000 ( 1.028098) +# +# * The times for some benchmarks depend on the order in which items +# are run. These differences are due to the cost of memory +# allocation and garbage collection. To avoid these discrepancies, +# the #bmbm method is provided. For example, to compare ways to +# sort an array of floats: +# +# require 'benchmark' +# +# array = (1..1000000).map { rand } +# +# Benchmark.bmbm do |x| +# x.report("sort!") { array.dup.sort! } +# x.report("sort") { array.dup.sort } +# end +# +# The result: +# +# Rehearsal ----------------------------------------- +# sort! 1.490000 0.010000 1.500000 ( 1.490520) +# sort 1.460000 0.000000 1.460000 ( 1.463025) +# -------------------------------- total: 2.960000sec +# +# user system total real +# sort! 1.460000 0.000000 1.460000 ( 1.460465) +# sort 1.450000 0.010000 1.460000 ( 1.448327) +# +# * Report statistics of sequential experiments with unique labels, +# using the #benchmark method: +# +# require 'benchmark' +# include Benchmark # we need the CAPTION and FORMAT constants +# +# n = 5000000 +# Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| +# tf = x.report("for:") { for i in 1..n; a = "1"; end } +# tt = x.report("times:") { n.times do ; a = "1"; end } +# tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } +# [tf+tt+tu, (tf+tt+tu)/3] +# end +# +# The result: +# +# user system total real +# for: 0.950000 0.000000 0.950000 ( 0.952039) +# times: 0.980000 0.000000 0.980000 ( 0.984938) +# upto: 0.950000 0.000000 0.950000 ( 0.946787) +# >total: 2.880000 0.000000 2.880000 ( 2.883764) +# >avg: 0.960000 0.000000 0.960000 ( 0.961255) +module Benchmark + private + + # Invokes the block with a Benchmark::Report object, which + # may be used to collect and report on the results of individual + # benchmark tests. Reserves +label_width+ leading spaces for + # labels on each line. Prints +caption+ at the top of the + # report, and uses +format+ to format each line. + # (Note: +caption+ must contain a terminating newline character, + # see the default Benchmark::Tms::CAPTION for an example.) + # + # Returns an array of Benchmark::Tms objects. + # + # If the block returns an array of + # Benchmark::Tms objects, these will be used to format + # additional lines of output. If +labels+ parameter are + # given, these are used to label these extra lines. + # + # _Note_: Other methods provide a simpler interface to this one, and are + # suitable for nearly all benchmarking requirements. See the examples in + # Benchmark, and the #bm and #bmbm methods. + # + # Example: + # + # require 'benchmark' + # include Benchmark # we need the CAPTION and FORMAT constants + # + # n = 5000000 + # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| + # tf = x.report("for:") { for i in 1..n; a = "1"; end } + # tt = x.report("times:") { n.times do ; a = "1"; end } + # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # [tf+tt+tu, (tf+tt+tu)/3] + # end + # + # Generates: + # + # user system total real + # for: 0.970000 0.000000 0.970000 ( 0.970493) + # times: 0.990000 0.000000 0.990000 ( 0.989542) + # upto: 0.970000 0.000000 0.970000 ( 0.972854) + # >total: 2.930000 0.000000 2.930000 ( 2.932889) + # >avg: 0.976667 0.000000 0.976667 ( 0.977630) + # + # source://benchmark//benchmark.rb#168 + def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end + + # A simple interface to the #benchmark method, #bm generates sequential + # reports with labels. +label_width+ and +labels+ parameters have the same + # meaning as for #benchmark. + # + # require 'benchmark' + # + # n = 5000000 + # Benchmark.bm(7) do |x| + # x.report("for:") { for i in 1..n; a = "1"; end } + # x.report("times:") { n.times do ; a = "1"; end } + # x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # end + # + # Generates: + # + # user system total real + # for: 0.960000 0.000000 0.960000 ( 0.957966) + # times: 0.960000 0.000000 0.960000 ( 0.960423) + # upto: 0.950000 0.000000 0.950000 ( 0.954864) + # + # source://benchmark//benchmark.rb#207 + def bm(label_width = T.unsafe(nil), *labels, &blk); end + + # Sometimes benchmark results are skewed because code executed + # earlier encounters different garbage collection overheads than + # that run later. #bmbm attempts to minimize this effect by running + # the tests twice, the first time as a rehearsal in order to get the + # runtime environment stable, the second time for + # real. GC.start is executed before the start of each of + # the real timings; the cost of this is not included in the + # timings. In reality, though, there's only so much that #bmbm can + # do, and the results are not guaranteed to be isolated from garbage + # collection and other effects. + # + # Because #bmbm takes two passes through the tests, it can + # calculate the required label width. + # + # require 'benchmark' + # + # array = (1..1000000).map { rand } + # + # Benchmark.bmbm do |x| + # x.report("sort!") { array.dup.sort! } + # x.report("sort") { array.dup.sort } + # end + # + # Generates: + # + # Rehearsal ----------------------------------------- + # sort! 1.440000 0.010000 1.450000 ( 1.446833) + # sort 1.440000 0.000000 1.440000 ( 1.448257) + # -------------------------------- total: 2.890000sec + # + # user system total real + # sort! 1.460000 0.000000 1.460000 ( 1.458065) + # sort 1.450000 0.000000 1.450000 ( 1.455963) + # + # #bmbm yields a Benchmark::Job object and returns an array of + # Benchmark::Tms objects. + # + # source://benchmark//benchmark.rb#249 + def bmbm(width = T.unsafe(nil)); end + + # Returns the time used to execute the given block as a + # Benchmark::Tms object. Takes +label+ option. + # + # require 'benchmark' + # + # n = 1000000 + # + # time = Benchmark.measure do + # n.times { a = "1" } + # end + # puts time + # + # Generates: + # + # 0.220000 0.000000 0.220000 ( 0.227313) + # + # source://benchmark//benchmark.rb#294 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # + # source://benchmark//benchmark.rb#309 + def realtime; end + + class << self + # Invokes the block with a Benchmark::Report object, which + # may be used to collect and report on the results of individual + # benchmark tests. Reserves +label_width+ leading spaces for + # labels on each line. Prints +caption+ at the top of the + # report, and uses +format+ to format each line. + # (Note: +caption+ must contain a terminating newline character, + # see the default Benchmark::Tms::CAPTION for an example.) + # + # Returns an array of Benchmark::Tms objects. + # + # If the block returns an array of + # Benchmark::Tms objects, these will be used to format + # additional lines of output. If +labels+ parameter are + # given, these are used to label these extra lines. + # + # _Note_: Other methods provide a simpler interface to this one, and are + # suitable for nearly all benchmarking requirements. See the examples in + # Benchmark, and the #bm and #bmbm methods. + # + # Example: + # + # require 'benchmark' + # include Benchmark # we need the CAPTION and FORMAT constants + # + # n = 5000000 + # Benchmark.benchmark(CAPTION, 7, FORMAT, ">total:", ">avg:") do |x| + # tf = x.report("for:") { for i in 1..n; a = "1"; end } + # tt = x.report("times:") { n.times do ; a = "1"; end } + # tu = x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # [tf+tt+tu, (tf+tt+tu)/3] + # end + # + # Generates: + # + # user system total real + # for: 0.970000 0.000000 0.970000 ( 0.970493) + # times: 0.990000 0.000000 0.990000 ( 0.989542) + # upto: 0.970000 0.000000 0.970000 ( 0.972854) + # >total: 2.930000 0.000000 2.930000 ( 2.932889) + # >avg: 0.976667 0.000000 0.976667 ( 0.977630) + # + # source://benchmark//benchmark.rb#168 + def benchmark(caption = T.unsafe(nil), label_width = T.unsafe(nil), format = T.unsafe(nil), *labels); end + + # A simple interface to the #benchmark method, #bm generates sequential + # reports with labels. +label_width+ and +labels+ parameters have the same + # meaning as for #benchmark. + # + # require 'benchmark' + # + # n = 5000000 + # Benchmark.bm(7) do |x| + # x.report("for:") { for i in 1..n; a = "1"; end } + # x.report("times:") { n.times do ; a = "1"; end } + # x.report("upto:") { 1.upto(n) do ; a = "1"; end } + # end + # + # Generates: + # + # user system total real + # for: 0.960000 0.000000 0.960000 ( 0.957966) + # times: 0.960000 0.000000 0.960000 ( 0.960423) + # upto: 0.950000 0.000000 0.950000 ( 0.954864) + # + # source://benchmark//benchmark.rb#207 + def bm(label_width = T.unsafe(nil), *labels, &blk); end + + # Sometimes benchmark results are skewed because code executed + # earlier encounters different garbage collection overheads than + # that run later. #bmbm attempts to minimize this effect by running + # the tests twice, the first time as a rehearsal in order to get the + # runtime environment stable, the second time for + # real. GC.start is executed before the start of each of + # the real timings; the cost of this is not included in the + # timings. In reality, though, there's only so much that #bmbm can + # do, and the results are not guaranteed to be isolated from garbage + # collection and other effects. + # + # Because #bmbm takes two passes through the tests, it can + # calculate the required label width. + # + # require 'benchmark' + # + # array = (1..1000000).map { rand } + # + # Benchmark.bmbm do |x| + # x.report("sort!") { array.dup.sort! } + # x.report("sort") { array.dup.sort } + # end + # + # Generates: + # + # Rehearsal ----------------------------------------- + # sort! 1.440000 0.010000 1.450000 ( 1.446833) + # sort 1.440000 0.000000 1.440000 ( 1.448257) + # -------------------------------- total: 2.890000sec + # + # user system total real + # sort! 1.460000 0.000000 1.460000 ( 1.458065) + # sort 1.450000 0.000000 1.450000 ( 1.455963) + # + # #bmbm yields a Benchmark::Job object and returns an array of + # Benchmark::Tms objects. + # + # source://benchmark//benchmark.rb#249 + def bmbm(width = T.unsafe(nil)); end + + # Returns the time used to execute the given block as a + # Benchmark::Tms object. Takes +label+ option. + # + # require 'benchmark' + # + # n = 1000000 + # + # time = Benchmark.measure do + # n.times { a = "1" } + # end + # puts time + # + # Generates: + # + # 0.220000 0.000000 0.220000 ( 0.227313) + # + # source://benchmark//benchmark.rb#294 + def measure(label = T.unsafe(nil)); end + + # Returns the elapsed real time used to execute the given block. + # + # source://benchmark//benchmark.rb#309 + def realtime; end + end +end + +# A Job is a sequence of labelled blocks to be processed by the +# Benchmark.bmbm method. It is of little direct interest to the user. +class Benchmark::Job + # Returns an initialized Job instance. + # Usually, one doesn't call this method directly, as new + # Job objects are created by the #bmbm method. + # +width+ is a initial value for the label offset used in formatting; + # the #bmbm method passes its +width+ argument to this constructor. + # + # @return [Job] a new instance of Job + # + # source://benchmark//benchmark.rb#329 + def initialize(width); end + + # Registers the given label and block pair in the job list. + # + # @raise [ArgumentError] + # + # source://benchmark//benchmark.rb#337 + def item(label = T.unsafe(nil), &blk); end + + # An array of 2-element arrays, consisting of label and block pairs. + # + # source://benchmark//benchmark.rb#349 + def list; end + + # Registers the given label and block pair in the job list. + # + # @raise [ArgumentError] + # + # source://benchmark//benchmark.rb#337 + def report(label = T.unsafe(nil), &blk); end + + # Length of the widest label in the #list. + # + # source://benchmark//benchmark.rb#352 + def width; end +end + +# This class is used by the Benchmark.benchmark and Benchmark.bm methods. +# It is of little direct interest to the user. +class Benchmark::Report + # Returns an initialized Report instance. + # Usually, one doesn't call this method directly, as new + # Report objects are created by the #benchmark and #bm methods. + # +width+ and +format+ are the label offset and + # format string used by Tms#format. + # + # @return [Report] a new instance of Report + # + # source://benchmark//benchmark.rb#367 + def initialize(width = T.unsafe(nil), format = T.unsafe(nil)); end + + # Prints the +label+ and measured time for the block, + # formatted by +format+. See Tms#format for the + # formatting rules. + # + # source://benchmark//benchmark.rb#376 + def item(label = T.unsafe(nil), *format, &blk); end + + # An array of Benchmark::Tms objects representing each item. + # + # source://benchmark//benchmark.rb#386 + def list; end + + # Prints the +label+ and measured time for the block, + # formatted by +format+. See Tms#format for the + # formatting rules. + # + # source://benchmark//benchmark.rb#376 + def report(label = T.unsafe(nil), *format, &blk); end +end + +# A data object, representing the times associated with a benchmark +# measurement. +class Benchmark::Tms + # Returns an initialized Tms object which has + # +utime+ as the user CPU time, +stime+ as the system CPU time, + # +cutime+ as the children's user CPU time, +cstime+ as the children's + # system CPU time, +real+ as the elapsed real time and +label+ as the label. + # + # @return [Tms] a new instance of Tms + # + # source://benchmark//benchmark.rb#430 + def initialize(utime = T.unsafe(nil), stime = T.unsafe(nil), cutime = T.unsafe(nil), cstime = T.unsafe(nil), real = T.unsafe(nil), label = T.unsafe(nil)); end + + # Returns a new Tms object obtained by memberwise multiplication + # of the individual times for this Tms object by +x+. + # + # source://benchmark//benchmark.rb#478 + def *(x); end + + # Returns a new Tms object obtained by memberwise summation + # of the individual times for this Tms object with those of the +other+ + # Tms object. + # This method and #/() are useful for taking statistics. + # + # source://benchmark//benchmark.rb#465 + def +(other); end + + # Returns a new Tms object obtained by memberwise subtraction + # of the individual times for the +other+ Tms object from those of this + # Tms object. + # + # source://benchmark//benchmark.rb#472 + def -(other); end + + # Returns a new Tms object obtained by memberwise division + # of the individual times for this Tms object by +x+. + # This method and #+() are useful for taking statistics. + # + # source://benchmark//benchmark.rb#485 + def /(x); end + + # Returns a new Tms object whose times are the sum of the times for this + # Tms object, plus the time required to execute the code block (+blk+). + # + # source://benchmark//benchmark.rb#439 + def add(&blk); end + + # An in-place version of #add. + # Changes the times of this Tms object by making it the sum of the times + # for this Tms object, plus the time required to execute + # the code block (+blk+). + # + # source://benchmark//benchmark.rb#449 + def add!(&blk); end + + # System CPU time of children + # + # source://benchmark//benchmark.rb#413 + def cstime; end + + # User CPU time of children + # + # source://benchmark//benchmark.rb#410 + def cutime; end + + # Returns the contents of this Tms object as + # a formatted string, according to a +format+ string + # like that passed to Kernel.format. In addition, #format + # accepts the following extensions: + # + # %u:: Replaced by the user CPU time, as reported by Tms#utime. + # %y:: Replaced by the system CPU time, as reported by #stime (Mnemonic: y of "s*y*stem") + # %U:: Replaced by the children's user CPU time, as reported by Tms#cutime + # %Y:: Replaced by the children's system CPU time, as reported by Tms#cstime + # %t:: Replaced by the total CPU time, as reported by Tms#total + # %r:: Replaced by the elapsed real time, as reported by Tms#real + # %n:: Replaced by the label string, as reported by Tms#label (Mnemonic: n of "*n*ame") + # + # If +format+ is not given, FORMAT is used as default value, detailing the + # user, system and real elapsed time. + # + # source://benchmark//benchmark.rb#504 + def format(format = T.unsafe(nil), *args); end + + # Label + # + # source://benchmark//benchmark.rb#422 + def label; end + + # Elapsed real time + # + # source://benchmark//benchmark.rb#416 + def real; end + + # System CPU time + # + # source://benchmark//benchmark.rb#407 + def stime; end + + # Returns a new 6-element array, consisting of the + # label, user CPU time, system CPU time, children's + # user CPU time, children's system CPU time and elapsed + # real time. + # + # source://benchmark//benchmark.rb#529 + def to_a; end + + # Returns a hash containing the same data as `to_a`. + # + # source://benchmark//benchmark.rb#536 + def to_h; end + + # Same as #format. + # + # source://benchmark//benchmark.rb#519 + def to_s; end + + # Total time, that is +utime+ + +stime+ + +cutime+ + +cstime+ + # + # source://benchmark//benchmark.rb#419 + def total; end + + # User CPU time + # + # source://benchmark//benchmark.rb#404 + def utime; end + + protected + + # Returns a new Tms object obtained by memberwise operation +op+ + # of the individual times for this Tms object with those of the other + # Tms object (+x+). + # + # +op+ can be a mathematical operation such as +, -, + # *, / + # + # source://benchmark//benchmark.rb#557 + def memberwise(op, x); end +end diff --git a/sorbet/rbi/gems/booleans@0.1.1.rbi b/sorbet/rbi/gems/booleans@0.1.1.rbi new file mode 100644 index 0000000..6f865cb --- /dev/null +++ b/sorbet/rbi/gems/booleans@0.1.1.rbi @@ -0,0 +1,24 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `booleans` gem. +# Please instead update this file by running `bin/tapioca gem booleans`. + + +# source://booleans//lib/booleans/version.rb#3 +module Booleans; end + +# @return [String] +# +# source://booleans//lib/booleans/version.rb#5 +Booleans::VERSION = T.let(T.unsafe(nil), String) + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://booleans//lib/booleans.rb#12 + def Boolean(val); end +end diff --git a/sorbet/rbi/gems/byebug@11.1.3.rbi b/sorbet/rbi/gems/byebug@11.1.3.rbi new file mode 100644 index 0000000..895f870 --- /dev/null +++ b/sorbet/rbi/gems/byebug@11.1.3.rbi @@ -0,0 +1,37 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `byebug` gem. +# Please instead update this file by running `bin/tapioca gem byebug`. + + +# Reopen main module to define the library version +# +# source://byebug//lib/byebug/attacher.rb#6 +module Byebug + class << self + # Starts byebug, and stops at the first line of user's code. + # + # source://byebug//lib/byebug/attacher.rb#10 + def attach; end + + # source://byebug//lib/byebug/attacher.rb#21 + def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end + end +end + +# Adds a `byebug` method to the Kernel module. +# +# Dropping a `byebug` call anywhere in your code, you get a debug prompt. +# +# source://byebug//lib/byebug/attacher.rb#34 +module Kernel + # source://byebug//lib/byebug/attacher.rb#35 + def byebug; end + + # source://byebug//lib/byebug/attacher.rb#35 + def debugger; end + + # source://byebug//lib/byebug/attacher.rb#41 + def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end +end diff --git a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi new file mode 100644 index 0000000..e383e85 --- /dev/null +++ b/sorbet/rbi/gems/diff-lcs@1.5.0.rbi @@ -0,0 +1,922 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `diff-lcs` gem. +# Please instead update this file by running `bin/tapioca gem diff-lcs`. + + +# source://diff-lcs//lib/diff/lcs.rb#3 +module Diff; end + +# source://diff-lcs//lib/diff/lcs.rb#51 +module Diff::LCS + # Returns the difference set between +self+ and +other+. See Diff::LCS#diff. + # + # source://diff-lcs//lib/diff/lcs.rb#75 + def diff(other, callbacks = T.unsafe(nil), &block); end + + # Returns an Array containing the longest common subsequence(s) between + # +self+ and +other+. See Diff::LCS#lcs. + # + # lcs = seq1.lcs(seq2) + # + # A note when using objects: Diff::LCS only works properly when each object + # can be used as a key in a Hash, which typically means that the objects must + # implement Object#eql? in a way that two identical values compare + # identically for key purposes. That is: + # + # O.new('a').eql?(O.new('a')) == true + # + # source://diff-lcs//lib/diff/lcs.rb#70 + def lcs(other, &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#101 + def patch(patchset); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no + # patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#109 + def patch!(patchset); end + + # Attempts to patch +self+ with the provided +patchset+, using #patch!. If + # the sequence this is used on supports #replace, the value of +self+ will be + # replaced. See Diff::LCS#patch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#123 + def patch_me(patchset); end + + # Returns the balanced ("side-by-side") difference set between +self+ and + # +other+. See Diff::LCS#sdiff. + # + # source://diff-lcs//lib/diff/lcs.rb#81 + def sdiff(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+ using the alternate, balanced algorithm. See + # Diff::LCS#traverse_balanced. + # + # source://diff-lcs//lib/diff/lcs.rb#94 + def traverse_balanced(other, callbacks = T.unsafe(nil), &block); end + + # Traverses the discovered longest common subsequences between +self+ and + # +other+. See Diff::LCS#traverse_sequences. + # + # source://diff-lcs//lib/diff/lcs.rb#87 + def traverse_sequences(other, callbacks = T.unsafe(nil), &block); end + + # Attempts to patch +self+ with the provided +patchset+. A new sequence based + # on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Attempts + # to autodiscover the direction of the patch. + # + # source://diff-lcs//lib/diff/lcs.rb#101 + def unpatch(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+. A new sequence + # based on +self+ and the +patchset+ will be created. See Diff::LCS#unpatch. + # Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#116 + def unpatch!(patchset); end + + # Attempts to unpatch +self+ with the provided +patchset+, using #unpatch!. + # If the sequence this is used on supports #replace, the value of +self+ will + # be replaced. See Diff::LCS#unpatch. Does no patch direction autodiscovery. + # + # source://diff-lcs//lib/diff/lcs.rb#134 + def unpatch_me(patchset); end + + class << self + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 + def LCS(seq1, seq2, &block); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#52 + def callbacks_for(callbacks); end + + # #diff computes the smallest set of additions and deletions necessary to + # turn the first sequence into the second, and returns a description of these + # changes. + # + # See Diff::LCS::DiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # source://diff-lcs//lib/diff/lcs.rb#168 + def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # :yields seq1[i] for each matched: + # + # source://diff-lcs//lib/diff/lcs.rb#144 + def lcs(seq1, seq2, &block); end + + # Applies a +patchset+ to the sequence +src+ according to the +direction+ + # (:patch or :unpatch), producing a new sequence. + # + # If the +direction+ is not specified, Diff::LCS::patch will attempt to + # discover the direction of the +patchset+. + # + # A +patchset+ can be considered to apply forward (:patch) if the + # following expression is true: + # + # patch(s1, diff(s1, s2)) -> s2 + # + # A +patchset+ can be considered to apply backward (:unpatch) if the + # following expression is true: + # + # patch(s2, diff(s1, s2)) -> s1 + # + # If the +patchset+ contains no changes, the +src+ value will be returned as + # either src.dup or +src+. A +patchset+ can be deemed as having no + # changes if the following predicate returns true: + # + # patchset.empty? or + # patchset.flatten(1).all? { |change| change.unchanged? } + # + # === Patchsets + # + # A +patchset+ is always an enumerable sequence of changes, hunks of changes, + # or a mix of the two. A hunk of changes is an enumerable sequence of + # changes: + # + # [ # patchset + # # change + # [ # hunk + # # change + # ] + # ] + # + # The +patch+ method accepts patchsets that are enumerable sequences + # containing either Diff::LCS::Change objects (or a subclass) or the array + # representations of those objects. Prior to application, array + # representations of Diff::LCS::Change objects will be reified. + # + # source://diff-lcs//lib/diff/lcs.rb#624 + def patch(src, patchset, direction = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the next version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#734 + def patch!(src, patchset); end + + # #sdiff computes all necessary components to show two sequences and their + # minimized differences side by side, just like the Unix utility + # sdiff does: + # + # old < - + # same same + # before | after + # - > new + # + # See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate + # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If a + # Class argument is provided for +callbacks+, #diff will attempt to + # initialise it. If the +callbacks+ object (possibly initialised) responds to + # #finish, it will be called. + # + # Each element of a returned array is a Diff::LCS::ContextChange object, + # which can be implicitly converted to an array. + # + # Diff::LCS.sdiff(a, b).each do |action, (old_pos, old_element), (new_pos, new_element)| + # case action + # when '!' + # # replace + # when '-' + # # delete + # when '+' + # # insert + # end + # end + # + # source://diff-lcs//lib/diff/lcs.rb#200 + def sdiff(seq1, seq2, callbacks = T.unsafe(nil), &block); end + + # #traverse_balanced is an alternative to #traverse_sequences. It uses a + # different algorithm to iterate through the entries in the computed longest + # common subsequence. Instead of viewing the changes as insertions or + # deletions from one of the sequences, #traverse_balanced will report + # changes between the sequences. + # + # The arguments to #traverse_balanced are the two sequences to traverse and a + # callback object, like this: + # + # traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # #sdiff is implemented with #traverse_balanced. + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#change:: Called when +a+ and +b+ are pointing to + # the same relative position, but + # A[a] and B[b] are not + # the same; a change has + # occurred. + # + # #traverse_balanced might be a bit slower than #traverse_sequences, + # noticable only while processing huge amounts of data. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # === Matches + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # === Discards + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. + # + # === Changes + # + # If both +a+ and +b+ point to elements that are not part of the longest + # common subsequence, then #traverse_sequences will try to call + # callbacks#change and advance both arrows. If + # callbacks#change is not implemented, then + # callbacks#discard_a and callbacks#discard_b will be + # called in turn. + # + # The methods for callbacks#match, callbacks#discard_a, + # callbacks#discard_b, and callbacks#change are invoked + # with an event comprising the action ("=", "+", "-", or "!", respectively), + # the indicies +i+ and +j+, and the elements A[i] and B[j]. + # Return values are discarded by #traverse_balanced. + # + # === Context + # + # Note that +i+ and +j+ may not be the same index position, even if +a+ and + # +b+ are considered to be pointing to matching or changed elements. + # + # source://diff-lcs//lib/diff/lcs.rb#475 + def traverse_balanced(seq1, seq2, callbacks = T.unsafe(nil)); end + + # #traverse_sequences is the most general facility provided by this module; + # #diff and #lcs are implemented as calls to it. + # + # The arguments to #traverse_sequences are the two sequences to traverse, and + # a callback object, like this: + # + # traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new) + # + # == Callback Methods + # + # Optional callback methods are emphasized. + # + # callbacks#match:: Called when +a+ and +b+ are pointing to + # common elements in +A+ and +B+. + # callbacks#discard_a:: Called when +a+ is pointing to an + # element not in +B+. + # callbacks#discard_b:: Called when +b+ is pointing to an + # element not in +A+. + # callbacks#finished_a:: Called when +a+ has reached the end of + # sequence +A+. + # callbacks#finished_b:: Called when +b+ has reached the end of + # sequence +B+. + # + # == Algorithm + # + # a---+ + # v + # A = a b c e h j l m n p + # B = b c d e f j k l m r s t + # ^ + # b---+ + # + # If there are two arrows (+a+ and +b+) pointing to elements of sequences +A+ + # and +B+, the arrows will initially point to the first elements of their + # respective sequences. #traverse_sequences will advance the arrows through + # the sequences one element at a time, calling a method on the user-specified + # callback object before each advance. It will advance the arrows in such a + # way that if there are elements A[i] and B[j] which are + # both equal and part of the longest common subsequence, there will be some + # moment during the execution of #traverse_sequences when arrow +a+ is + # pointing to A[i] and arrow +b+ is pointing to B[j]. When + # this happens, #traverse_sequences will call callbacks#match and + # then it will advance both arrows. + # + # Otherwise, one of the arrows is pointing to an element of its sequence that + # is not part of the longest common subsequence. #traverse_sequences will + # advance that arrow and will call callbacks#discard_a or + # callbacks#discard_b, depending on which arrow it advanced. If both + # arrows point to elements that are not part of the longest common + # subsequence, then #traverse_sequences will advance arrow +a+ and call the + # appropriate callback, then it will advance arrow +b+ and call the appropriate + # callback. + # + # The methods for callbacks#match, callbacks#discard_a, and + # callbacks#discard_b are invoked with an event comprising the + # action ("=", "+", or "-", respectively), the indicies +i+ and +j+, and the + # elements A[i] and B[j]. Return values are discarded by + # #traverse_sequences. + # + # === End of Sequences + # + # If arrow +a+ reaches the end of its sequence before arrow +b+ does, + # #traverse_sequence will try to call callbacks#finished_a with the + # last index and element of +A+ (A[-1]) and the current index and + # element of +B+ (B[j]). If callbacks#finished_a does not + # exist, then callbacks#discard_b will be called on each element of + # +B+ until the end of the sequence is reached (the call will be done with + # A[-1] and B[j] for each element). + # + # If +b+ reaches the end of +B+ before +a+ reaches the end of +A+, + # callbacks#finished_b will be called with the current index and + # element of +A+ (A[i]) and the last index and element of +B+ + # (A[-1]). Again, if callbacks#finished_b does not exist on + # the callback object, then callbacks#discard_a will be called on + # each element of +A+ until the end of the sequence is reached (A[i] + # and B[-1]). + # + # There is a chance that one additional callbacks#discard_a or + # callbacks#discard_b will be called after the end of the sequence + # is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet + # reached the end of +B+. + # + # source://diff-lcs//lib/diff/lcs.rb#285 + def traverse_sequences(seq1, seq2, callbacks = T.unsafe(nil)); end + + # Given a set of patchset, convert the current version to the prior version. + # Does no auto-discovery. + # + # source://diff-lcs//lib/diff/lcs.rb#728 + def unpatch!(src, patchset); end + + private + + # source://diff-lcs//lib/diff/lcs/internals.rb#4 + def diff_traversal(method, seq1, seq2, callbacks, &block); end + end +end + +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_balanced. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::BalancedCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#50 +Diff::LCS::BalancedCallbacks = Diff::LCS::DefaultCallbacks + +# Represents a simplistic (non-contextual) change. Represents the removal or +# addition of an element from either the old or the new sequenced +# enumerable. +# +# source://diff-lcs//lib/diff/lcs/change.rb#6 +class Diff::LCS::Change + include ::Comparable + + # @return [Change] a new instance of Change + # + # source://diff-lcs//lib/diff/lcs/change.rb#27 + def initialize(*args); end + + # source://diff-lcs//lib/diff/lcs/change.rb#65 + def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#58 + def ==(other); end + + # Returns the action this Change represents. + # + # source://diff-lcs//lib/diff/lcs/change.rb#20 + def action; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#72 + def adding?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#84 + def changed?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#76 + def deleting?; end + + # Returns the sequence element of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#25 + def element; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#88 + def finished_a?; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#92 + def finished_b?; end + + # source://diff-lcs//lib/diff/lcs/change.rb#34 + def inspect(*_args); end + + # Returns the position of the Change. + # + # source://diff-lcs//lib/diff/lcs/change.rb#23 + def position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#38 + def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#38 + def to_ary; end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#80 + def unchanged?; end + + class << self + # source://diff-lcs//lib/diff/lcs/change.rb#44 + def from_a(arr); end + + # @return [Boolean] + # + # source://diff-lcs//lib/diff/lcs/change.rb#15 + def valid_action?(action); end + end +end + +# source://diff-lcs//lib/diff/lcs/change.rb#7 +Diff::LCS::Change::IntClass = Integer + +# The only actions valid for changes are '+' (add), '-' (delete), '=' +# (no change), '!' (changed), '<' (tail changes from first sequence), or +# '>' (tail changes from second sequence). The last two ('<>') are only +# found with Diff::LCS::diff and Diff::LCS::sdiff. +# +# source://diff-lcs//lib/diff/lcs/change.rb#13 +Diff::LCS::Change::VALID_ACTIONS = T.let(T.unsafe(nil), Array) + +# Represents a contextual change. Contains the position and values of the +# elements in the old and the new sequenced enumerables as well as the action +# taken. +# +# source://diff-lcs//lib/diff/lcs/change.rb#100 +class Diff::LCS::ContextChange < ::Diff::LCS::Change + # @return [ContextChange] a new instance of ContextChange + # + # source://diff-lcs//lib/diff/lcs/change.rb#114 + def initialize(*args); end + + # source://diff-lcs//lib/diff/lcs/change.rb#166 + def <=>(other); end + + # source://diff-lcs//lib/diff/lcs/change.rb#157 + def ==(other); end + + # Returns the new element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#112 + def new_element; end + + # Returns the new position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#108 + def new_position; end + + # Returns the old element being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#110 + def old_element; end + + # Returns the old position being changed. + # + # source://diff-lcs//lib/diff/lcs/change.rb#106 + def old_position; end + + # source://diff-lcs//lib/diff/lcs/change.rb#122 + def to_a; end + + # source://diff-lcs//lib/diff/lcs/change.rb#122 + def to_ary; end + + class << self + # source://diff-lcs//lib/diff/lcs/change.rb#132 + def from_a(arr); end + + # Simplifies a context change for use in some diff callbacks. '<' actions + # are converted to '-' and '>' actions are converted to '+'. + # + # source://diff-lcs//lib/diff/lcs/change.rb#138 + def simplify(event); end + end +end + +# This will produce a compound array of contextual diff change objects. Each +# element in the #diffs array is a "hunk" array, where each element in each +# "hunk" array is a single change. Each change is a Diff::LCS::ContextChange +# that contains both the old index and new index values for the change. The +# "hunk" provides the full context for the changes. Both old and new objects +# will be presented for changed objects. +nil+ will be substituted for a +# discarded object. +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.diff(seq1, seq2, Diff::LCS::ContextDiffCallbacks) +# # This example shows a simplified array format. +# # [ [ [ '-', [ 0, 'a' ], [ 0, nil ] ] ], # 1 +# # [ [ '+', [ 3, nil ], [ 2, 'd' ] ] ], # 2 +# # [ [ '-', [ 4, 'h' ], [ 4, nil ] ], # 3 +# # [ '+', [ 5, nil ], [ 4, 'f' ] ] ], +# # [ [ '+', [ 6, nil ], [ 6, 'k' ] ] ], # 4 +# # [ [ '-', [ 8, 'n' ], [ 9, nil ] ], # 5 +# # [ '+', [ 9, nil ], [ 9, 'r' ] ], +# # [ '-', [ 9, 'p' ], [ 10, nil ] ], +# # [ '+', [ 10, nil ], [ 10, 's' ] ], +# # [ '+', [ 10, nil ], [ 11, 't' ] ] ] ] +# +# The five hunks shown are comprised of individual changes; if there is a +# related set of changes, they are still shown individually. +# +# This callback can also be used with Diff::LCS#sdiff, which will produce +# results like: +# +# diffs = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextCallbacks) +# # This example shows a simplified array format. +# # [ [ [ "-", [ 0, "a" ], [ 0, nil ] ] ], # 1 +# # [ [ "+", [ 3, nil ], [ 2, "d" ] ] ], # 2 +# # [ [ "!", [ 4, "h" ], [ 4, "f" ] ] ], # 3 +# # [ [ "+", [ 6, nil ], [ 6, "k" ] ] ], # 4 +# # [ [ "!", [ 8, "n" ], [ 9, "r" ] ], # 5 +# # [ "!", [ 9, "p" ], [ 10, "s" ] ], +# # [ "+", [ 10, nil ], [ 11, "t" ] ] ] ] +# +# The five hunks are still present, but are significantly shorter in total +# presentation, because changed items are shown as changes ("!") instead of +# potentially "mismatched" pairs of additions and deletions. +# +# The result of this operation is similar to that of +# Diff::LCS::SDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and can be used by the +# Diff::LCS#diff or Diff::LCS#sdiff methods. +# +# cbo = Diff::LCS::ContextDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::ContextDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#223 +class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks + # source://diff-lcs//lib/diff/lcs/callbacks.rb#232 + def change(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#224 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#228 + def discard_b(event); end +end + +# This callback object implements the default set of callback events, +# which only returns the event itself. Note that #finished_a and +# #finished_b are not implemented -- I haven't yet figured out where they +# would be useful. +# +# Note that this is intended to be called as is, e.g., +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::DefaultCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#14 +class Diff::LCS::DefaultCallbacks + class << self + # Called when both the old and new values have changed. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#32 + def change(event); end + + # Called when the old value is discarded in favour of the new value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#22 + def discard_a(event); end + + # Called when the new value is discarded in favour of the old value. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#27 + def discard_b(event); end + + # Called when two items match. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#17 + def match(event); end + + private + + def new(*_arg0); end + end +end + +# This will produce a compound array of simple diff change objects. Each +# element in the #diffs array is a +hunk+ or +hunk+ array, where each +# element in each +hunk+ array is a single Change object representing the +# addition or removal of a single element from one of the two tested +# sequences. The +hunk+ provides the full context for the changes. +# +# diffs = Diff::LCS.diff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ [ '-', 0, 'a' ] ], # 1 +# # [ [ '+', 2, 'd' ] ], # 2 +# # [ [ '-', 4, 'h' ], # 3 +# # [ '+', 4, 'f' ] ], +# # [ [ '+', 6, 'k' ] ], # 4 +# # [ [ '-', 8, 'n' ], # 5 +# # [ '-', 9, 'p' ], +# # [ '+', 9, 'r' ], +# # [ '+', 10, 's' ], +# # [ '+', 11, 't' ] ] ] +# +# There are five hunks here. The first hunk says that the +a+ at position 0 +# of the first sequence should be deleted ('-'). The second hunk +# says that the +d+ at position 2 of the second sequence should be inserted +# ('+'). The third hunk says that the +h+ at position 4 of the +# first sequence should be removed and replaced with the +f+ from position 4 +# of the second sequence. The other two hunks are described similarly. +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#diff +# method. +# +# cbo = Diff::LCS::DiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# cbo.finish +# +# Note that the call to #finish is absolutely necessary, or the last set of +# changes will not be visible. Alternatively, can be used as: +# +# cbo = Diff::LCS::DiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# The necessary #finish call will be made. +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.map { |f| f.to_a } } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#106 +class Diff::LCS::DiffCallbacks + # :yields self: + # + # @return [DiffCallbacks] a new instance of DiffCallbacks + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 + def initialize; end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#108 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#133 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#137 + def discard_b(event); end + + # Finalizes the diff process. If an unprocessed hunk still exists, then it + # is appended to the diff list. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#125 + def finish; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#129 + def match(_event); end + + private + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#141 + def finish_hunk; end +end + +# source://diff-lcs//lib/diff/lcs/internals.rb#29 +module Diff::LCS::Internals + class << self + # This method will analyze the provided patchset to provide a single-pass + # normalization (conversion of the array form of Diff::LCS::Change objects to + # the object form of same) and detection of whether the patchset represents + # changes to be made. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#102 + def analyze_patchset(patchset, depth = T.unsafe(nil)); end + + # Examine the patchset and the source to see in which direction the + # patch should be applied. + # + # WARNING: By default, this examines the whole patch, so this could take + # some time. This also works better with Diff::LCS::ContextChange or + # Diff::LCS::Change as its source, as an array will cause the creation + # of one of the above. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#147 + def intuit_diff_direction(src, patchset, limit = T.unsafe(nil)); end + + # Compute the longest common subsequence between the sequenced + # Enumerables +a+ and +b+. The result is an array whose contents is such + # that + # + # result = Diff::LCS::Internals.lcs(a, b) + # result.each_with_index do |e, i| + # assert_equal(a[i], b[e]) unless e.nil? + # end + # + # source://diff-lcs//lib/diff/lcs/internals.rb#41 + def lcs(a, b); end + + private + + # If +vector+ maps the matching elements of another collection onto this + # Enumerable, compute the inverse of +vector+ that maps this Enumerable + # onto the collection. (Currently unused.) + # + # source://diff-lcs//lib/diff/lcs/internals.rb#286 + def inverse_vector(a, vector); end + + # Returns a hash mapping each element of an Enumerable to the set of + # positions it occupies in the Enumerable, optionally restricted to the + # elements specified in the range of indexes specified by +interval+. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#298 + def position_hash(enum, interval); end + + # Find the place at which +value+ would normally be inserted into the + # Enumerable. If that place is already occupied by +value+, do nothing + # and return +nil+. If the place does not exist (i.e., it is off the end + # of the Enumerable), add it to the end. Otherwise, replace the element + # at that point with +value+. It is assumed that the Enumerable's values + # are numeric. + # + # This operation preserves the sort order. + # + # source://diff-lcs//lib/diff/lcs/internals.rb#252 + def replace_next_larger(enum, value, last_index = T.unsafe(nil)); end + end +end + +# This will produce a simple array of diff change objects. Each element in +# the #diffs array is a single ContextChange. In the set of #diffs provided +# by SDiffCallbacks, both old and new objects will be presented for both +# changed and unchanged objects. +nil+ will be substituted +# for a discarded object. +# +# The diffset produced by this callback, when provided to Diff::LCS#sdiff, +# will compute and display the necessary components to show two sequences +# and their minimized differences side by side, just like the Unix utility +# +sdiff+. +# +# same same +# before | after +# old < - +# - > new +# +# seq1 = %w(a b c e h j l m n p) +# seq2 = %w(b c d e f j k l m r s t) +# +# diffs = Diff::LCS.sdiff(seq1, seq2) +# # This example shows a simplified array format. +# # [ [ "-", [ 0, "a"], [ 0, nil ] ], +# # [ "=", [ 1, "b"], [ 0, "b" ] ], +# # [ "=", [ 2, "c"], [ 1, "c" ] ], +# # [ "+", [ 3, nil], [ 2, "d" ] ], +# # [ "=", [ 3, "e"], [ 3, "e" ] ], +# # [ "!", [ 4, "h"], [ 4, "f" ] ], +# # [ "=", [ 5, "j"], [ 5, "j" ] ], +# # [ "+", [ 6, nil], [ 6, "k" ] ], +# # [ "=", [ 6, "l"], [ 7, "l" ] ], +# # [ "=", [ 7, "m"], [ 8, "m" ] ], +# # [ "!", [ 8, "n"], [ 9, "r" ] ], +# # [ "!", [ 9, "p"], [ 10, "s" ] ], +# # [ "+", [ 10, nil], [ 11, "t" ] ] ] +# +# The result of this operation is similar to that of +# Diff::LCS::ContextDiffCallbacks. They may be compared as: +# +# s = Diff::LCS.sdiff(seq1, seq2).reject { |e| e.action == "=" } +# c = Diff::LCS.sdiff(seq1, seq2, Diff::LCS::ContextDiffCallbacks).flatten(1) +# +# s == c # -> true +# +# === Use +# +# This callback object must be initialised and is used by the Diff::LCS#sdiff +# method. +# +# cbo = Diff::LCS::SDiffCallbacks.new +# Diff::LCS.LCS(seq1, seq2, cbo) +# +# As with the other initialisable callback objects, +# Diff::LCS::SDiffCallbacks can be initialised with a block. As there is no +# "fininishing" to be done, this has no effect on the state of the object. +# +# cbo = Diff::LCS::SDiffCallbacks.new { |tcbo| Diff::LCS.LCS(seq1, seq2, tcbo) } +# +# === Simplified Array Format +# +# The simplified array format used in the example above can be obtained +# with: +# +# require 'pp' +# pp diffs.map { |e| e.to_a } +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#301 +class Diff::LCS::SDiffCallbacks + # :yields self: + # + # @return [SDiffCallbacks] a new instance of SDiffCallbacks + # @yield [_self] + # @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 + def initialize; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#322 + def change(event); end + + # Returns the difference set collected during the diff process. + # + # source://diff-lcs//lib/diff/lcs/callbacks.rb#303 + def diffs; end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#314 + def discard_a(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#318 + def discard_b(event); end + + # source://diff-lcs//lib/diff/lcs/callbacks.rb#310 + def match(event); end +end + +# An alias for DefaultCallbacks that is used in +# Diff::LCS#traverse_sequences. +# +# Diff::LCS.LCS(seq1, seq2, Diff::LCS::SequenceCallbacks) +# +# source://diff-lcs//lib/diff/lcs/callbacks.rb#44 +Diff::LCS::SequenceCallbacks = Diff::LCS::DefaultCallbacks + +# source://diff-lcs//lib/diff/lcs.rb#52 +Diff::LCS::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/e2mmap@0.1.0.rbi b/sorbet/rbi/gems/e2mmap@0.1.0.rbi new file mode 100644 index 0000000..658412d --- /dev/null +++ b/sorbet/rbi/gems/e2mmap@0.1.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `e2mmap` gem. +# Please instead update this file by running `bin/tapioca gem e2mmap`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem 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..d16b610 --- /dev/null +++ b/sorbet/rbi/gems/erubi@1.12.0.rbi @@ -0,0 +1,146 @@ +# 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/jaro_winkler@1.5.4.rbi b/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi new file mode 100644 index 0000000..325b2d0 --- /dev/null +++ b/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi @@ -0,0 +1,20 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `jaro_winkler` gem. +# Please instead update this file by running `bin/tapioca gem jaro_winkler`. + + +# source://jaro_winkler//lib/jaro_winkler/version.rb#3 +module JaroWinkler + class << self + def distance(*_arg0); end + def jaro_distance(*_arg0); end + end +end + +class JaroWinkler::Error < ::RuntimeError; end +class JaroWinkler::InvalidWeightError < ::JaroWinkler::Error; end + +# source://jaro_winkler//lib/jaro_winkler/version.rb#4 +JaroWinkler::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/json@2.6.3.rbi b/sorbet/rbi/gems/json@2.6.3.rbi new file mode 100644 index 0000000..d45ae4a --- /dev/null +++ b/sorbet/rbi/gems/json@2.6.3.rbi @@ -0,0 +1,1534 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `json` gem. +# Please instead update this file by running `bin/tapioca gem json`. + + +# Extends any Class to include _json_creatable?_ method. +class Class < ::Module + # Returns true if this class can be used to create an instance + # from a serialised JSON string. The class has to implement a class + # method _json_create_ that expects a hash as first parameter. The hash + # should include the required data. + # + # @return [Boolean] + # + # source://json//json/common.rb#700 + def json_creatable?; end +end + +# = JavaScript \Object Notation (\JSON) +# +# \JSON is a lightweight data-interchange format. +# +# A \JSON value is one of the following: +# - Double-quoted text: "foo". +# - Number: +1+, +1.0+, +2.0e2+. +# - Boolean: +true+, +false+. +# - Null: +null+. +# - \Array: an ordered list of values, enclosed by square brackets: +# ["foo", 1, 1.0, 2.0e2, true, false, null] +# +# - \Object: a collection of name/value pairs, enclosed by curly braces; +# each name is double-quoted text; +# the values may be any \JSON values: +# {"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null} +# +# A \JSON array or object may contain nested arrays, objects, and scalars +# to any depth: +# {"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]} +# [{"foo": 0, "bar": 1}, ["baz", 2]] +# +# == Using \Module \JSON +# +# To make module \JSON available in your code, begin with: +# require 'json' +# +# All examples here assume that this has been done. +# +# === Parsing \JSON +# +# You can parse a \String containing \JSON data using +# either of two methods: +# - JSON.parse(source, opts) +# - JSON.parse!(source, opts) +# +# where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# The difference between the two methods +# is that JSON.parse! omits some checks +# and may not be safe for some +source+ data; +# use it only for data from trusted sources. +# Use the safer method JSON.parse for less trusted sources. +# +# ==== Parsing \JSON Arrays +# +# When +source+ is a \JSON array, JSON.parse by default returns a Ruby \Array: +# json = '["foo", 1, 1.0, 2.0e2, true, false, null]' +# ruby = JSON.parse(json) +# ruby # => ["foo", 1, 1.0, 200.0, true, false, nil] +# ruby.class # => Array +# +# The \JSON array may contain nested arrays, objects, and scalars +# to any depth: +# json = '[{"foo": 0, "bar": 1}, ["baz", 2]]' +# JSON.parse(json) # => [{"foo"=>0, "bar"=>1}, ["baz", 2]] +# +# ==== Parsing \JSON \Objects +# +# When the source is a \JSON object, JSON.parse by default returns a Ruby \Hash: +# json = '{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}' +# ruby = JSON.parse(json) +# ruby # => {"a"=>"foo", "b"=>1, "c"=>1.0, "d"=>200.0, "e"=>true, "f"=>false, "g"=>nil} +# ruby.class # => Hash +# +# The \JSON object may contain nested arrays, objects, and scalars +# to any depth: +# json = '{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}' +# JSON.parse(json) # => {"foo"=>{"bar"=>1, "baz"=>2}, "bat"=>[0, 1, 2]} +# +# ==== Parsing \JSON Scalars +# +# When the source is a \JSON scalar (not an array or object), +# JSON.parse returns a Ruby scalar. +# +# \String: +# ruby = JSON.parse('"foo"') +# ruby # => 'foo' +# ruby.class # => String +# \Integer: +# ruby = JSON.parse('1') +# ruby # => 1 +# ruby.class # => Integer +# \Float: +# ruby = JSON.parse('1.0') +# ruby # => 1.0 +# ruby.class # => Float +# ruby = JSON.parse('2.0e2') +# ruby # => 200 +# ruby.class # => Float +# Boolean: +# ruby = JSON.parse('true') +# ruby # => true +# ruby.class # => TrueClass +# ruby = JSON.parse('false') +# ruby # => false +# ruby.class # => FalseClass +# Null: +# ruby = JSON.parse('null') +# ruby # => nil +# ruby.class # => NilClass +# +# ==== Parsing Options +# +# ====== Input Options +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth allowed; +# defaults to +100+; specify +false+ to disable depth checking. +# +# With the default, +false+: +# source = '[0, [1, [2, [3]]]]' +# ruby = JSON.parse(source) +# ruby # => [0, [1, [2, [3]]]] +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.parse(source, {max_nesting: 1}) +# Bad value: +# # Raises TypeError (wrong argument type Symbol (expected Fixnum)): +# JSON.parse(source, {max_nesting: :foo}) +# +# --- +# +# Option +allow_nan+ (boolean) specifies whether to allow +# NaN, Infinity, and MinusInfinity in +source+; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::ParserError (225: unexpected token at '[NaN]'): +# JSON.parse('[NaN]') +# # Raises JSON::ParserError (232: unexpected token at '[Infinity]'): +# JSON.parse('[Infinity]') +# # Raises JSON::ParserError (248: unexpected token at '[-Infinity]'): +# JSON.parse('[-Infinity]') +# Allow: +# source = '[NaN, Infinity, -Infinity]' +# ruby = JSON.parse(source, {allow_nan: true}) +# ruby # => [NaN, Infinity, -Infinity] +# +# ====== Output Options +# +# Option +symbolize_names+ (boolean) specifies whether returned \Hash keys +# should be Symbols; +# defaults to +false+ (use Strings). +# +# With the default, +false+: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} +# Use Symbols: +# ruby = JSON.parse(source, {symbolize_names: true}) +# ruby # => {:a=>"foo", :b=>1.0, :c=>true, :d=>false, :e=>nil} +# +# --- +# +# Option +object_class+ (\Class) specifies the Ruby class to be used +# for each \JSON object; +# defaults to \Hash. +# +# With the default, \Hash: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby.class # => Hash +# Use class \OpenStruct: +# ruby = JSON.parse(source, {object_class: OpenStruct}) +# ruby # => # +# +# --- +# +# Option +array_class+ (\Class) specifies the Ruby class to be used +# for each \JSON array; +# defaults to \Array. +# +# With the default, \Array: +# source = '["foo", 1.0, true, false, null]' +# ruby = JSON.parse(source) +# ruby.class # => Array +# Use class \Set: +# ruby = JSON.parse(source, {array_class: Set}) +# ruby # => # +# +# --- +# +# Option +create_additions+ (boolean) specifies whether to use \JSON additions in parsing. +# See {\JSON Additions}[#module-JSON-label-JSON+Additions]. +# +# === Generating \JSON +# +# To generate a Ruby \String containing \JSON data, +# use method JSON.generate(source, opts), where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# ==== Generating \JSON from Arrays +# +# When the source is a Ruby \Array, JSON.generate returns +# a \String containing a \JSON array: +# ruby = [0, 's', :foo] +# json = JSON.generate(ruby) +# json # => '[0,"s","foo"]' +# +# The Ruby \Array array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = [0, [1, 2], {foo: 3, bar: 4}] +# json = JSON.generate(ruby) +# json # => '[0,[1,2],{"foo":3,"bar":4}]' +# +# ==== Generating \JSON from Hashes +# +# When the source is a Ruby \Hash, JSON.generate returns +# a \String containing a \JSON object: +# ruby = {foo: 0, bar: 's', baz: :bat} +# json = JSON.generate(ruby) +# json # => '{"foo":0,"bar":"s","baz":"bat"}' +# +# The Ruby \Hash array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} +# json = JSON.generate(ruby) +# json # => '{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}' +# +# ==== Generating \JSON from Other Objects +# +# When the source is neither an \Array nor a \Hash, +# the generated \JSON data depends on the class of the source. +# +# When the source is a Ruby \Integer or \Float, JSON.generate returns +# a \String containing a \JSON number: +# JSON.generate(42) # => '42' +# JSON.generate(0.42) # => '0.42' +# +# When the source is a Ruby \String, JSON.generate returns +# a \String containing a \JSON string (with double-quotes): +# JSON.generate('A string') # => '"A string"' +# +# When the source is +true+, +false+ or +nil+, JSON.generate returns +# a \String containing the corresponding \JSON token: +# JSON.generate(true) # => 'true' +# JSON.generate(false) # => 'false' +# JSON.generate(nil) # => 'null' +# +# When the source is none of the above, JSON.generate returns +# a \String containing a \JSON string representation of the source: +# JSON.generate(:foo) # => '"foo"' +# JSON.generate(Complex(0, 0)) # => '"0+0i"' +# JSON.generate(Dir.new('.')) # => '"#"' +# +# ==== Generating Options +# +# ====== Input Options +# +# Option +allow_nan+ (boolean) specifies whether +# +NaN+, +Infinity+, and -Infinity may be generated; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::GeneratorError (920: NaN not allowed in JSON): +# JSON.generate(JSON::NaN) +# # Raises JSON::GeneratorError (917: Infinity not allowed in JSON): +# JSON.generate(JSON::Infinity) +# # Raises JSON::GeneratorError (917: -Infinity not allowed in JSON): +# JSON.generate(JSON::MinusInfinity) +# +# Allow: +# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] +# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' +# +# --- +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth +# in +obj+; defaults to +100+. +# +# With the default, +100+: +# obj = [[[[[[0]]]]]] +# JSON.generate(obj) # => '[[[[[[0]]]]]]' +# +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.generate(obj, max_nesting: 2) +# +# ====== Output Options +# +# The default formatting options generate the most compact +# \JSON data, all on one line and with no whitespace. +# +# You can use these formatting options to generate +# \JSON data in a more open format, using whitespace. +# See also JSON.pretty_generate. +# +# - Option +array_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON array; defaults to the empty \String, ''. +# - Option +object_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON object; defaults to the empty \String, ''. +# - Option +indent+ (\String) specifies the string (usually spaces) to be +# used for indentation; defaults to the empty \String, ''; +# defaults to the empty \String, ''; +# has no effect unless options +array_nl+ or +object_nl+ specify newlines. +# - Option +space+ (\String) specifies a string (usually a space) to be +# inserted after the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# - Option +space_before+ (\String) specifies a string (usually a space) to be +# inserted before the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# +# In this example, +obj+ is used first to generate the shortest +# \JSON data (no whitespace), then again with all formatting options +# specified: +# +# obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} +# json = JSON.generate(obj) +# puts 'Compact:', json +# opts = { +# array_nl: "\n", +# object_nl: "\n", +# indent: ' ', +# space_before: ' ', +# space: ' ' +# } +# puts 'Open:', JSON.generate(obj, opts) +# +# Output: +# Compact: +# {"foo":["bar","baz"],"bat":{"bam":0,"bad":1}} +# Open: +# { +# "foo" : [ +# "bar", +# "baz" +# ], +# "bat" : { +# "bam" : 0, +# "bad" : 1 +# } +# } +# +# == \JSON Additions +# +# When you "round trip" a non-\String object from Ruby to \JSON and back, +# you have a new \String, instead of the object you began with: +# ruby0 = Range.new(0, 2) +# json = JSON.generate(ruby0) +# json # => '0..2"' +# ruby1 = JSON.parse(json) +# ruby1 # => '0..2' +# ruby1.class # => String +# +# You can use \JSON _additions_ to preserve the original object. +# The addition is an extension of a ruby class, so that: +# - \JSON.generate stores more information in the \JSON string. +# - \JSON.parse, called with option +create_additions+, +# uses that information to create a proper Ruby object. +# +# This example shows a \Range being generated into \JSON +# and parsed back into Ruby, both without and with +# the addition for \Range: +# ruby = Range.new(0, 2) +# # This passage does not use the addition for Range. +# json0 = JSON.generate(ruby) +# ruby0 = JSON.parse(json0) +# # This passage uses the addition for Range. +# require 'json/add/range' +# json1 = JSON.generate(ruby) +# ruby1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <require 'json/add/bigdecimal' +# - Complex: require 'json/add/complex' +# - Date: require 'json/add/date' +# - DateTime: require 'json/add/date_time' +# - Exception: require 'json/add/exception' +# - OpenStruct: require 'json/add/ostruct' +# - Range: require 'json/add/range' +# - Rational: require 'json/add/rational' +# - Regexp: require 'json/add/regexp' +# - Set: require 'json/add/set' +# - Struct: require 'json/add/struct' +# - Symbol: require 'json/add/symbol' +# - Time: require 'json/add/time' +# +# To reduce punctuation clutter, the examples below +# show the generated \JSON via +puts+, rather than the usual +inspect+, +# +# \BigDecimal: +# require 'json/add/bigdecimal' +# ruby0 = BigDecimal(0) # 0.0 +# json = JSON.generate(ruby0) # {"json_class":"BigDecimal","b":"27:0.0"} +# ruby1 = JSON.parse(json, create_additions: true) # 0.0 +# ruby1.class # => BigDecimal +# +# \Complex: +# require 'json/add/complex' +# ruby0 = Complex(1+0i) # 1+0i +# json = JSON.generate(ruby0) # {"json_class":"Complex","r":1,"i":0} +# ruby1 = JSON.parse(json, create_additions: true) # 1+0i +# ruby1.class # Complex +# +# \Date: +# require 'json/add/date' +# ruby0 = Date.today # 2020-05-02 +# json = JSON.generate(ruby0) # {"json_class":"Date","y":2020,"m":5,"d":2,"sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 +# ruby1.class # Date +# +# \DateTime: +# require 'json/add/date_time' +# ruby0 = DateTime.now # 2020-05-02T10:38:13-05:00 +# json = JSON.generate(ruby0) # {"json_class":"DateTime","y":2020,"m":5,"d":2,"H":10,"M":38,"S":13,"of":"-5/24","sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02T10:38:13-05:00 +# ruby1.class # DateTime +# +# \Exception (and its subclasses including \RuntimeError): +# require 'json/add/exception' +# ruby0 = Exception.new('A message') # A message +# json = JSON.generate(ruby0) # {"json_class":"Exception","m":"A message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # A message +# ruby1.class # Exception +# ruby0 = RuntimeError.new('Another message') # Another message +# json = JSON.generate(ruby0) # {"json_class":"RuntimeError","m":"Another message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # Another message +# ruby1.class # RuntimeError +# +# \OpenStruct: +# require 'json/add/ostruct' +# ruby0 = OpenStruct.new(name: 'Matz', language: 'Ruby') # # +# json = JSON.generate(ruby0) # {"json_class":"OpenStruct","t":{"name":"Matz","language":"Ruby"}} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # OpenStruct +# +# \Range: +# require 'json/add/range' +# ruby0 = Range.new(0, 2) # 0..2 +# json = JSON.generate(ruby0) # {"json_class":"Range","a":[0,2,false]} +# ruby1 = JSON.parse(json, create_additions: true) # 0..2 +# ruby1.class # Range +# +# \Rational: +# require 'json/add/rational' +# ruby0 = Rational(1, 3) # 1/3 +# json = JSON.generate(ruby0) # {"json_class":"Rational","n":1,"d":3} +# ruby1 = JSON.parse(json, create_additions: true) # 1/3 +# ruby1.class # Rational +# +# \Regexp: +# require 'json/add/regexp' +# ruby0 = Regexp.new('foo') # (?-mix:foo) +# json = JSON.generate(ruby0) # {"json_class":"Regexp","o":0,"s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # (?-mix:foo) +# ruby1.class # Regexp +# +# \Set: +# require 'json/add/set' +# ruby0 = Set.new([0, 1, 2]) # # +# json = JSON.generate(ruby0) # {"json_class":"Set","a":[0,1,2]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Set +# +# \Struct: +# require 'json/add/struct' +# Customer = Struct.new(:name, :address) # Customer +# ruby0 = Customer.new("Dave", "123 Main") # # +# json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Customer +# +# \Symbol: +# require 'json/add/symbol' +# ruby0 = :foo # foo +# json = JSON.generate(ruby0) # {"json_class":"Symbol","s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # foo +# ruby1.class # Symbol +# +# \Time: +# require 'json/add/time' +# ruby0 = Time.now # 2020-05-02 11:28:26 -0500 +# json = JSON.generate(ruby0) # {"json_class":"Time","s":1588436906,"n":840560000} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 11:28:26 -0500 +# ruby1.class # Time +# +# +# === Custom \JSON Additions +# +# In addition to the \JSON additions provided, +# you can craft \JSON additions of your own, +# either for Ruby built-in classes or for user-defined classes. +# +# Here's a user-defined class +Foo+: +# class Foo +# attr_accessor :bar, :baz +# def initialize(bar, baz) +# self.bar = bar +# self.baz = baz +# end +# end +# +# Here's the \JSON addition for it: +# # Extend class Foo with JSON addition. +# class Foo +# # Serialize Foo object with its class name and arguments +# def to_json(*args) +# { +# JSON.create_id => self.class.name, +# 'a' => [ bar, baz ] +# }.to_json(*args) +# end +# # Deserialize JSON string by constructing new Foo object with arguments. +# def self.json_create(object) +# new(*object['a']) +# end +# end +# +# Demonstration: +# require 'json' +# # This Foo object has no custom addition. +# foo0 = Foo.new(0, 1) +# json0 = JSON.generate(foo0) +# obj0 = JSON.parse(json0) +# # Lood the custom addition. +# require_relative 'foo_addition' +# # This foo has the custom addition. +# foo1 = Foo.new(0, 1) +# json1 = JSON.generate(foo1) +# obj1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <" (String) +# With custom addition: {"json_class":"Foo","a":[0,1]} (String) +# Parsed JSON: +# Without custom addition: "#" (String) +# With custom addition: # (Foo) +module JSON + private + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//json/common.rb#631 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//json/common.rb#335 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//json/common.rb#335 + def fast_unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also JSON.fast_generate, JSON.pretty_generate. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//json/common.rb#296 + def generate(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//json/common.rb#557 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # source://json//json/common.rb#245 + def load_file(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//json/common.rb#256 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//json/common.rb#215 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//json/common.rb#230 + def parse!(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//json/common.rb#390 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//json/common.rb#390 + def pretty_unparse(obj, opts = T.unsafe(nil)); end + + # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ + # + # source://json//json/common.rb#575 + def recurse_proc(result, &proc); end + + # source://json//json/common.rb#557 + def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + # + # source://json//json/common.rb#296 + def unparse(obj, opts = T.unsafe(nil)); end + + class << self + # :call-seq: + # JSON[object] -> new_array or new_string + # + # If +object+ is a \String, + # calls JSON.parse with +object+ and +opts+ (see method #parse): + # json = '[0, 1, null]' + # JSON[json]# => [0, 1, nil] + # + # Otherwise, calls JSON.generate with +object+ and +opts+ (see method #generate): + # ruby = [0, 1, nil] + # JSON[ruby] # => '[0,1,null]' + # + # source://json//json/common.rb#18 + def [](object, opts = T.unsafe(nil)); end + + # source://json//json/common.rb#81 + def create_fast_state; end + + # Returns the current create identifier. + # See also JSON.create_id=. + # + # source://json//json/common.rb#126 + def create_id; end + + # Sets create identifier, which is used to decide if the _json_create_ + # hook of a class should be called; initial value is +json_class+: + # JSON.create_id # => 'json_class' + # + # source://json//json/common.rb#120 + def create_id=(new_value); end + + # source://json//json/common.rb#91 + def create_pretty_state; end + + # Return the constant located at _path_. The format of _path_ has to be + # either ::A::B::C or A::B::C. In any case, A has to be located at the top + # level (absolute namespace path?). If there doesn't exist a constant at + # the given path, an ArgumentError is raised. + # + # source://json//json/common.rb#42 + def deep_const_get(path); end + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//json/common.rb#631 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + + # Sets or returns the default options for the JSON.dump method. + # Initially: + # opts = JSON.dump_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false} + # + # source://json//json/common.rb#596 + def dump_default_options; end + + # Sets or returns the default options for the JSON.dump method. + # Initially: + # opts = JSON.dump_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false} + # + # source://json//json/common.rb#596 + def dump_default_options=(_arg0); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//json/common.rb#335 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//json/common.rb#335 + def fast_unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also JSON.fast_generate, JSON.pretty_generate. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//json/common.rb#296 + def generate(obj, opts = T.unsafe(nil)); end + + # Returns the JSON generator module that is used by JSON. This is + # either JSON::Ext::Generator or JSON::Pure::Generator: + # JSON.generator # => JSON::Ext::Generator + # + # source://json//json/common.rb#103 + def generator; end + + # Set the module _generator_ to be used by JSON. + # + # source://json//json/common.rb#58 + def generator=(generator); end + + # Encodes string using String.encode. + # + # source://json//json/common.rb#653 + def iconv(to, from, string); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//json/common.rb#557 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or returns default options for the JSON.load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//json/common.rb#420 + def load_default_options; end + + # Sets or returns default options for the JSON.load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//json/common.rb#420 + def load_default_options=(_arg0); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # source://json//json/common.rb#245 + def load_file(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//json/common.rb#256 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<-EOT + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # EOT + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//json/common.rb#215 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//json/common.rb#230 + def parse!(source, opts = T.unsafe(nil)); end + + # Returns the JSON parser class that is used by JSON. This is either + # JSON::Ext::Parser or JSON::Pure::Parser: + # JSON.parser # => JSON::Ext::Parser + # + # source://json//json/common.rb#29 + def parser; end + + # Set the JSON parser class _parser_ to be used by JSON. + # + # source://json//json/common.rb#32 + def parser=(parser); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//json/common.rb#390 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//json/common.rb#390 + def pretty_unparse(obj, opts = T.unsafe(nil)); end + + # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ + # + # source://json//json/common.rb#575 + def recurse_proc(result, &proc); end + + # source://json//json/common.rb#557 + def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or Returns the JSON generator state class that is used by JSON. This is + # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: + # JSON.state # => JSON::Ext::Generator::State + # + # source://json//json/common.rb#108 + def state; end + + # Sets or Returns the JSON generator state class that is used by JSON. This is + # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: + # JSON.state # => JSON::Ext::Generator::State + # + # source://json//json/common.rb#108 + def state=(_arg0); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + # + # source://json//json/common.rb#296 + def unparse(obj, opts = T.unsafe(nil)); end + end +end + +# source://json//json/common.rb#114 +JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) + +# source://json//json/common.rb#111 +JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) + +class JSON::GenericObject < ::OpenStruct + # source://json//json/generic_object.rb#63 + def as_json(*_arg0); end + + # source://json//json/generic_object.rb#47 + def to_hash; end + + # source://json//json/generic_object.rb#67 + def to_json(*a); end + + # source://json//json/generic_object.rb#59 + def |(other); end + + class << self + # source://json//json/generic_object.rb#41 + def dump(obj, *args); end + + # source://json//json/generic_object.rb#21 + def from_hash(object); end + + # Sets the attribute json_creatable + # + # @param value the value to set the attribute json_creatable to. + # + # source://json//json/generic_object.rb#13 + def json_creatable=(_arg0); end + + # @return [Boolean] + # + # source://json//json/generic_object.rb#9 + def json_creatable?; end + + # source://json//json/generic_object.rb#15 + def json_create(data); end + + # source://json//json/generic_object.rb#36 + def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end + end +end + +# The base exception for JSON errors. +class JSON::JSONError < ::StandardError + class << self + # source://json//json/common.rb#138 + def wrap(exception); end + end +end + +# source://json//json/common.rb#35 +JSON::Parser = JSON::Ext::Parser + +# source://json//json/common.rb#73 +JSON::State = JSON::Ext::Generator::State + +# For backwards compatibility +# +# source://json//json/common.rb#159 +JSON::UnparserError = JSON::GeneratorError + +module Kernel + private + + # If _object_ is string-like, parse the string and return the parsed result as + # a Ruby data structure. Otherwise, generate a JSON text from the Ruby data + # structure object and return it. + # + # The _opts_ argument is passed through to generate/parse respectively. See + # generate and parse for their documentation. + # + # source://json//json/common.rb#685 + def JSON(object, *args); end + + # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in + # one line. + # + # source://json//json/common.rb#663 + def j(*objs); end + + # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with + # indentation and over many lines. + # + # source://json//json/common.rb#672 + def jj(*objs); end +end diff --git a/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi b/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi new file mode 100644 index 0000000..3c9d066 --- /dev/null +++ b/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi @@ -0,0 +1,128 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `kramdown-parser-gfm` gem. +# Please instead update this file by running `bin/tapioca gem kramdown-parser-gfm`. + + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm/options.rb#10 +module Kramdown + class << self + # source://kramdown/2.4.0/lib/kramdown/document.rb#49 + def data_dir; end + end +end + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm/options.rb#11 +module Kramdown::Options + class << self + # source://kramdown/2.4.0/lib/kramdown/options.rb#72 + def defaults; end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#51 + def define(name, type, default, desc, &block); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#67 + def defined?(name); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#62 + def definitions; end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#82 + def merge(hash); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#96 + def parse(name, data); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#141 + def simple_array_validator(val, name, size = T.unsafe(nil)); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#158 + def simple_hash_validator(val, name); end + + # source://kramdown/2.4.0/lib/kramdown/options.rb#122 + def str_to_sym(data); end + end +end + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#16 +module Kramdown::Parser; end + +# This class provides a parser implementation for the GFM dialect of Markdown. +# +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#19 +class Kramdown::Parser::GFM < ::Kramdown::Parser::Kramdown + # @return [GFM] a new instance of GFM + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#25 + def initialize(source, options); end + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#108 + def generate_gfm_header_id(text); end + + # Returns the value of attribute paragraph_end. + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#23 + def paragraph_end; end + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#55 + def parse; end + + # Copied from kramdown/parser/kramdown/header.rb, removed the first line + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#125 + def parse_atx_header_gfm_quirk; end + + # To handle task-lists we override the parse method for lists, converting matching text into + # checkbox input elements where necessary (as well as applying classes to the ul/ol and li + # elements). + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#163 + def parse_list; end + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#142 + def parse_strikethrough_gfm; end + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#60 + def update_elements(element); end + + # Update the raw text for automatic ID generation. + # + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#77 + def update_raw_text(item); end + + private + + # source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#200 + def update_text_type(element, child); end +end + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#120 +Kramdown::Parser::GFM::ATX_HEADER_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#190 +Kramdown::Parser::GFM::ESCAPED_CHARS_GFM = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#135 +Kramdown::Parser::GFM::FENCED_CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#134 +Kramdown::Parser::GFM::FENCED_CODEBLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#158 +Kramdown::Parser::GFM::LIST_TYPES = T.let(T.unsafe(nil), Array) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#106 +Kramdown::Parser::GFM::NON_WORD_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#193 +Kramdown::Parser::GFM::PARAGRAPH_END_GFM = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#138 +Kramdown::Parser::GFM::STRIKETHROUGH_DELIM = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#139 +Kramdown::Parser::GFM::STRIKETHROUGH_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown-parser-gfm//lib/kramdown/parser/gfm.rb#21 +Kramdown::Parser::GFM::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/kramdown@2.4.0.rbi b/sorbet/rbi/gems/kramdown@2.4.0.rbi new file mode 100644 index 0000000..ee2bcd8 --- /dev/null +++ b/sorbet/rbi/gems/kramdown@2.4.0.rbi @@ -0,0 +1,3272 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `kramdown` gem. +# Please instead update this file by running `bin/tapioca gem kramdown`. + + +# source://kramdown//lib/kramdown/version.rb#10 +module Kramdown + class << self + # Return the data directory for kramdown. + # + # source://kramdown//lib/kramdown/document.rb#49 + def data_dir; end + end +end + +# This module contains all available converters, i.e. classes that take a root Element and convert +# it to a specific output format. The result is normally a string. For example, the +# Converter::Html module converts an element tree into valid HTML. +# +# Converters use the Base class for common functionality (like applying a template to the output) +# \- see its API documentation for how to create a custom converter class. +# +# source://kramdown//lib/kramdown/converter.rb#20 +module Kramdown::Converter + extend ::Kramdown::Utils::Configurable + + class << self + # source://kramdown//lib/kramdown/utils/configurable.rb#37 + def add_math_engine(data, *args, &block); end + + # source://kramdown//lib/kramdown/utils/configurable.rb#37 + def add_syntax_highlighter(data, *args, &block); end + + # source://kramdown//lib/kramdown/utils/configurable.rb#30 + def configurables; end + + # source://kramdown//lib/kramdown/utils/configurable.rb#34 + def math_engine(data); end + + # source://kramdown//lib/kramdown/utils/configurable.rb#34 + def syntax_highlighter(data); end + end +end + +# == \Base class for converters +# +# This class serves as base class for all converters. It provides methods that can/should be +# used by all converters (like #generate_id) as well as common functionality that is +# automatically applied to the result (for example, embedding the output into a template). +# +# A converter object is used as a throw-away object, i.e. it is only used for storing the needed +# state information during conversion. Therefore one can't instantiate a converter object +# directly but only use the Base::convert method. +# +# == Implementing a converter +# +# Implementing a new converter is rather easy: just derive a new class from this class and put +# it in the Kramdown::Converter module (the latter is only needed if auto-detection should work +# properly). Then you need to implement the #convert method which has to contain the conversion +# code for converting an element and has to return the conversion result. +# +# The actual transformation of the document tree can be done in any way. However, writing one +# method per element type is a straight forward way to do it - this is how the Html and Latex +# converters do the transformation. +# +# Have a look at the Base::convert method for additional information! +# +# source://kramdown//lib/kramdown/converter/base.rb#40 +class Kramdown::Converter::Base + # Initialize the converter with the given +root+ element and +options+ hash. + # + # @return [Base] a new instance of Base + # + # source://kramdown//lib/kramdown/converter/base.rb#55 + def initialize(root, options); end + + # Returns whether the template should be applied after the conversion of the tree. + # + # Defaults to true. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/converter/base.rb#73 + def apply_template_after?; end + + # Returns whether the template should be applied before the conversion of the tree. + # + # Defaults to false. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/converter/base.rb#66 + def apply_template_before?; end + + # The basic version of the ID generator, without any special provisions for empty or unique + # IDs. + # + # source://kramdown//lib/kramdown/converter/base.rb#237 + def basic_generate_id(str); end + + # Convert the element +el+ and return the resulting object. + # + # This is the only method that has to be implemented by sub-classes! + # + # @raise [NotImplementedError] + # + # source://kramdown//lib/kramdown/converter/base.rb#122 + def convert(_el); end + + # Can be used by a converter for storing arbitrary information during the conversion process. + # + # source://kramdown//lib/kramdown/converter/base.rb#43 + def data; end + + # Extract the code block/span language from the attributes. + # + # source://kramdown//lib/kramdown/converter/base.rb#174 + def extract_code_language(attr); end + + # See #extract_code_language + # + # *Warning*: This version will modify the given attributes if a language is present. + # + # source://kramdown//lib/kramdown/converter/base.rb#183 + def extract_code_language!(attr); end + + # Format the given math element with the math engine configured through the option + # 'math_engine'. + # + # source://kramdown//lib/kramdown/converter/base.rb#206 + def format_math(el, opts = T.unsafe(nil)); end + + # Generate an unique alpha-numeric ID from the the string +str+ for use as a header ID. + # + # Uses the option +auto_id_prefix+: the value of this option is prepended to every generated + # ID. + # + # source://kramdown//lib/kramdown/converter/base.rb#222 + def generate_id(str); end + + # Highlight the given +text+ in the language +lang+ with the syntax highlighter configured + # through the option 'syntax_highlighter'. + # + # source://kramdown//lib/kramdown/converter/base.rb#192 + def highlight_code(text, lang, type, opts = T.unsafe(nil)); end + + # Return +true+ if the header element +el+ should be used for the table of contents (as + # specified by the +toc_levels+ option). + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/converter/base.rb#162 + def in_toc?(el); end + + # The hash with the conversion options. + # + # source://kramdown//lib/kramdown/converter/base.rb#46 + def options; end + + # Return the output header level given a level. + # + # Uses the +header_offset+ option for adjusting the header level. + # + # source://kramdown//lib/kramdown/converter/base.rb#169 + def output_header_level(level); end + + # The root element that is converted. + # + # source://kramdown//lib/kramdown/converter/base.rb#49 + def root; end + + # Return the entity that represents the given smart_quote element. + # + # source://kramdown//lib/kramdown/converter/base.rb#248 + def smart_quote_entity(el); end + + # Add the given warning +text+ to the warning array. + # + # source://kramdown//lib/kramdown/converter/base.rb#156 + def warning(text); end + + # The warnings array. + # + # source://kramdown//lib/kramdown/converter/base.rb#52 + def warnings; end + + class << self + # Apply the +template+ using +body+ as the body string. + # + # The template is evaluated using ERB and the body is available in the @body instance variable + # and the converter object in the @converter instance variable. + # + # source://kramdown//lib/kramdown/converter/base.rb#130 + def apply_template(converter, body); end + + # Convert the element tree +tree+ and return the resulting conversion object (normally a + # string) and an array with warning messages. The parameter +options+ specifies the conversion + # options that should be used. + # + # Initializes a new instance of the calling class and then calls the #convert method with + # +tree+ as parameter. + # + # If the +template+ option is specified and non-empty, the template is evaluate with ERB + # before and/or after the tree conversion depending on the result of #apply_template_before? + # and #apply_template_after?. If the template is evaluated before, an empty string is used for + # the body; if evaluated after, the result is used as body. See ::apply_template. + # + # The template resolution is done in the following way (for the converter ConverterName): + # + # 1. Look in the current working directory for the template. + # + # 2. Append +.converter_name+ (e.g. +.html+) to the template name and look for the resulting + # file in the current working directory (the form +.convertername+ is deprecated). + # + # 3. Append +.converter_name+ to the template name and look for it in the kramdown data + # directory (the form +.convertername+ is deprecated). + # + # 4. Check if the template name starts with 'string://' and if so, strip this prefix away and + # use the rest as template. + # + # source://kramdown//lib/kramdown/converter/base.rb#101 + def convert(tree, options = T.unsafe(nil)); end + + # Return the template specified by +template+. + # + # source://kramdown//lib/kramdown/converter/base.rb#139 + def get_template(template); end + + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://kramdown//lib/kramdown/converter/base.rb#245 +Kramdown::Converter::Base::SMART_QUOTE_INDICES = T.let(T.unsafe(nil), Hash) + +# Converts a Kramdown::Document to a nested hash for further processing or debug output. +# +# source://kramdown//lib/kramdown/converter/hash_ast.rb#19 +class Kramdown::Converter::HashAST < ::Kramdown::Converter::Base + # source://kramdown//lib/kramdown/converter/hash_ast.rb#21 + def convert(el); end +end + +# source://kramdown//lib/kramdown/converter/hash_ast.rb#35 +Kramdown::Converter::HashAst = Kramdown::Converter::HashAST + +# Converts a Kramdown::Document to HTML. +# +# You can customize the HTML converter by sub-classing it and overriding the +convert_NAME+ +# methods. Each such method takes the following parameters: +# +# [+el+] The element of type +NAME+ to be converted. +# +# [+indent+] A number representing the current amount of spaces for indent (only used for +# block-level elements). +# +# The return value of such a method has to be a string containing the element +el+ formatted as +# HTML element. +# +# source://kramdown//lib/kramdown/converter/html.rb#30 +class Kramdown::Converter::Html < ::Kramdown::Converter::Base + include ::Kramdown::Utils::Html + include ::Kramdown::Parser::Html::Constants + + # Initialize the HTML converter with the given Kramdown document +doc+. + # + # @return [Html] a new instance of Html + # + # source://kramdown//lib/kramdown/converter/html.rb#39 + def initialize(root, options); end + + # Add the syntax highlighter name to the 'class' attribute of the given attribute hash. And + # overwrites or add a "language-LANG" part using the +lang+ parameter if +lang+ is not nil. + # + # source://kramdown//lib/kramdown/converter/html.rb#409 + def add_syntax_highlighter_to_class_attr(attr, lang = T.unsafe(nil)); end + + # Dispatch the conversion of the element +el+ to a +convert_TYPE+ method using the +type+ of + # the element. + # + # source://kramdown//lib/kramdown/converter/html.rb#57 + def convert(el, indent = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/html.rb#272 + def convert_a(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#365 + def convert_abbreviation(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#77 + def convert_blank(_el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#141 + def convert_blockquote(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#268 + def convert_br(_el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#111 + def convert_codeblock(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#280 + def convert_codespan(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#260 + def convert_comment(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#178 + def convert_dd(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#174 + def convert_dl(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#190 + def convert_dt(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#319 + def convert_em(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#324 + def convert_entity(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#294 + def convert_footnote(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#145 + def convert_header(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#155 + def convert_hr(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#201 + def convert_html_element(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#276 + def convert_img(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#178 + def convert_li(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#351 + def convert_math(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#162 + def convert_ol(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#86 + def convert_p(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#311 + def convert_raw(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#372 + def convert_root(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#347 + def convert_smart_quote(el, _indent); end + + # Helper method used by +convert_p+ to convert a paragraph that only contains a single :img + # element. + # + # source://kramdown//lib/kramdown/converter/html.rb#99 + def convert_standalone_image(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#319 + def convert_strong(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_table(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_tbody(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#248 + def convert_td(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#81 + def convert_text(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_tfoot(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_thead(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#238 + def convert_tr(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#339 + def convert_typographic_sym(el, _indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#162 + def convert_ul(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#228 + def convert_xml_comment(el, indent); end + + # source://kramdown//lib/kramdown/converter/html.rb#228 + def convert_xml_pi(el, indent); end + + # Fixes the elements for use in a TOC entry. + # + # source://kramdown//lib/kramdown/converter/html.rb#453 + def fix_for_toc_entry(elements); end + + # Return an HTML ordered list with the footnote content for the used footnotes. + # + # source://kramdown//lib/kramdown/converter/html.rb#488 + def footnote_content; end + + # Format the given element as block HTML. + # + # source://kramdown//lib/kramdown/converter/html.rb#397 + def format_as_block_html(name, attr, body, indent); end + + # Format the given element as block HTML with a newline after the start tag and indentation + # before the end tag. + # + # source://kramdown//lib/kramdown/converter/html.rb#403 + def format_as_indented_block_html(name, attr, body, indent); end + + # Format the given element as span HTML. + # + # source://kramdown//lib/kramdown/converter/html.rb#392 + def format_as_span_html(name, attr, body); end + + # Generate and return an element tree for the table of contents. + # + # source://kramdown//lib/kramdown/converter/html.rb#415 + def generate_toc_tree(toc, type, attr); end + + # The amount of indentation used when nesting HTML tags. + # + # source://kramdown//lib/kramdown/converter/html.rb#36 + def indent; end + + # The amount of indentation used when nesting HTML tags. + # + # source://kramdown//lib/kramdown/converter/html.rb#36 + def indent=(_arg0); end + + # Return the converted content of the children of +el+ as a string. The parameter +indent+ has + # to be the amount of indentation used for the element +el+. + # + # Pushes +el+ onto the @stack before converting the child elements and pops it from the stack + # afterwards. + # + # source://kramdown//lib/kramdown/converter/html.rb#66 + def inner(el, indent); end + + # Obfuscate the +text+ by using HTML entities. + # + # source://kramdown//lib/kramdown/converter/html.rb#476 + def obfuscate(text); end + + # Remove all footnotes from the given elements. + # + # source://kramdown//lib/kramdown/converter/html.rb#468 + def remove_footnotes(elements); end + + # Remove all link elements by unwrapping them. + # + # source://kramdown//lib/kramdown/converter/html.rb#460 + def unwrap_links(elements); end +end + +# source://kramdown//lib/kramdown/converter/html.rb#246 +Kramdown::Converter::Html::ENTITY_NBSP = T.let(T.unsafe(nil), Kramdown::Utils::Entities::Entity) + +# source://kramdown//lib/kramdown/converter/html.rb#485 +Kramdown::Converter::Html::FOOTNOTE_BACKLINK_FMT = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/converter/html.rb#328 +Kramdown::Converter::Html::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/html.rb#159 +Kramdown::Converter::Html::ZERO_TO_ONETWENTYEIGHT = T.let(T.unsafe(nil), Array) + +# Converts an element tree to the kramdown format. +# +# source://kramdown//lib/kramdown/converter/kramdown.rb#18 +class Kramdown::Converter::Kramdown < ::Kramdown::Converter::Base + include ::Kramdown::Utils::Html + + # @return [Kramdown] a new instance of Kramdown + # + # source://kramdown//lib/kramdown/converter/kramdown.rb#24 + def initialize(root, options); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#34 + def convert(el, opts = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#291 + def convert_a(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#377 + def convert_abbreviation(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#70 + def convert_blank(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#107 + def convert_blockquote(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#287 + def convert_br(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#103 + def convert_codeblock(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#324 + def convert_codespan(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#279 + def convert_comment(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#158 + def convert_dd(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#124 + def convert_dl(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#182 + def convert_dt(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#346 + def convert_em(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#356 + def convert_entity(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#329 + def convert_footnote(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#112 + def convert_header(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#120 + def convert_hr(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#195 + def convert_html_element(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#308 + def convert_img(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#130 + def convert_li(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#373 + def convert_math(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#124 + def convert_ol(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#88 + def convert_p(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#334 + def convert_raw(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#381 + def convert_root(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#369 + def convert_smart_quote(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#351 + def convert_strong(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#239 + def convert_table(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#260 + def convert_tbody(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#275 + def convert_td(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#76 + def convert_text(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#267 + def convert_tfoot(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#244 + def convert_thead(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#271 + def convert_tr(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#365 + def convert_typographic_sym(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#124 + def convert_ul(el, opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#229 + def convert_xml_comment(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#229 + def convert_xml_pi(el, _opts); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#408 + def create_abbrev_defs; end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#399 + def create_footnote_defs; end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#389 + def create_link_defs; end + + # Return the IAL containing the attributes of the element +el+. + # + # source://kramdown//lib/kramdown/converter/kramdown.rb#419 + def ial_for_element(el); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#54 + def inner(el, opts = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/kramdown.rb#444 + def parse_title(attr); end +end + +# source://kramdown//lib/kramdown/converter/kramdown.rb#74 +Kramdown::Converter::Kramdown::ESCAPED_CHAR_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/converter/kramdown.rb#192 +Kramdown::Converter::Kramdown::HTML_ELEMENT_TYPES = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/converter/kramdown.rb#190 +Kramdown::Converter::Kramdown::HTML_TAGS_WITH_BODY = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/converter/kramdown.rb#360 +Kramdown::Converter::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash) + +# Converts an element tree to LaTeX. +# +# This converter uses ideas from other Markdown-to-LaTeX converters like Pandoc and Maruku. +# +# You can customize this converter by sub-classing it and overriding the +convert_NAME+ methods. +# Each such method takes the following parameters: +# +# [+el+] The element of type +NAME+ to be converted. +# +# [+opts+] A hash containing processing options that are passed down from parent elements. The +# key :parent is always set and contains the parent element as value. +# +# The return value of such a method has to be a string containing the element +el+ formatted +# correctly as LaTeX markup. +# +# source://kramdown//lib/kramdown/converter/latex.rb#31 +class Kramdown::Converter::Latex < ::Kramdown::Converter::Base + # Initialize the LaTeX converter with the +root+ element and the conversion +options+. + # + # @return [Latex] a new instance of Latex + # + # source://kramdown//lib/kramdown/converter/latex.rb#34 + def initialize(root, options); end + + # Return a LaTeX comment containing all attributes as 'key="value"' pairs. + # + # source://kramdown//lib/kramdown/converter/latex.rb#599 + def attribute_list(el); end + + # Dispatch the conversion of the element +el+ to a +convert_TYPE+ method using the +type+ of + # the element. + # + # source://kramdown//lib/kramdown/converter/latex.rb#41 + def convert(el, opts = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/latex.rb#216 + def convert_a(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#569 + def convert_abbreviation(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#61 + def convert_blank(_el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#110 + def convert_blockquote(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#209 + def convert_br(_el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#87 + def convert_codeblock(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#239 + def convert_codespan(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#205 + def convert_comment(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#151 + def convert_dd(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#139 + def convert_dl(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#147 + def convert_dt(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#263 + def convert_em(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#533 + def convert_entity(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#250 + def convert_footnote(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#114 + def convert_header(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#124 + def convert_hr(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#155 + def convert_html_element(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#225 + def convert_img(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#143 + def convert_li(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#556 + def convert_math(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#129 + def convert_ol(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#69 + def convert_p(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#255 + def convert_raw(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#57 + def convert_root(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#550 + def convert_smart_quote(el, opts); end + + # Helper method used by +convert_p+ to convert a paragraph that only contains a single :img + # element. + # + # source://kramdown//lib/kramdown/converter/latex.rb#80 + def convert_standalone_image(el, _opts, img); end + + # source://kramdown//lib/kramdown/converter/latex.rb#267 + def convert_strong(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#177 + def convert_table(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#189 + def convert_tbody(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#201 + def convert_td(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#65 + def convert_text(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#193 + def convert_tfoot(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#185 + def convert_thead(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#197 + def convert_tr(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#542 + def convert_typographic_sym(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#129 + def convert_ul(el, opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#166 + def convert_xml_comment(el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#170 + def convert_xml_pi(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/latex.rb#522 + def entity_to_latex(entity); end + + # Escape the special LaTeX characters in the string +str+. + # + # source://kramdown//lib/kramdown/converter/latex.rb#618 + def escape(str); end + + # Return the converted content of the children of +el+ as a string. + # + # source://kramdown//lib/kramdown/converter/latex.rb#46 + def inner(el, opts); end + + # Wrap the +text+ inside a LaTeX environment of type +type+. The element +el+ is passed on to + # the method #attribute_list -- the resulting string is appended to both the \\begin and the + # \\end lines of the LaTeX environment for easier post-processing of LaTeX environments. + # + # source://kramdown//lib/kramdown/converter/latex.rb#582 + def latex_environment(type, el, text); end + + # Return a string containing a valid \hypertarget command if the element has an ID defined, or + # +nil+ otherwise. If the parameter +add_label+ is +true+, a \label command will also be used + # additionally to the \hypertarget command. + # + # source://kramdown//lib/kramdown/converter/latex.rb#590 + def latex_link_target(el, add_label = T.unsafe(nil)); end + + # Normalize the abbreviation key so that it only contains allowed ASCII character + # + # source://kramdown//lib/kramdown/converter/latex.rb#575 + def normalize_abbreviation_key(key); end +end + +# Inspired by Maruku: entity conversion table based on the one from htmltolatex +# (http://sourceforge.net/projects/htmltolatex/), with some small adjustments/additions +# +# source://kramdown//lib/kramdown/converter/latex.rb#273 +Kramdown::Converter::Latex::ENTITY_CONV_TABLE = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/latex.rb#605 +Kramdown::Converter::Latex::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/latex.rb#615 +Kramdown::Converter::Latex::ESCAPE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/converter/latex.rb#175 +Kramdown::Converter::Latex::TABLE_ALIGNMENT_CHAR = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/latex.rb#537 +Kramdown::Converter::Latex::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Hash) + +# Converts a Kramdown::Document to a manpage in groff format. See man(7), groff_man(7) and +# man-pages(7) for information regarding the output. +# +# source://kramdown//lib/kramdown/converter/man.rb#18 +class Kramdown::Converter::Man < ::Kramdown::Converter::Base + # source://kramdown//lib/kramdown/converter/man.rb#20 + def convert(el, opts = T.unsafe(nil)); end + + private + + # source://kramdown//lib/kramdown/converter/man.rb#191 + def convert_a(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#229 + def convert_abbreviation(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#47 + def convert_blank(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#95 + def convert_blockquote(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#225 + def convert_br(_el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#89 + def convert_codeblock(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#221 + def convert_codespan(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#186 + def convert_comment(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#127 + def convert_dd(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#101 + def convert_dl(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#121 + def convert_dt(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#209 + def convert_em(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#255 + def convert_entity(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#241 + def convert_footnote(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#61 + def convert_header(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#47 + def convert_hr(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#182 + def convert_html_element(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#205 + def convert_img(_el, _opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#110 + def convert_li(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#233 + def convert_math(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#101 + def convert_ol(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#52 + def convert_p(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#245 + def convert_raw(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#40 + def convert_root(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#259 + def convert_smart_quote(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#215 + def convert_strong(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#139 + def convert_table(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#154 + def convert_tbody(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#170 + def convert_td(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#249 + def convert_text(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#161 + def convert_tfoot(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#148 + def convert_thead(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#165 + def convert_tr(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#268 + def convert_typographic_sym(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#101 + def convert_ul(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#186 + def convert_xml_comment(el, opts); end + + # source://kramdown//lib/kramdown/converter/man.rb#47 + def convert_xml_pi(*_arg0); end + + # source://kramdown//lib/kramdown/converter/man.rb#285 + def escape(text, preserve_whitespace = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/man.rb#26 + def inner(el, opts, use = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/converter/man.rb#272 + def macro(name, *args); end + + # source://kramdown//lib/kramdown/converter/man.rb#276 + def newline(text); end + + # source://kramdown//lib/kramdown/converter/man.rb#281 + def quote(text); end + + # source://kramdown//lib/kramdown/converter/man.rb#293 + def unicode_char(codepoint); end +end + +# source://kramdown//lib/kramdown/converter/man.rb#137 +Kramdown::Converter::Man::TABLE_CELL_ALIGNMENT = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/converter/man.rb#263 +Kramdown::Converter::Man::TYPOGRAPHIC_SYMS_MAP = T.let(T.unsafe(nil), Hash) + +# Removes all block (and optionally span) level HTML tags from the element tree. +# +# This converter can be used on parsed HTML documents to get an element tree that will only +# contain native kramdown elements. +# +# *Note* that the returned element tree may not be fully conformant (i.e. the content models of +# *some elements may be violated)! +# +# This converter modifies the given tree in-place and returns it. +# +# source://kramdown//lib/kramdown/converter/remove_html_tags.rb#25 +class Kramdown::Converter::RemoveHtmlTags < ::Kramdown::Converter::Base + # @return [RemoveHtmlTags] a new instance of RemoveHtmlTags + # + # source://kramdown//lib/kramdown/converter/remove_html_tags.rb#27 + def initialize(root, options); end + + # source://kramdown//lib/kramdown/converter/remove_html_tags.rb#32 + def convert(el); end +end + +# Converts a Kramdown::Document to an element tree that represents the table of contents. +# +# The returned tree consists of Element objects of type :toc where the root element is just used +# as container object. Each :toc element contains as value the wrapped :header element and under +# the attribute key :id the header ID that should be used (note that this ID may not exist in +# the wrapped element). +# +# Since the TOC tree consists of special :toc elements, one cannot directly feed this tree to +# other converters! +# +# source://kramdown//lib/kramdown/converter/toc.rb#25 +class Kramdown::Converter::Toc < ::Kramdown::Converter::Base + # @return [Toc] a new instance of Toc + # + # source://kramdown//lib/kramdown/converter/toc.rb#27 + def initialize(root, options); end + + # source://kramdown//lib/kramdown/converter/toc.rb#34 + def convert(el); end + + private + + # source://kramdown//lib/kramdown/converter/toc.rb#47 + def add_to_toc(el, id); end +end + +# The main interface to kramdown. +# +# This class provides a one-stop-shop for using kramdown to convert text into various output +# formats. Use it like this: +# +# require 'kramdown' +# doc = Kramdown::Document.new('This *is* some kramdown text') +# puts doc.to_html +# +# The #to_html method is a shortcut for using the Converter::Html class. See #method_missing for +# more information. +# +# The second argument to the ::new method is an options hash for customizing the behaviour of the +# used parser and the converter. See ::new for more information! +# +# source://kramdown//lib/kramdown/document.rb#73 +class Kramdown::Document + # Create a new Kramdown document from the string +source+ and use the provided +options+. The + # options that can be used are defined in the Options module. + # + # The special options key :input can be used to select the parser that should parse the + # +source+. It has to be the name of a class in the Kramdown::Parser module. For example, to + # select the kramdown parser, one would set the :input key to +Kramdown+. If this key is not + # set, it defaults to +Kramdown+. + # + # The +source+ is immediately parsed by the selected parser so that the root element is + # immediately available and the output can be generated. + # + # @return [Document] a new instance of Document + # + # source://kramdown//lib/kramdown/document.rb#96 + def initialize(source, options = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/document.rb#124 + def inspect; end + + # Check if a method is invoked that begins with +to_+ and if so, try to instantiate a converter + # class (i.e. a class in the Kramdown::Converter module) and use it for converting the document. + # + # For example, +to_html+ would instantiate the Kramdown::Converter::Html class. + # + # source://kramdown//lib/kramdown/document.rb#113 + def method_missing(id, *attr, &block); end + + # The options hash which holds the options for parsing/converting the Kramdown document. + # + # source://kramdown//lib/kramdown/document.rb#80 + def options; end + + # The root Element of the element tree. It is immediately available after the ::new method has + # been called. + # + # source://kramdown//lib/kramdown/document.rb#77 + def root; end + + # The root Element of the element tree. It is immediately available after the ::new method has + # been called. + # + # source://kramdown//lib/kramdown/document.rb#77 + def root=(_arg0); end + + # An array of warning messages. It is filled with warnings during the parsing phase (i.e. in + # ::new) and the conversion phase. + # + # source://kramdown//lib/kramdown/document.rb#84 + def warnings; end + + protected + + # Try requiring a parser or converter class and don't raise an error if the file is not found. + # + # source://kramdown//lib/kramdown/document.rb#129 + def try_require(type, name); end +end + +# Represents all elements in the element tree. +# +# kramdown only uses this one class for representing all available elements in an element tree +# (paragraphs, headers, emphasis, ...). The type of element can be set via the #type accessor. +# +# The root of a kramdown element tree has to be an element of type :root. It needs to have certain +# option keys set so that conversions work correctly. If only a part of a tree should be +# converted, duplicate the root node and assign the #children appropriately, e.g: +# +# root = doc.root +# new_root = root.dup +# new_root.children = [root.children[0]] # assign new array with elements to convert +# +# Following is a description of all supported element types. +# +# Note that the option :location may contain the start line number of an element in the source +# document. +# +# == Structural Elements +# +# === :root +# +# [Category] None +# [Usage context] As the root element of a document +# [Content model] Block-level elements +# +# Represents the root of a kramdown document. +# +# The root element contains the following option keys: +# +# parts of the kramdown document. +# +# :abbrev_defs:: This key may be used to store the mapping of abbreviation to abbreviation +# definition. +# +# :abbrev_attr:: This key may be used to store the mapping of abbreviation to abbreviation +# attributes. +# +# :options:: This key may be used to store options that were set during parsing of the document. +# +# :footnote_count:: This key stores the number of actually referenced footnotes of the document. +# +# === :blank +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Empty +# +# Represents one or more blank lines. It is not allowed to have two or more consecutive blank +# elements. +# +# The +value+ field may contain the original content of the blank lines. +# +# +# === :p +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Span-level elements +# +# Represents a paragraph. +# +# If the option :transparent is +true+, this element just represents a block of text. I.e. this +# element just functions as a container for span-level elements. +# +# +# === :header +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Span-level elements +# +# Represents a header. +# +# The option :level specifies the header level and has to contain a number between 1 and \6. The +# option :raw_text has to contain the raw header text. +# +# +# === :blockquote +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Block-level elements +# +# Represents a blockquote. +# +# +# === :codeblock +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Empty +# +# Represents a code block, i.e. a block of text that should be used as-is. +# +# The +value+ field has to contain the content of the code block. +# +# The option :lang specifies a highlighting language with possible HTML style options (e.g. +# php?start_inline=1) and should be used instead of a possibly also available language embedded in +# a class name of the form 'language-LANG'. +# +# +# === :ul +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] One or more :li elements +# +# Represents an unordered list. +# +# +# === :ol +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] One or more :li elements +# +# Represents an ordered list. +# +# +# === :li +# +# [Category] Block-level element +# [Usage context] Inside :ol and :ul elements +# [Content model] Block-level elements +# +# Represents a list item of an ordered or unordered list. +# +# Note that the first child of a list item must not be a :blank element! +# +# +# === :dl +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] One or more groups each consisting of one or more :dt elements followed by one +# or more :dd elements. +# +# Represents a definition list which contains groups consisting of terms and definitions for them. +# +# +# === :dt +# +# [Category] Block-level element +# [Usage context] Before :dt or :dd elements inside a :dl elment +# [Content model] Span-level elements +# +# Represents the term part of a term-definition group in a definition list. +# +# +# === :dd +# +# [Category] Block-level element +# [Usage context] After :dt or :dd elements inside a :dl elment +# [Content model] Block-level elements +# +# Represents the definition part of a term-definition group in a definition list. +# +# +# === :hr +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] None +# +# Represents a horizontal line. +# +# +# === :table +# +# [Category] Block-level element +# [Usage context] Where block-level elements are expected +# [Content model] Zero or one :thead elements, one or more :tbody elements, zero or one :tfoot +# elements +# +# Represents a table. Each table row (i.e. :tr element) of the table has to contain the same +# number of :td elements. +# +# The option :alignment has to be an array containing the alignment values, exactly one for each +# column of the table. The possible alignment values are :left, :center, :right and :default. +# +# +# === :thead +# +# [Category] None +# [Usage context] As first element inside a :table element +# [Content model] One or more :tr elements +# +# Represents the table header. +# +# +# === :tbody +# +# [Category] None +# [Usage context] After a :thead element but before a :tfoot element inside a :table element +# [Content model] One or more :tr elements +# +# Represents a table body. +# +# +# === :tfoot +# +# [Category] None +# [Usage context] As last element inside a :table element +# [Content model] One or more :tr elements +# +# Represents the table footer. +# +# +# === :tr +# +# [Category] None +# [Usage context] Inside :thead, :tbody and :tfoot elements +# [Content model] One or more :td elements +# +# Represents a table row. +# +# +# === :td +# +# [Category] Block-level element +# [Usage context] Inside :tr elements +# [Content model] As child of :thead/:tr span-level elements, as child of :tbody/:tr and +# :tfoot/:tr block-level elements +# +# Represents a table cell. +# +# +# === :math +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected +# [Content model] None +# +# Represents mathematical text that is written in LaTeX. +# +# The +value+ field has to contain the actual mathematical text. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. +# +# +# == Text Markup Elements +# +# === :text +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents text. +# +# The +value+ field has to contain the text itself. +# +# +# === :br +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a hard line break. +# +# +# === :a +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] Span-level elements +# +# Represents a link to an URL. +# +# The attribute +href+ has to be set to the URL to which the link points. The attribute +title+ +# optionally contains the title of the link. +# +# +# === :img +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents an image. +# +# The attribute +src+ has to be set to the URL of the image. The attribute +alt+ has to contain a +# text description of the image. The attribute +title+ optionally contains the title of the image. +# +# +# === :codespan +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents verbatim text. +# +# The +value+ field has to contain the content of the code span. +# +# +# === :footnote +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a footnote marker. +# +# The +value+ field has to contain an element whose children are the content of the footnote. The +# option :name has to contain a valid and unique footnote name. A valid footnote name consists of +# a word character or a digit and then optionally followed by other word characters, digits or +# dashes. +# +# +# === :em +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] Span-level elements +# +# Represents emphasis of its contents. +# +# +# === :strong +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] Span-level elements +# +# Represents strong importance for its contents. +# +# +# === :entity +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents an HTML entity. +# +# The +value+ field has to contain an instance of Kramdown::Utils::Entities::Entity. The option +# :original can be used to store the original representation of the entity. +# +# +# === :typographic_sym +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a typographic symbol. +# +# The +value+ field needs to contain a Symbol representing the specific typographic symbol from +# the following list: +# +# :mdash:: An mdash character (---) +# :ndash:: An ndash character (--) +# :hellip:: An ellipsis (...) +# :laquo:: A left guillemet (<<) +# :raquo:: A right guillemet (>>) +# :laquo_space:: A left guillemet with a space (<< ) +# :raquo_space:: A right guillemet with a space ( >>) +# +# +# === :smart_quote +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a quotation character. +# +# The +value+ field needs to contain a Symbol representing the specific quotation character: +# +# :lsquo:: Left single quote +# :rsquo:: Right single quote +# :ldquo:: Left double quote +# :rdquo:: Right double quote +# +# +# === :abbreviation +# +# [Category] Span-level element +# [Usage context] Where span-level elements are expected +# [Content model] None +# +# Represents a text part that is an abbreviation. +# +# The +value+ field has to contain the text part that is the abbreviation. The definition of the +# abbreviation is stored in the :root element of the document. +# +# +# == Other Elements +# +# === :html_element +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements or raw HTML elements are expected +# [Content model] Depends on the element +# +# Represents an HTML element. +# +# The +value+ field has to contain the name of the HTML element the element is representing. +# +# The option :category has to be set to either :span or :block depending on the whether the +# element is a block-level or a span-level element. The option :content_model has to be set to the +# content model for the element (either :block if it contains block-level elements, :span if it +# contains span-level elements or :raw if it contains raw content). +# +# +# === :xml_comment +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected or in raw HTML elements +# [Content model] None +# +# Represents an XML/HTML comment. +# +# The +value+ field has to contain the whole XML/HTML comment including the delimiters. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. +# +# +# === :xml_pi +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected or in raw HTML elements +# [Content model] None +# +# Represents an XML/HTML processing instruction. +# +# The +value+ field has to contain the whole XML/HTML processing instruction including the +# delimiters. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. +# +# +# === :comment +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected +# [Content model] None +# +# Represents a comment. +# +# The +value+ field has to contain the comment. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. If it is set to :span, then no blank lines are allowed in the comment. +# +# +# === :raw +# +# [Category] Block/span-level element +# [Usage context] Where block/span-level elements are expected +# [Content model] None +# +# Represents a raw string that should not be modified. For example, the element could contain some +# HTML code that should be output as-is without modification and escaping. +# +# The +value+ field has to contain the actual raw text. +# +# The option :category has to be set to either :span or :block depending on the context where the +# element is used. If it is set to :span, then no blank lines are allowed in the raw text. +# +# The option :type can be set to an array of strings to define for which converters the raw string +# is valid. +# +# source://kramdown//lib/kramdown/element.rb#482 +class Kramdown::Element + # Create a new Element object of type +type+. The optional parameters +value+, +attr+ and + # +options+ can also be set in this constructor for convenience. + # + # @return [Element] a new instance of Element + # + # source://kramdown//lib/kramdown/element.rb#496 + def initialize(type, value = T.unsafe(nil), attr = T.unsafe(nil), options = T.unsafe(nil)); end + + # The attributes of the element. + # + # source://kramdown//lib/kramdown/element.rb#502 + def attr; end + + # syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :block+ with + # +el.block?+. + # + # Returns boolean true or false. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/element.rb#537 + def block?; end + + # The child elements of this element. + # + # source://kramdown//lib/kramdown/element.rb#492 + def children; end + + # The child elements of this element. + # + # source://kramdown//lib/kramdown/element.rb#492 + def children=(_arg0); end + + # source://kramdown//lib/kramdown/element.rb#511 + def inspect; end + + # The options hash for the element. It is used for storing arbitray options. + # + # source://kramdown//lib/kramdown/element.rb#507 + def options; end + + # syntactic sugar to simplify calls such as +Kramdown::Element.category(el) == :span+ with + # +el.span?+. + # + # Returns boolean true or false. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/element.rb#545 + def span?; end + + # A symbol representing the element type. For example, :p or :blockquote. + # + # source://kramdown//lib/kramdown/element.rb#485 + def type; end + + # A symbol representing the element type. For example, :p or :blockquote. + # + # source://kramdown//lib/kramdown/element.rb#485 + def type=(_arg0); end + + # The value of the element. The interpretation of this field depends on the type of the element. + # Many elements don't use this field. + # + # source://kramdown//lib/kramdown/element.rb#489 + def value; end + + # The value of the element. The interpretation of this field depends on the type of the element. + # Many elements don't use this field. + # + # source://kramdown//lib/kramdown/element.rb#489 + def value=(_arg0); end + + class << self + # Return the category of +el+ which can be :block, :span or +nil+. + # + # Most elements have a fixed category, however, some elements can either appear in a block-level + # or a span-level context. These elements need to have the option :category correctly set. + # + # source://kramdown//lib/kramdown/element.rb#529 + def category(el); end + end +end + +# source://kramdown//lib/kramdown/element.rb#519 +Kramdown::Element::CATEGORY = T.let(T.unsafe(nil), Hash) + +# This error is raised when an error condition is encountered. +# +# *Note* that this error is only raised by the support framework for the parsers and converters. +# +# source://kramdown//lib/kramdown/error.rb#15 +class Kramdown::Error < ::RuntimeError; end + +# This module defines all options that are used by parsers and/or converters as well as providing +# methods to deal with the options. +# +# source://kramdown//lib/kramdown/options.rb#16 +module Kramdown::Options + class << self + # Return a Hash with the default values for all options. + # + # source://kramdown//lib/kramdown/options.rb#72 + def defaults; end + + # Define a new option called +name+ (a Symbol) with the given +type+ (String, Integer, Float, + # Symbol, Boolean, Object), default value +default+ and the description +desc+. If a block is + # specified, it should validate the value and either raise an error or return a valid value. + # + # The type 'Object' should only be used for complex types for which none of the other types + # suffices. A block needs to be specified when using type 'Object' and it has to cope with + # a value given as string and as the opaque type. + # + # @raise [ArgumentError] + # + # source://kramdown//lib/kramdown/options.rb#51 + def define(name, type, default, desc, &block); end + + # Return +true+ if an option called +name+ is defined. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/options.rb#67 + def defined?(name); end + + # Return all option definitions. + # + # source://kramdown//lib/kramdown/options.rb#62 + def definitions; end + + # Merge the #defaults Hash with the *parsed* options from the given Hash, i.e. only valid option + # names are considered and their value is run through the #parse method. + # + # source://kramdown//lib/kramdown/options.rb#82 + def merge(hash); end + + # Parse the given value +data+ as if it was a value for the option +name+ and return the parsed + # value with the correct type. + # + # If +data+ already has the correct type, it is just returned. Otherwise it is converted to a + # String and then to the correct type. + # + # @raise [ArgumentError] + # + # source://kramdown//lib/kramdown/options.rb#96 + def parse(name, data); end + + # Ensures that the option value +val+ for the option called +name+ is a valid array. The + # parameter +val+ can be + # + # - a comma separated string which is split into an array of values + # - or an array. + # + # Optionally, the array is checked for the correct size. + # + # source://kramdown//lib/kramdown/options.rb#141 + def simple_array_validator(val, name, size = T.unsafe(nil)); end + + # Ensures that the option value +val+ for the option called +name+ is a valid hash. The + # parameter +val+ can be + # + # - a hash in YAML format + # - or a Ruby Hash object. + # + # @raise [Kramdown::Error] + # + # source://kramdown//lib/kramdown/options.rb#158 + def simple_hash_validator(val, name); end + + # Converts the given String +data+ into a Symbol or +nil+ with the + # following provisions: + # + # - A leading colon is stripped from the string. + # - An empty value or a value equal to "nil" results in +nil+. + # + # source://kramdown//lib/kramdown/options.rb#122 + def str_to_sym(data); end + end +end + +# Allowed option types. +# +# source://kramdown//lib/kramdown/options.rb#39 +Kramdown::Options::ALLOWED_TYPES = T.let(T.unsafe(nil), Array) + +# Helper class introducing a boolean type for specifying boolean values (+true+ and +false+) as +# option types. +# +# source://kramdown//lib/kramdown/options.rb#20 +class Kramdown::Options::Boolean + class << self + # Return +true+ if +other+ is either +true+ or +false+ + # + # source://kramdown//lib/kramdown/options.rb#23 + def ===(other); end + end +end + +# Struct class for storing the definition of an option. +# +# source://kramdown//lib/kramdown/options.rb#36 +class Kramdown::Options::Definition < ::Struct + # Returns the value of attribute default + # + # @return [Object] the current value of default + def default; end + + # Sets the attribute default + # + # @param value [Object] the value to set the attribute default to. + # @return [Object] the newly set value + def default=(_); end + + # Returns the value of attribute desc + # + # @return [Object] the current value of desc + def desc; end + + # Sets the attribute desc + # + # @param value [Object] the value to set the attribute desc to. + # @return [Object] the newly set value + def desc=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + # Returns the value of attribute type + # + # @return [Object] the current value of type + def type; end + + # Sets the attribute type + # + # @param value [Object] the value to set the attribute type to. + # @return [Object] the newly set value + def type=(_); end + + # Returns the value of attribute validator + # + # @return [Object] the current value of validator + def validator; end + + # Sets the attribute validator + # + # @param value [Object] the value to set the attribute validator to. + # @return [Object] the newly set value + def validator=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://kramdown//lib/kramdown/options.rb#396 +Kramdown::Options::SMART_QUOTES_ENTITIES = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/options.rb#397 +Kramdown::Options::SMART_QUOTES_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/options.rb#336 +Kramdown::Options::TOC_LEVELS_ARRAY = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/options.rb#335 +Kramdown::Options::TOC_LEVELS_RANGE = T.let(T.unsafe(nil), Range) + +# This module contains all available parsers. A parser takes an input string and converts the +# string to an element tree. +# +# New parsers should be derived from the Base class which provides common functionality - see its +# API documentation for how to create a custom converter class. +# +# source://kramdown//lib/kramdown/parser.rb#17 +module Kramdown::Parser; end + +# == \Base class for parsers +# +# This class serves as base class for parsers. It provides common methods that can/should be +# used by all parsers, especially by those using StringScanner(Kramdown) for parsing. +# +# A parser object is used as a throw-away object, i.e. it is only used for storing the needed +# state information during parsing. Therefore one can't instantiate a parser object directly but +# only use the Base::parse method. +# +# == Implementing a parser +# +# Implementing a new parser is rather easy: just derive a new class from this class and put it +# in the Kramdown::Parser module -- the latter is needed so that the auto-detection of the new +# parser works correctly. Then you need to implement the +#parse+ method which has to contain +# the parsing code. +# +# Have a look at the Base::parse, Base::new and Base#parse methods for additional information! +# +# source://kramdown//lib/kramdown/parser/base.rb#34 +class Kramdown::Parser::Base + # Initialize the parser object with the +source+ string and the parsing +options+. + # + # The @root element, the @warnings array and @text_type (specifies the default type for newly + # created text nodes) are automatically initialized. + # + # @return [Base] a new instance of Base + # + # source://kramdown//lib/kramdown/parser/base.rb#52 + def initialize(source, options); end + + # Modify the string +source+ to be usable by the parser (unifies line ending characters to + # +\n+ and makes sure +source+ ends with a new line character). + # + # source://kramdown//lib/kramdown/parser/base.rb#91 + def adapt_source(source); end + + # This helper method adds the given +text+ either to the last element in the +tree+ if it is a + # +type+ element or creates a new text element with the given +type+. + # + # source://kramdown//lib/kramdown/parser/base.rb#103 + def add_text(text, tree = T.unsafe(nil), type = T.unsafe(nil)); end + + # Extract the part of the StringScanner +strscan+ backed string specified by the +range+. This + # method works correctly under Ruby 1.8 and Ruby 1.9. + # + # source://kramdown//lib/kramdown/parser/base.rb#115 + def extract_string(range, strscan); end + + # The hash with the parsing options. + # + # source://kramdown//lib/kramdown/parser/base.rb#37 + def options; end + + # Parse the source string into an element tree. + # + # The parsing code should parse the source provided in @source and build an element tree the + # root of which should be @root. + # + # This is the only method that has to be implemented by sub-classes! + # + # @raise [NotImplementedError] + # + # source://kramdown//lib/kramdown/parser/base.rb#79 + def parse; end + + # The root element of element tree that is created from the source string. + # + # source://kramdown//lib/kramdown/parser/base.rb#46 + def root; end + + # The original source string. + # + # source://kramdown//lib/kramdown/parser/base.rb#43 + def source; end + + # Add the given warning +text+ to the warning array. + # + # source://kramdown//lib/kramdown/parser/base.rb#84 + def warning(text); end + + # The array with the parser warnings. + # + # source://kramdown//lib/kramdown/parser/base.rb#40 + def warnings; end + + class << self + # Parse the +source+ string into an element tree, possibly using the parsing +options+, and + # return the root element of the element tree and an array with warning messages. + # + # Initializes a new instance of the calling class and then calls the +#parse+ method that must + # be implemented by each subclass. + # + # source://kramdown//lib/kramdown/parser/base.rb#67 + def parse(source, options = T.unsafe(nil)); end + + private + + def allocate; end + def new(*_arg0); end + end +end + +# Used for parsing an HTML document. +# +# The parsing code is in the Parser module that can also be used by other parsers. +# +# source://kramdown//lib/kramdown/parser/html.rb#22 +class Kramdown::Parser::Html < ::Kramdown::Parser::Base + include ::Kramdown::Parser::Html::Constants + include ::Kramdown::Parser::Html::Parser + + # Parse the source string provided on initialization as HTML document. + # + # source://kramdown//lib/kramdown/parser/html.rb#586 + def parse; end +end + +# Contains all constants that are used when parsing. +# +# source://kramdown//lib/kramdown/parser/html.rb#25 +module Kramdown::Parser::Html::Constants; end + +# source://kramdown//lib/kramdown/parser/html.rb#32 +Kramdown::Parser::Html::Constants::HTML_ATTRIBUTE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/html.rb#59 +Kramdown::Parser::Html::Constants::HTML_BLOCK_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#30 +Kramdown::Parser::Html::Constants::HTML_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# The following elements are also parsed as raw since they need child elements that cannot +# be expressed using kramdown syntax: colgroup table tbody thead tfoot tr ul ol +# +# source://kramdown//lib/kramdown/parser/html.rb#48 +Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/html.rb#37 +Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_BLOCK = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#44 +Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_RAW = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#41 +Kramdown::Parser::Html::Constants::HTML_CONTENT_MODEL_SPAN = T.let(T.unsafe(nil), Array) + +# :stopdoc: +# The following regexps are based on the ones used by REXML, with some slight modifications. +# +# source://kramdown//lib/kramdown/parser/html.rb#29 +Kramdown::Parser::Html::Constants::HTML_DOCTYPE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/html.rb#66 +Kramdown::Parser::Html::Constants::HTML_ELEMENT = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/html.rb#63 +Kramdown::Parser::Html::Constants::HTML_ELEMENTS_WITHOUT_BODY = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#35 +Kramdown::Parser::Html::Constants::HTML_ENTITY_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/html.rb#31 +Kramdown::Parser::Html::Constants::HTML_INSTRUCTION_RE = T.let(T.unsafe(nil), Regexp) + +# Some HTML elements like script belong to both categories (i.e. are valid in block and +# span HTML) and don't appear therefore! +# script, textarea +# +# source://kramdown//lib/kramdown/parser/html.rb#56 +Kramdown::Parser::Html::Constants::HTML_SPAN_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#34 +Kramdown::Parser::Html::Constants::HTML_TAG_CLOSE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/html.rb#33 +Kramdown::Parser::Html::Constants::HTML_TAG_RE = T.let(T.unsafe(nil), Regexp) + +# Converts HTML elements to native elements if possible. +# +# source://kramdown//lib/kramdown/parser/html.rb#197 +class Kramdown::Parser::Html::ElementConverter + include ::Kramdown::Parser::Html::Constants + include ::Kramdown::Utils::Entities + + # @return [ElementConverter] a new instance of ElementConverter + # + # source://kramdown//lib/kramdown/parser/html.rb#216 + def initialize(root); end + + # source://kramdown//lib/kramdown/parser/html.rb#384 + def convert_a(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#394 + def convert_b(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#417 + def convert_code(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#394 + def convert_em(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h1(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h2(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h3(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h4(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h5(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#408 + def convert_h6(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#394 + def convert_i(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#417 + def convert_pre(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#563 + def convert_script(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#394 + def convert_strong(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#460 + def convert_table(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#380 + def convert_textarea(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#375 + def extract_text(el, raw); end + + # source://kramdown//lib/kramdown/parser/html.rb#575 + def handle_math_tag(el); end + + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/html.rb#571 + def is_math_tag?(el); end + + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/html.rb#503 + def is_simple_table?(el); end + + # Convert the element +el+ and its children. + # + # source://kramdown//lib/kramdown/parser/html.rb#225 + def process(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil), parent = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/html.rb#278 + def process_children(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/html.rb#320 + def process_html_element(el, do_conversion = T.unsafe(nil), preserve_text = T.unsafe(nil)); end + + # Process the HTML text +raw+: compress whitespace (if +preserve+ is +false+) and convert + # entities in entity elements. + # + # source://kramdown//lib/kramdown/parser/html.rb#291 + def process_text(raw, preserve = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/html.rb#326 + def remove_text_children(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#359 + def remove_whitespace_children(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#369 + def set_basics(el, type, opts = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/html.rb#349 + def strip_whitespace(el); end + + # source://kramdown//lib/kramdown/parser/html.rb#330 + def wrap_text_children(el); end + + class << self + # source://kramdown//lib/kramdown/parser/html.rb#220 + def convert(root, el = T.unsafe(nil)); end + end +end + +# source://kramdown//lib/kramdown/parser/html.rb#393 +Kramdown::Parser::Html::ElementConverter::EMPHASIS_TYPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/html.rb#204 +Kramdown::Parser::Html::ElementConverter::REMOVE_TEXT_CHILDREN = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#208 +Kramdown::Parser::Html::ElementConverter::REMOVE_WHITESPACE_CHILDREN = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#213 +Kramdown::Parser::Html::ElementConverter::SIMPLE_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#210 +Kramdown::Parser::Html::ElementConverter::STRIP_WHITESPACE = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/html.rb#206 +Kramdown::Parser::Html::ElementConverter::WRAP_TEXT_CHILDREN = T.let(T.unsafe(nil), Array) + +# Contains the parsing methods. This module can be mixed into any parser to get HTML parsing +# functionality. The only thing that must be provided by the class are instance variable +# parsing. +# +# source://kramdown//lib/kramdown/parser/html.rb#77 +module Kramdown::Parser::Html::Parser + include ::Kramdown::Parser::Html::Constants + + # Process the HTML start tag that has already be scanned/checked via @src. + # + # Does the common processing steps and then yields to the caller for further processing + # (first parameter is the created element; the second parameter is +true+ if the HTML + # element is already closed, ie. contains no body; the third parameter specifies whether the + # body - and the end tag - need to be handled in case closed=false). + # + # source://kramdown//lib/kramdown/parser/html.rb#87 + def handle_html_start_tag(line = T.unsafe(nil)); end + + # Handle the raw HTML tag at the current position. + # + # source://kramdown//lib/kramdown/parser/html.rb#127 + def handle_raw_html_tag(name); end + + # Parses the given string for HTML attributes and returns the resulting hash. + # + # If the optional +line+ parameter is supplied, it is used in warning messages. + # + # If the optional +in_html_tag+ parameter is set to +false+, attributes are not modified to + # contain only lowercase letters. + # + # source://kramdown//lib/kramdown/parser/html.rb#114 + def parse_html_attributes(str, line = T.unsafe(nil), in_html_tag = T.unsafe(nil)); end + + # Parse raw HTML from the current source position, storing the found elements in +el+. + # Parsing continues until one of the following criteria are fulfilled: + # + # - The end of the document is reached. + # - The matching end tag for the element +el+ is found (only used if +el+ is an HTML + # element). + # + # When an HTML start tag is found, processing is deferred to #handle_html_start_tag, + # providing the block given to this method. + # + # source://kramdown//lib/kramdown/parser/html.rb#150 + def parse_raw_html(el, &block); end +end + +# source://kramdown//lib/kramdown/parser/html.rb#139 +Kramdown::Parser::Html::Parser::HTML_RAW_START = T.let(T.unsafe(nil), Regexp) + +# Used for parsing a document in kramdown format. +# +# If you want to extend the functionality of the parser, you need to do the following: +# +# * Create a new subclass +# * add the needed parser methods +# * modify the @block_parsers and @span_parsers variables and add the names of your parser +# methods +# +# Here is a small example for an extended parser class that parses ERB style tags as raw text if +# they are used as span-level elements (an equivalent block-level parser should probably also be +# made to handle the block case): +# +# require 'kramdown/parser/kramdown' +# +# class Kramdown::Parser::ERBKramdown < Kramdown::Parser::Kramdown +# +# def initialize(source, options) +# super +# @span_parsers.unshift(:erb_tags) +# end +# +# ERB_TAGS_START = /<%.*?%>/ +# +# def parse_erb_tags +# @src.pos += @src.matched_size +# @tree.children << Element.new(:raw, @src.matched) +# end +# define_parser(:erb_tags, ERB_TAGS_START, '<%') +# +# end +# +# The new parser can be used like this: +# +# require 'kramdown/document' +# # require the file with the above parser class +# +# Kramdown::Document.new(input_text, :input => 'ERBKramdown').to_html +# +# source://kramdown//lib/kramdown/parser/kramdown.rb#60 +class Kramdown::Parser::Kramdown < ::Kramdown::Parser::Base + include ::Kramdown + include ::Kramdown::Parser::Html::Constants + include ::Kramdown::Parser::Html::Parser + + # Create a new Kramdown parser object with the given +options+. + # + # @return [Kramdown] a new instance of Kramdown + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#65 + def initialize(source, options); end + + # This helper methods adds the approriate attributes to the element +el+ of type +a+ or +img+ + # and the element itself to the @tree. + # + # source://kramdown//lib/kramdown/parser/kramdown/link.rb#39 + def add_link(el, href, title, alt_text = T.unsafe(nil), ial = T.unsafe(nil)); end + + # Return +true+ if we are after a block boundary. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/kramdown/block_boundary.rb#21 + def after_block_boundary?; end + + # Return +true+ if we are before a block boundary. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/kramdown/block_boundary.rb#28 + def before_block_boundary?; end + + # Correct abbreviation attributes. + # + # source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#34 + def correct_abbreviations_attributes; end + + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#96 + def handle_extension(name, opts, body, type, line_no = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/parser/kramdown/html.rb#25 + def handle_kramdown_html_tag(el, closed, handle_body); end + + # Normalize the link identifier. + # + # source://kramdown//lib/kramdown/parser/kramdown/link.rb#17 + def normalize_link_id(id); end + + # source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#56 + def paragraph_end; end + + # The source string provided on initialization is parsed into the @root element. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#88 + def parse; end + + # Parse the link definition at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#17 + def parse_abbrev_definition; end + + # Parse the string +str+ and extract all attributes and add all found attributes to the hash + # +opts+. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#18 + def parse_attribute_list(str, opts); end + + # Parse the Atx header at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/header.rb#32 + def parse_atx_header; end + + # Parse the autolink at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#19 + def parse_autolink; end + + # Parse the blank line at the current postition. + # + # source://kramdown//lib/kramdown/parser/kramdown/blank_line.rb#17 + def parse_blank_line; end + + # Parse one of the block extensions (ALD, block IAL or generic extension) at the current + # location. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#164 + def parse_block_extensions; end + + # Parse the HTML at the current position as block-level HTML. + # + # source://kramdown//lib/kramdown/parser/kramdown/html.rb#71 + def parse_block_html; end + + # Parse the math block at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/math.rb#19 + def parse_block_math; end + + # Parse the blockquote at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/blockquote.rb#21 + def parse_blockquote; end + + # Parse the indented codeblock at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#23 + def parse_codeblock; end + + # Parse the fenced codeblock at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#37 + def parse_codeblock_fenced; end + + # Parse the codespan at the current scanner location. + # + # source://kramdown//lib/kramdown/parser/kramdown/codespan.rb#17 + def parse_codespan; end + + # Parse the ordered or unordered list at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/list.rb#153 + def parse_definition_list; end + + # Parse the emphasis at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/emphasis.rb#17 + def parse_emphasis; end + + # Parse the EOB marker at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/eob.rb#17 + def parse_eob_marker; end + + # Parse the backslash-escaped character at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/escaped_chars.rb#17 + def parse_escaped_chars; end + + # Parse the generic extension at the current point. The parameter +type+ can either be :block + # or :span depending whether we parse a block or span extension tag. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#54 + def parse_extension_start_tag(type); end + + # Used for parsing the first line of a list item or a definition, i.e. the line with list item + # marker or the definition marker. + # + # source://kramdown//lib/kramdown/parser/kramdown/list.rb#32 + def parse_first_list_line(indentation, content); end + + # Parse the foot note definition at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#21 + def parse_footnote_definition; end + + # Parse the footnote marker at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#40 + def parse_footnote_marker; end + + # Parse the horizontal rule at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/horizontal_rule.rb#17 + def parse_horizontal_rule; end + + # Parse the HTML entity at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/html_entity.rb#17 + def parse_html_entity; end + + # Parse the inline math at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/math.rb#44 + def parse_inline_math; end + + # Parse the line break at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/line_break.rb#17 + def parse_line_break; end + + # Parse the link at the current scanner position. This method is used to parse normal links as + # well as image links. + # + # source://kramdown//lib/kramdown/parser/kramdown/link.rb#61 + def parse_link; end + + # Parse the link definition at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/link.rb#24 + def parse_link_definition; end + + # Parse the ordered or unordered list at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/list.rb#54 + def parse_list; end + + # Parse the paragraph at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#31 + def parse_paragraph; end + + # Parse the Setext header at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/header.rb#20 + def parse_setext_header; end + + # Parse the smart quotes at current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#158 + def parse_smart_quotes; end + + # Parse the extension span at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#192 + def parse_span_extensions; end + + # Parse the HTML at the current position as span-level HTML. + # + # source://kramdown//lib/kramdown/parser/kramdown/html.rb#102 + def parse_span_html; end + + # Parse the table at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/table.rb#25 + def parse_table; end + + # Parse the typographic symbols at the current location. + # + # source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#22 + def parse_typographic_syms; end + + # Replace the abbreviation text with elements. + # + # source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#41 + def replace_abbreviations(el, regexps = T.unsafe(nil)); end + + # Update the +ial+ with the information from the inline attribute list +opts+. + # + # source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#41 + def update_ial_with_ial(ial, opts); end + + protected + + # source://kramdown//lib/kramdown/parser/kramdown/header.rb#59 + def add_header(level, text, id); end + + # Adapt the object to allow parsing like specified in the options. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#121 + def configure_parser; end + + # Create a new block-level element, taking care of applying a preceding block IAL if it + # exists. This method should always be used for creating a block-level element! + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#305 + def new_block_el(*args); end + + # Parse all block-level elements in +text+ into the element +el+. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#140 + def parse_blocks(el, text = T.unsafe(nil)); end + + # Returns header text and optional ID. + # + # source://kramdown//lib/kramdown/parser/kramdown/header.rb#47 + def parse_header_contents; end + + # Parse all span-level elements in the source string of @src into +el+. + # + # If the parameter +stop_re+ (a regexp) is used, parsing is immediately stopped if the regexp + # matches and if no block is given or if a block is given and it returns +true+. + # + # The parameter +parsers+ can be used to specify the (span-level) parsing methods that should + # be used for parsing. + # + # The parameter +text_type+ specifies the type which should be used for created text nodes. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#214 + def parse_spans(el, stop_re = T.unsafe(nil), parsers = T.unsafe(nil), text_type = T.unsafe(nil)); end + + # Reset the current parsing environment. The parameter +env+ can be used to set initial + # values for one or more environment variables. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#253 + def reset_env(opts = T.unsafe(nil)); end + + # Restore the current parsing environment. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#268 + def restore_env(env); end + + # Return the current parsing environment. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#263 + def save_env; end + + # Create the needed span parser regexps. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#134 + def span_parser_regexps(parsers = T.unsafe(nil)); end + + # Update the given attributes hash +attr+ with the information from the inline attribute list + # +ial+ and all referenced ALDs. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#274 + def update_attr_with_ial(attr, ial); end + + # + # Update the parser specific link definitions with the data from +link_defs+ (the value of the + # :link_defs option). + # + # The parameter +link_defs+ is a hash where the keys are possibly unnormalized link IDs and + # the values are two element arrays consisting of the link target and a title (can be +nil+). + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#116 + def update_link_definitions(link_defs); end + + # Update the raw text for automatic ID generation. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#288 + def update_raw_text(item); end + + # Update the tree by parsing all :+raw_text+ elements with the span-level parser (resets the + # environment) and by updating the attributes from the IALs. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#166 + def update_tree(element); end + + private + + # precomputed patterns for indentations 1..4 and fallback expression + # to compute pattern when indentation is outside the 1..4 range. + # + # source://kramdown//lib/kramdown/parser/kramdown/list.rb#258 + def fetch_pattern(type, indentation); end + + # source://kramdown//lib/kramdown/parser/kramdown.rb#200 + def span_pattern_cache(stop_re, span_start); end + + class << self + # Add a parser method + # + # * with the given +name+, + # * using +start_re+ as start regexp + # * and, for span parsers, +span_start+ as a String that can be used in a regexp and + # which identifies the starting character(s) + # + # to the registry. The method name is automatically derived from the +name+ or can explicitly + # be set by using the +meth_name+ parameter. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#328 + def define_parser(name, start_re, span_start = T.unsafe(nil), meth_name = T.unsafe(nil)); end + + # Return +true+ if there is a parser called +name+. + # + # @return [Boolean] + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#339 + def has_parser?(name); end + + # Return the Data structure for the parser +name+. + # + # source://kramdown//lib/kramdown/parser/kramdown.rb#334 + def parser(name = T.unsafe(nil)); end + end +end + +# source://kramdown//lib/kramdown/parser/kramdown/abbreviation.rb#14 +Kramdown::Parser::Kramdown::ABBREV_DEFINITION_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#14 +Kramdown::Parser::Kramdown::ACHARS = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#140 +Kramdown::Parser::Kramdown::ALD_ANY_CHARS = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#142 +Kramdown::Parser::Kramdown::ALD_CLASS_NAME = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#139 +Kramdown::Parser::Kramdown::ALD_ID_CHARS = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#141 +Kramdown::Parser::Kramdown::ALD_ID_NAME = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#150 +Kramdown::Parser::Kramdown::ALD_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#149 +Kramdown::Parser::Kramdown::ALD_TYPE_ANY = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#144 +Kramdown::Parser::Kramdown::ALD_TYPE_CLASS_NAME = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#145 +Kramdown::Parser::Kramdown::ALD_TYPE_ID_NAME = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#146 +Kramdown::Parser::Kramdown::ALD_TYPE_ID_OR_CLASS = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#147 +Kramdown::Parser::Kramdown::ALD_TYPE_ID_OR_CLASS_MULTI = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#143 +Kramdown::Parser::Kramdown::ALD_TYPE_KEY_VALUE_PAIR = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#148 +Kramdown::Parser::Kramdown::ALD_TYPE_REF = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/header.rb#29 +Kramdown::Parser::Kramdown::ATX_HEADER_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#16 +Kramdown::Parser::Kramdown::AUTOLINK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/autolink.rb#15 +Kramdown::Parser::Kramdown::AUTOLINK_START_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/blank_line.rb#14 +Kramdown::Parser::Kramdown::BLANK_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/blockquote.rb#18 +Kramdown::Parser::Kramdown::BLOCKQUOTE_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/block_boundary.rb#18 +Kramdown::Parser::Kramdown::BLOCK_BOUNDARY = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#160 +Kramdown::Parser::Kramdown::BLOCK_EXTENSIONS_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/math.rb#16 +Kramdown::Parser::Kramdown::BLOCK_MATH_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#20 +Kramdown::Parser::Kramdown::CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#19 +Kramdown::Parser::Kramdown::CODEBLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/codespan.rb#14 +Kramdown::Parser::Kramdown::CODESPAN_DELIMITER = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#150 +Kramdown::Parser::Kramdown::DEFINITION_LIST_START = T.let(T.unsafe(nil), Regexp) + +# Struct class holding all the needed data for one block/span-level parser method. +# +# source://kramdown//lib/kramdown/parser/kramdown.rb#317 +class Kramdown::Parser::Kramdown::Data < ::Struct + # Returns the value of attribute method + # + # @return [Object] the current value of method + def method; end + + # Sets the attribute method + # + # @param value [Object] the value to set the attribute method to. + # @return [Object] the newly set value + def method=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + # Returns the value of attribute span_start + # + # @return [Object] the current value of span_start + def span_start; end + + # Sets the attribute span_start + # + # @param value [Object] the value to set the attribute span_start to. + # @return [Object] the newly set value + def span_start=(_); end + + # Returns the value of attribute start_re + # + # @return [Object] the current value of start_re + def start_re; end + + # Sets the attribute start_re + # + # @param value [Object] the value to set the attribute start_re to. + # @return [Object] the newly set value + def start_re=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# source://kramdown//lib/kramdown/parser/kramdown/emphasis.rb#14 +Kramdown::Parser::Kramdown::EMPHASIS_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/eob.rb#14 +Kramdown::Parser::Kramdown::EOB_MARKER = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/escaped_chars.rb#14 +Kramdown::Parser::Kramdown::ESCAPED_CHARS = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#154 +Kramdown::Parser::Kramdown::EXT_BLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#155 +Kramdown::Parser::Kramdown::EXT_BLOCK_STOP_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#187 +Kramdown::Parser::Kramdown::EXT_SPAN_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#153 +Kramdown::Parser::Kramdown::EXT_START_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#152 +Kramdown::Parser::Kramdown::EXT_STOP_STR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#34 +Kramdown::Parser::Kramdown::FENCED_CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/codeblock.rb#33 +Kramdown::Parser::Kramdown::FENCED_CODEBLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#18 +Kramdown::Parser::Kramdown::FOOTNOTE_DEFINITION_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/footnote.rb#37 +Kramdown::Parser::Kramdown::FOOTNOTE_MARKER_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/header.rb#44 +Kramdown::Parser::Kramdown::HEADER_ID = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/horizontal_rule.rb#14 +Kramdown::Parser::Kramdown::HR_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/html.rb#68 +Kramdown::Parser::Kramdown::HTML_BLOCK_START = T.let(T.unsafe(nil), Regexp) + +# Mapping of markdown attribute value to content model. I.e. :raw when "0", :default when "1" +# (use default content model for the HTML element), :span when "span", :block when block and +# for everything else +nil+ is returned. +# +# source://kramdown//lib/kramdown/parser/kramdown/html.rb#21 +Kramdown::Parser::Kramdown::HTML_MARKDOWN_ATTR_MAP = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/kramdown/html.rb#99 +Kramdown::Parser::Kramdown::HTML_SPAN_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#157 +Kramdown::Parser::Kramdown::IAL_BLOCK = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#158 +Kramdown::Parser::Kramdown::IAL_BLOCK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#14 +Kramdown::Parser::Kramdown::IAL_CLASS_ATTR = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#188 +Kramdown::Parser::Kramdown::IAL_SPAN_START = T.let(T.unsafe(nil), Regexp) + +# Regexp for matching indentation (one tab or four spaces) +# +# source://kramdown//lib/kramdown/parser/kramdown.rb#344 +Kramdown::Parser::Kramdown::INDENT = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/math.rb#41 +Kramdown::Parser::Kramdown::INLINE_MATH_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#24 +Kramdown::Parser::Kramdown::LAZY_END = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#20 +Kramdown::Parser::Kramdown::LAZY_END_HTML_SPAN_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#21 +Kramdown::Parser::Kramdown::LAZY_END_HTML_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#22 +Kramdown::Parser::Kramdown::LAZY_END_HTML_STOP = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/line_break.rb#14 +Kramdown::Parser::Kramdown::LINE_BREAK = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#53 +Kramdown::Parser::Kramdown::LINK_BRACKET_STOP_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#21 +Kramdown::Parser::Kramdown::LINK_DEFINITION_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#55 +Kramdown::Parser::Kramdown::LINK_INLINE_ID_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#56 +Kramdown::Parser::Kramdown::LINK_INLINE_TITLE_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#54 +Kramdown::Parser::Kramdown::LINK_PAREN_STOP_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/link.rb#57 +Kramdown::Parser::Kramdown::LINK_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#19 +Kramdown::Parser::Kramdown::LIST_ITEM_IAL = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#20 +Kramdown::Parser::Kramdown::LIST_ITEM_IAL_CHECK = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#51 +Kramdown::Parser::Kramdown::LIST_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#50 +Kramdown::Parser::Kramdown::LIST_START_OL = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#49 +Kramdown::Parser::Kramdown::LIST_START_UL = T.let(T.unsafe(nil), Regexp) + +# Regexp for matching the optional space (zero or up to three spaces) +# +# source://kramdown//lib/kramdown/parser/kramdown.rb#346 +Kramdown::Parser::Kramdown::OPT_SPACE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#28 +Kramdown::Parser::Kramdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#27 +Kramdown::Parser::Kramdown::PARAGRAPH_MATCH = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/paragraph.rb#26 +Kramdown::Parser::Kramdown::PARAGRAPH_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#22 +Kramdown::Parser::Kramdown::PARSE_FIRST_LIST_LINE_REGEXP_CACHE = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/kramdown/list.rb#47 +Kramdown::Parser::Kramdown::PATTERN_TAIL = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/header.rb#17 +Kramdown::Parser::Kramdown::SETEXT_HEADER_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#155 +Kramdown::Parser::Kramdown::SMART_QUOTES_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/extensions.rb#189 +Kramdown::Parser::Kramdown::SPAN_EXTENSIONS_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#122 +Kramdown::Parser::Kramdown::SQ_CLOSE = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#121 +Kramdown::Parser::Kramdown::SQ_PUNCT = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#124 +Kramdown::Parser::Kramdown::SQ_RULES = T.let(T.unsafe(nil), Array) + +# '" +# +# source://kramdown//lib/kramdown/parser/kramdown/smart_quotes.rb#145 +Kramdown::Parser::Kramdown::SQ_SUBSTS = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#18 +Kramdown::Parser::Kramdown::TABLE_FSEP_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#17 +Kramdown::Parser::Kramdown::TABLE_HSEP_ALIGN = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#21 +Kramdown::Parser::Kramdown::TABLE_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#20 +Kramdown::Parser::Kramdown::TABLE_PIPE_CHECK = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#19 +Kramdown::Parser::Kramdown::TABLE_ROW_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#16 +Kramdown::Parser::Kramdown::TABLE_SEP_LINE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/table.rb#22 +Kramdown::Parser::Kramdown::TABLE_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/html.rb#23 +Kramdown::Parser::Kramdown::TRAILING_WHITESPACE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#14 +Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#19 +Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/kramdown/typographic_symbol.rb#18 +Kramdown::Parser::Kramdown::TYPOGRAPHIC_SYMS_SUBST = T.let(T.unsafe(nil), Hash) + +# Used for parsing a document in Markdown format. +# +# This parser is based on the kramdown parser and removes the parser methods for the additional +# non-Markdown features. However, since some things are handled differently by the kramdown +# parser methods (like deciding when a list item contains just text), this parser differs from +# real Markdown parsers in some respects. +# +# Note, though, that the parser basically fails just one of the Markdown test cases (some others +# also fail but those failures are negligible). +# +# source://kramdown//lib/kramdown/parser/markdown.rb#25 +class Kramdown::Parser::Markdown < ::Kramdown::Parser::Kramdown + # @return [Markdown] a new instance of Markdown + # + # source://kramdown//lib/kramdown/parser/markdown.rb#32 + def initialize(source, options); end +end + +# :stopdoc: +# +# source://kramdown//lib/kramdown/parser/markdown.rb#40 +Kramdown::Parser::Markdown::BLOCK_BOUNDARY = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/markdown.rb#43 +Kramdown::Parser::Markdown::CODEBLOCK_MATCH = T.let(T.unsafe(nil), Regexp) + +# Array with all the parsing methods that should be removed from the standard kramdown parser. +# +# source://kramdown//lib/kramdown/parser/markdown.rb#28 +Kramdown::Parser::Markdown::EXTENDED = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/markdown.rb#46 +Kramdown::Parser::Markdown::IAL_RAND_CHARS = T.let(T.unsafe(nil), Array) + +# source://kramdown//lib/kramdown/parser/markdown.rb#47 +Kramdown::Parser::Markdown::IAL_RAND_STRING = T.let(T.unsafe(nil), String) + +# source://kramdown//lib/kramdown/parser/markdown.rb#49 +Kramdown::Parser::Markdown::IAL_SPAN_START = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/markdown.rb#41 +Kramdown::Parser::Markdown::LAZY_END = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/markdown.rb#48 +Kramdown::Parser::Markdown::LIST_ITEM_IAL = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/parser/markdown.rb#44 +Kramdown::Parser::Markdown::PARAGRAPH_END = T.let(T.unsafe(nil), Regexp) + +# == \Utils Module +# +# This module contains utility class/modules/methods that can be used by both parsers and +# converters. +# +# source://kramdown//lib/kramdown/utils.rb#16 +module Kramdown::Utils + class << self + # Treat +name+ as if it were snake cased (e.g. snake_case) and camelize it (e.g. SnakeCase). + # + # source://kramdown//lib/kramdown/utils.rb#26 + def camelize(name); end + + # source://kramdown//lib/kramdown/utils.rb#39 + def deep_const_get(str); end + + # Treat +name+ as if it were camelized (e.g. CamelizedName) and snake-case it (e.g. camelized_name). + # + # source://kramdown//lib/kramdown/utils.rb#31 + def snake_case(name); end + end +end + +# Methods for registering configurable extensions. +# +# source://kramdown//lib/kramdown/utils/configurable.rb#14 +module Kramdown::Utils::Configurable + # Create a new configurable extension called +name+. + # + # Three methods will be defined on the calling object which allow to use this configurable + # extension: + # + # configurables:: Returns a hash of hashes that is used to store all configurables of the + # object. + # + # (ext_name):: Return the configured extension +ext_name+. + # + # add_(ext_name, data=nil, &block):: Define an extension +ext_name+ by specifying either + # the data as argument or by using a block. + # + # source://kramdown//lib/kramdown/utils/configurable.rb#28 + def configurable(name); end +end + +# Provides convenience methods for handling named and numeric entities. +# +# source://kramdown//lib/kramdown/utils/entities.rb#15 +module Kramdown::Utils::Entities + private + + # Return the entity for the given code point or name +point_or_name+. + # + # source://kramdown//lib/kramdown/utils/entities.rb#334 + def entity(point_or_name); end + + class << self + # Return the entity for the given code point or name +point_or_name+. + # + # source://kramdown//lib/kramdown/utils/entities.rb#334 + def entity(point_or_name); end + end +end + +# Contains the mapping of code point (or name) to the actual Entity object. +# +# source://kramdown//lib/kramdown/utils/entities.rb#317 +Kramdown::Utils::Entities::ENTITY_MAP = T.let(T.unsafe(nil), Hash) + +# Array of arrays. Each sub-array specifies a code point and the associated name. +# +# This table is not used directly -- Entity objects are automatically created from it and put +# into a Hash map when this file is loaded. +# +# source://kramdown//lib/kramdown/utils/entities.rb#29 +Kramdown::Utils::Entities::ENTITY_TABLE = T.let(T.unsafe(nil), Array) + +# Represents an entity that has a +code_point+ and +name+. +# +# source://kramdown//lib/kramdown/utils/entities.rb#18 +class Kramdown::Utils::Entities::Entity < ::Struct + # Return the UTF8 representation of the entity. + # + # source://kramdown//lib/kramdown/utils/entities.rb#20 + def char; end + + # Returns the value of attribute code_point + # + # @return [Object] the current value of code_point + def code_point; end + + # Sets the attribute code_point + # + # @param value [Object] the value to set the attribute code_point to. + # @return [Object] the newly set value + def code_point=(_); end + + # Returns the value of attribute name + # + # @return [Object] the current value of name + def name; end + + # Sets the attribute name + # + # @param value [Object] the value to set the attribute name to. + # @return [Object] the newly set value + def name=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# Provides convenience methods for HTML related tasks. +# +# *Note* that this module has to be mixed into a class that has a @root (containing an element +# of type :root) and an @options (containing an options hash) instance variable so that some of +# the methods can work correctly. +# +# source://kramdown//lib/kramdown/utils/html.rb#21 +module Kramdown::Utils::Html + # Convert the entity +e+ to a string. The optional parameter +original+ may contain the + # original representation of the entity. + # + # This method uses the option +entity_output+ to determine the output form for the entity. + # + # source://kramdown//lib/kramdown/utils/html.rb#27 + def entity_to_str(e, original = T.unsafe(nil)); end + + # Escape the special HTML characters in the string +str+. The parameter +type+ specifies what + # is escaped: :all - all special HTML characters except the quotation mark as well as + # entities, :text - all special HTML characters except the quotation mark but no entities and + # :attribute - all special HTML characters including the quotation mark but no entities. + # + # source://kramdown//lib/kramdown/utils/html.rb#69 + def escape_html(str, type = T.unsafe(nil)); end + + # source://kramdown//lib/kramdown/utils/html.rb#74 + def fix_cjk_line_break(str); end + + # Return the HTML representation of the attributes +attr+. + # + # source://kramdown//lib/kramdown/utils/html.rb#44 + def html_attributes(attr); end +end + +# source://kramdown//lib/kramdown/utils/html.rb#59 +Kramdown::Utils::Html::ESCAPE_ALL_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/utils/html.rb#61 +Kramdown::Utils::Html::ESCAPE_ATTRIBUTE_RE = T.let(T.unsafe(nil), Regexp) + +# :stopdoc: +# +# source://kramdown//lib/kramdown/utils/html.rb#53 +Kramdown::Utils::Html::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/utils/html.rb#62 +Kramdown::Utils::Html::ESCAPE_RE_FROM_TYPE = T.let(T.unsafe(nil), Hash) + +# source://kramdown//lib/kramdown/utils/html.rb#60 +Kramdown::Utils::Html::ESCAPE_TEXT_RE = T.let(T.unsafe(nil), Regexp) + +# source://kramdown//lib/kramdown/utils/html.rb#73 +Kramdown::Utils::Html::REDUNDANT_LINE_BREAK_REGEX = T.let(T.unsafe(nil), Regexp) + +# A simple least recently used (LRU) cache. +# +# The cache relies on the fact that Ruby's Hash class maintains insertion order. So deleting +# and re-inserting a key-value pair on access moves the key to the last position. When an +# entry is added and the cache is full, the first entry is removed. +# +# source://kramdown//lib/kramdown/utils/lru_cache.rb#18 +class Kramdown::Utils::LRUCache + # Creates a new LRUCache that can hold +size+ entries. + # + # @return [LRUCache] a new instance of LRUCache + # + # source://kramdown//lib/kramdown/utils/lru_cache.rb#21 + def initialize(size); end + + # Returns the stored value for +key+ or +nil+ if no value was stored under the key. + # + # source://kramdown//lib/kramdown/utils/lru_cache.rb#27 + def [](key); end + + # Stores the +value+ under the +key+. + # + # source://kramdown//lib/kramdown/utils/lru_cache.rb#32 + def []=(key, value); end +end + +# This patched StringScanner adds line number information for current scan position and a +# start_line_number override for nested StringScanners. +# +# source://kramdown//lib/kramdown/utils/string_scanner.rb#17 +class Kramdown::Utils::StringScanner < ::StringScanner + # Takes the start line number as optional second argument. + # + # Note: The original second argument is no longer used so this should be safe. + # + # @return [StringScanner] a new instance of StringScanner + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#26 + def initialize(string, start_line_number = T.unsafe(nil)); end + + # Returns the line number for current charpos. + # + # NOTE: Requires that all line endings are normalized to '\n' + # + # NOTE: Normally we'd have to add one to the count of newlines to get the correct line number. + # However we add the one indirectly by using a one-based start_line_number. + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#67 + def current_line_number; end + + # Sets the byte position of the scan pointer. + # + # Note: This also resets some internal variables, so always use pos= when setting the position + # and don't use any other method for that! + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#37 + def pos=(pos); end + + # Revert the position to one saved by #save_pos. + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#56 + def revert_pos(data); end + + # Return information needed to revert the byte position of the string scanner in a performant + # way. + # + # The returned data can be fed to #revert_pos to revert the position to the saved one. + # + # Note: Just saving #pos won't be enough. + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#51 + def save_pos; end + + # The start line number. Used for nested StringScanners that scan a sub-string of the source + # document. The kramdown parser uses this, e.g., for span level parsers. + # + # source://kramdown//lib/kramdown/utils/string_scanner.rb#21 + def start_line_number; end +end + +# The kramdown version. +# +# source://kramdown//lib/kramdown/version.rb#13 +Kramdown::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/minitest@5.17.0.rbi b/sorbet/rbi/gems/minitest@5.17.0.rbi new file mode 100644 index 0000000..a63662f --- /dev/null +++ b/sorbet/rbi/gems/minitest@5.17.0.rbi @@ -0,0 +1,1458 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `minitest` gem. +# Please instead update this file by running `bin/tapioca gem minitest`. + + +# :include: README.rdoc +# +# source://minitest//lib/minitest/parallel.rb#1 +module Minitest + class << self + # Internal run method. Responsible for telling all Runnable + # sub-classes to run. + # + # source://minitest//lib/minitest.rb#173 + def __run(reporter, options); end + + # A simple hook allowing you to run a block of code after everything + # is done running. Eg: + # + # Minitest.after_run { p $debugging_info } + # + # source://minitest//lib/minitest.rb#94 + def after_run(&block); end + + # Registers Minitest to run at process exit + # + # source://minitest//lib/minitest.rb#66 + def autorun; end + + # source://minitest//lib/minitest.rb#19 + def backtrace_filter; end + + # source://minitest//lib/minitest.rb#19 + def backtrace_filter=(_arg0); end + + # source://minitest//lib/minitest.rb#18 + def cattr_accessor(name); end + + # source://minitest//lib/minitest.rb#1059 + def clock_time; end + + # source://minitest//lib/minitest.rb#19 + def extensions; end + + # source://minitest//lib/minitest.rb#19 + def extensions=(_arg0); end + + # source://minitest//lib/minitest.rb#264 + def filter_backtrace(bt); end + + # source://minitest//lib/minitest.rb#19 + def info_signal; end + + # source://minitest//lib/minitest.rb#19 + def info_signal=(_arg0); end + + # source://minitest//lib/minitest.rb#98 + def init_plugins(options); end + + # source://minitest//lib/minitest.rb#105 + def load_plugins; end + + # source://minitest//lib/minitest.rb#19 + def parallel_executor; end + + # source://minitest//lib/minitest.rb#19 + def parallel_executor=(_arg0); end + + # source://minitest//lib/minitest.rb#186 + def process_args(args = T.unsafe(nil)); end + + # source://minitest//lib/minitest.rb#19 + def reporter; end + + # source://minitest//lib/minitest.rb#19 + def reporter=(_arg0); end + + # This is the top-level run method. Everything starts from here. It + # tells each Runnable sub-class to run, and each of those are + # responsible for doing whatever they do. + # + # The overall structure of a run looks like this: + # + # Minitest.autorun + # Minitest.run(args) + # Minitest.__run(reporter, options) + # Runnable.runnables.each + # runnable.run(reporter, options) + # self.runnable_methods.each + # self.run_one_method(self, runnable_method, reporter) + # Minitest.run_one_method(klass, runnable_method) + # klass.new(runnable_method).run + # + # source://minitest//lib/minitest.rb#140 + def run(args = T.unsafe(nil)); end + + # source://minitest//lib/minitest.rb#1050 + def run_one_method(klass, method_name); end + + # source://minitest//lib/minitest.rb#19 + def seed; end + + # source://minitest//lib/minitest.rb#19 + def seed=(_arg0); end + end +end + +# Defines the API for Reporters. Subclass this and override whatever +# you want. Go nuts. +# +# source://minitest//lib/minitest.rb#578 +class Minitest::AbstractReporter + include ::Mutex_m + + # source://mutex_m/0.1.2/mutex_m.rb#93 + def lock; end + + # source://mutex_m/0.1.2/mutex_m.rb#83 + def locked?; end + + # Did this run pass? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#612 + 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 + def prerecord(klass, name); end + + # Output and record the result of the test. Call + # {result#result_code}[rdoc-ref:Runnable#result_code] to get the + # result character string. Stores the result of the run if the run + # did not pass. + # + # source://minitest//lib/minitest.rb#600 + def record(result); end + + # Outputs the summary of the run. + # + # source://minitest//lib/minitest.rb#606 + def report; end + + # Starts reporting on the run. + # + # source://minitest//lib/minitest.rb#584 + def start; end + + # source://mutex_m/0.1.2/mutex_m.rb#78 + def synchronize(&block); end + + # source://mutex_m/0.1.2/mutex_m.rb#88 + def try_lock; end + + # source://mutex_m/0.1.2/mutex_m.rb#98 + def unlock; end +end + +# Represents run failures. +# +# source://minitest//lib/minitest.rb#895 +class Minitest::Assertion < ::Exception + # source://minitest//lib/minitest.rb#896 + def error; end + + # Where was this run before an assertion was raised? + # + # source://minitest//lib/minitest.rb#903 + def location; end + + # source://minitest//lib/minitest.rb#912 + def result_code; end + + # source://minitest//lib/minitest.rb#916 + def result_label; end +end + +# Minitest Assertions. All assertion methods accept a +msg+ which is +# printed if the assertion fails. +# +# Protocol: Nearly everything here boils up to +assert+, which +# expects to be able to increment an instance accessor named +# +assertions+. This is not provided by Assertions and must be +# provided by the thing including Assertions. See Minitest::Runnable +# for an example. +# +# source://minitest//lib/minitest/assertions.rb#18 +module Minitest::Assertions + # source://minitest//lib/minitest/assertions.rb#188 + def _synchronize; end + + # Fails unless +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#178 + def assert(test, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#195 + def assert_empty(obj, msg = T.unsafe(nil)); end + + # Fails unless exp == act printing the difference between + # the two, if possible. + # + # If there is no visible difference but the assertion fails, you + # should suspect that your #== is buggy, or your inspect output is + # missing crucial details. For nicer structural diffing, set + # Minitest::Test.make_my_diffs_pretty! + # + # For floats use assert_in_delta. + # + # See also: Minitest::Assertions.diff + # + # source://minitest//lib/minitest/assertions.rb#216 + def assert_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ + # of each other. + # + # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 + # + # source://minitest//lib/minitest/assertions.rb#240 + def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ have a relative + # error less than +epsilon+. + # + # source://minitest//lib/minitest/assertions.rb#252 + def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails unless +collection+ includes +obj+. + # + # source://minitest//lib/minitest/assertions.rb#259 + def assert_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is an instance of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#270 + def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is a kind of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#281 + def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#291 + def assert_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is nil + # + # source://minitest//lib/minitest/assertions.rb#303 + def assert_nil(obj, msg = T.unsafe(nil)); end + + # For testing with binary operators. Eg: + # + # assert_operator 5, :<=, 4 + # + # source://minitest//lib/minitest/assertions.rb#313 + def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if stdout or stderr do not output the expected results. + # Pass in nil if you don't care about that streams output. Pass in + # "" if you require it to be silent. Pass in a regexp if you want + # to pattern match. + # + # assert_output(/hey/) { method_with_output } + # + # NOTE: this uses #capture_io, not #capture_subprocess_io. + # + # See also: #assert_silent + # + # source://minitest//lib/minitest/assertions.rb#331 + def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end + + # Fails unless +path+ exists. + # + # source://minitest//lib/minitest/assertions.rb#355 + def assert_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with predicates. Eg: + # + # assert_predicate str, :empty? + # + # This is really meant for specs and is front-ended by assert_operator: + # + # str.must_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#369 + def assert_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails unless the block raises one of +exp+. Returns the + # exception matched so you can check the message, attributes, etc. + # + # +exp+ takes an optional message on the end to help explain + # failures and defaults to StandardError if no exception class is + # passed. Eg: + # + # assert_raises(CustomError) { method_with_custom_error } + # + # With custom error message: + # + # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error } + # + # Using the returned object: + # + # error = assert_raises(CustomError) do + # raise CustomError, 'This is really bad' + # end + # + # assert_equal 'This is really bad', error.message + # + # source://minitest//lib/minitest/assertions.rb#396 + def assert_raises(*exp); end + + # Fails unless +obj+ responds to +meth+. + # + # source://minitest//lib/minitest/assertions.rb#427 + 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 + 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 + 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 + def assert_silent; end + + # Fails unless the block throws +sym+ + # + # source://minitest//lib/minitest/assertions.rb#475 + def assert_throws(sym, msg = T.unsafe(nil)); end + + # Captures $stdout and $stderr into strings: + # + # out, err = capture_io do + # puts "Some info" + # warn "You did a bad thing" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: For efficiency, this method uses StringIO and does not + # capture IO for subprocesses. Use #capture_subprocess_io for + # that. + # + # source://minitest//lib/minitest/assertions.rb#516 + def capture_io; end + + # Captures $stdout and $stderr into strings, using Tempfile to + # ensure that subprocess IO is captured as well. + # + # out, err = capture_subprocess_io do + # system "echo Some info" + # system "echo You did a bad thing 1>&2" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # 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 + def capture_subprocess_io; end + + # Returns a diff between +exp+ and +act+. If there is no known + # diff command or if it doesn't make sense to diff the output + # (single line, short output), then it simply returns a basic + # comparison between the two. + # + # See +things_to_diff+ for more info. + # + # source://minitest//lib/minitest/assertions.rb#59 + def diff(exp, act); end + + # Returns details for exception +e+ + # + # source://minitest//lib/minitest/assertions.rb#581 + 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 + def fail_after(y, m, d, msg); end + + # Fails with +msg+. + # + # source://minitest//lib/minitest/assertions.rb#604 + 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 + def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end + + # This returns a human-readable version of +obj+. By default + # #inspect is called. You can override this to use #pretty_inspect + # if you want. + # + # See Minitest::Test.make_my_diffs_pretty! + # + # source://minitest//lib/minitest/assertions.rb#129 + def mu_pp(obj); end + + # This returns a diff-able more human-readable version of +obj+. + # This differs from the regular mu_pp because it expands escaped + # newlines and makes hex-values (like object_ids) generic. This + # uses mu_pp to do the first pass and then cleans it up. + # + # source://minitest//lib/minitest/assertions.rb#152 + def mu_pp_for_diff(obj); end + + # used for counting assertions + # + # source://minitest//lib/minitest/assertions.rb#623 + def pass(_msg = T.unsafe(nil)); end + + # Fails if +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#630 + def refute(test, msg = T.unsafe(nil)); end + + # Fails if +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#638 + 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 + 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 + 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 + 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 + 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 + 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 + def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#709 + def refute_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is nil. + # + # source://minitest//lib/minitest/assertions.rb#719 + def refute_nil(obj, msg = T.unsafe(nil)); end + + # Fails if +o1+ is not +op+ +o2+. Eg: + # + # refute_operator 1, :>, 2 #=> pass + # refute_operator 1, :<, 2 #=> fail + # + # source://minitest//lib/minitest/assertions.rb#730 + 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 + def refute_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with predicates. + # + # refute_predicate str, :empty? + # + # This is really meant for specs and is front-ended by refute_operator: + # + # str.wont_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#753 + 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 + 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 + def refute_same(exp, act, msg = T.unsafe(nil)); end + + # Skips the current run. If run in verbose-mode, the skipped run + # gets listed at the end of the run but doesn't cause a failure + # exit code. + # + # @raise [Minitest::Skip] + # + # source://minitest//lib/minitest/assertions.rb#783 + def skip(msg = T.unsafe(nil), bt = T.unsafe(nil)); end + + # Skips the current run until a given date (in the local time + # zone). This allows you to put some fixes on hold until a later + # date, but still holds you accountable and prevents you from + # forgetting it. + # + # source://minitest//lib/minitest/assertions.rb#795 + def skip_until(y, m, d, msg); end + + # Was this testcase skipped? Meant for #teardown. + # + # @return [Boolean] + # + # source://minitest//lib/minitest/assertions.rb#804 + def skipped?; end + + # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. + # + # Criterion: + # + # 1. Strings include newlines or escaped newlines, but not both. + # 2. or: String lengths are > 30 characters. + # 3. or: Strings are equal to each other (but maybe different encodings?). + # 4. and: we found a diff executable. + # + # source://minitest//lib/minitest/assertions.rb#104 + def things_to_diff(exp, act); end + + class << self + # Returns the diff command to use in #diff. Tries to intelligently + # figure out what diff to use. + # + # source://minitest//lib/minitest/assertions.rb#29 + def diff; end + + # Set the diff command to use in #diff. + # + # source://minitest//lib/minitest/assertions.rb#47 + def diff=(o); end + end +end + +# source://minitest//lib/minitest/assertions.rb#201 +Minitest::Assertions::E = T.let(T.unsafe(nil), String) + +# source://minitest//lib/minitest/assertions.rb#19 +Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) + +# The standard backtrace filter for minitest. +# +# See Minitest.backtrace_filter=. +# +# source://minitest//lib/minitest.rb#1027 +class Minitest::BacktraceFilter + # Filter +bt+ to something useful. Returns the whole thing if + # $DEBUG (ruby) or $MT_DEBUG (env). + # + # source://minitest//lib/minitest.rb#1035 + def filter(bt); end +end + +# source://minitest//lib/minitest.rb#1029 +Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) + +# Dispatch to multiple reporters as one. +# +# source://minitest//lib/minitest.rb#844 +class Minitest::CompositeReporter < ::Minitest::AbstractReporter + # @return [CompositeReporter] a new instance of CompositeReporter + # + # source://minitest//lib/minitest.rb#850 + def initialize(*reporters); end + + # Add another reporter to the mix. + # + # source://minitest//lib/minitest.rb#862 + def <<(reporter); end + + # source://minitest//lib/minitest.rb#855 + def io; end + + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#866 + def passed?; end + + # source://minitest//lib/minitest.rb#874 + def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#881 + def record(result); end + + # source://minitest//lib/minitest.rb#887 + def report; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#848 + def reporters; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#848 + def reporters=(_arg0); end + + # source://minitest//lib/minitest.rb#870 + def start; end +end + +# Provides a simple set of guards that you can use in your tests +# to skip execution if it is not applicable. These methods are +# mixed into Test as both instance and class methods so you +# can use them inside or outside of the test methods. +# +# def test_something_for_mri +# skip "bug 1234" if jruby? +# # ... +# end +# +# if windows? then +# # ... lots of test methods ... +# end +# +# source://minitest//lib/minitest.rb#971 +module Minitest::Guard + # Is this running on jruby? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#976 + def jruby?(platform = T.unsafe(nil)); end + + # Is this running on maglev? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#983 + def maglev?(platform = T.unsafe(nil)); end + + # Is this running on mri? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#993 + def mri?(platform = T.unsafe(nil)); end + + # Is this running on macOS? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1000 + def osx?(platform = T.unsafe(nil)); end + + # Is this running on rubinius? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1007 + def rubinius?(platform = T.unsafe(nil)); end + + # Is this running on windows? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1017 + def windows?(platform = T.unsafe(nil)); end +end + +# source://minitest//lib/minitest/parallel.rb#2 +module Minitest::Parallel; end + +# The engine used to run multiple tests in parallel. +# +# source://minitest//lib/minitest/parallel.rb#7 +class Minitest::Parallel::Executor + # Create a parallel test executor of with +size+ workers. + # + # @return [Executor] a new instance of Executor + # + # source://minitest//lib/minitest/parallel.rb#17 + def initialize(size); end + + # Add a job to the queue + # + # source://minitest//lib/minitest/parallel.rb#43 + def <<(work); end + + # Shuts down the pool of workers by signalling them to quit and + # waiting for them all to finish what they're currently working + # on. + # + # source://minitest//lib/minitest/parallel.rb#50 + def shutdown; end + + # The size of the pool of workers. + # + # source://minitest//lib/minitest/parallel.rb#12 + def size; end + + # Start the executor + # + # source://minitest//lib/minitest/parallel.rb#26 + def start; end +end + +# source://minitest//lib/minitest/parallel.rb#56 +module Minitest::Parallel::Test + # source://minitest//lib/minitest/parallel.rb#57 + def _synchronize; end +end + +# source://minitest//lib/minitest/parallel.rb#59 +module Minitest::Parallel::Test::ClassMethods + # source://minitest//lib/minitest/parallel.rb#60 + def run_one_method(klass, method_name, reporter); end + + # source://minitest//lib/minitest/parallel.rb#64 + def test_order; end +end + +# A very simple reporter that prints the "dots" during the run. +# +# This is added to the top-level CompositeReporter at the start of +# the run. If you want to change the output of minitest via a +# plugin, pull this out of the composite and replace it with your +# own. +# +# source://minitest//lib/minitest.rb#643 +class Minitest::ProgressReporter < ::Minitest::Reporter + # source://minitest//lib/minitest.rb#644 + def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#651 + 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 +module Minitest::Reportable + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#495 + def class_name; end + + # Did this run error? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#516 + def error?; end + + # The location identifier of this test. Depends on a method + # existing called class_name. + # + # source://minitest//lib/minitest.rb#490 + def location; end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#482 + def passed?; end + + # Returns ".", "F", or "E" based on the result of the run. + # + # source://minitest//lib/minitest.rb#502 + def result_code; end + + # Was this run skipped? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#509 + def skipped?; end +end + +# source://minitest//lib/minitest.rb#619 +class Minitest::Reporter < ::Minitest::AbstractReporter + # @return [Reporter] a new instance of Reporter + # + # source://minitest//lib/minitest.rb#628 + def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end + + # The IO used to report. + # + # source://minitest//lib/minitest.rb#621 + def io; end + + # The IO used to report. + # + # source://minitest//lib/minitest.rb#621 + def io=(_arg0); end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#626 + def options; end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#626 + def options=(_arg0); end +end + +# This represents a test result in a clean way that can be +# marshalled over a wire. Tests can do anything they want to the +# test instance and can create conditions that cause Marshal.dump to +# 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 +class Minitest::Result < ::Minitest::Runnable + include ::Minitest::Reportable + + # source://minitest//lib/minitest.rb#561 + def class_name; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#537 + def klass; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#537 + def klass=(_arg0); end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#542 + def source_location; end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#542 + def source_location=(_arg0); end + + # source://minitest//lib/minitest.rb#565 + def to_s; end + + class << self + # Create a new test result from a Runnable instance. + # + # source://minitest//lib/minitest.rb#547 + def from(runnable); end + end +end + +# re-open +# +# source://minitest//lib/minitest.rb#277 +class Minitest::Runnable + # @return [Runnable] a new instance of Runnable + # + # source://minitest//lib/minitest.rb#431 + def initialize(name); end + + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#281 + def assertions; end + + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#281 + def assertions=(_arg0); end + + # source://minitest//lib/minitest.rb#427 + def failure; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#286 + def failures; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#286 + def failures=(_arg0); end + + # source://minitest//lib/minitest.rb#413 + def marshal_dump; end + + # source://minitest//lib/minitest.rb#423 + def marshal_load(ary); end + + # Name of the run. + # + # source://minitest//lib/minitest.rb#304 + def name; end + + # Set the name of the run. + # + # source://minitest//lib/minitest.rb#311 + def name=(o); end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#450 + def passed?; end + + # Returns a single character string to print based on the result + # of the run. One of ".", "F", + # "E" or "S". + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#459 + def result_code; end + + # Runs a single method. Needs to return self. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#440 + def run; end + + # Was this run skipped? See #passed? for more information. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#466 + def skipped?; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#291 + def time; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#291 + def time=(_arg0); end + + # source://minitest//lib/minitest.rb#293 + def time_it; end + + class << self + # source://minitest//lib/minitest.rb#1069 + def inherited(klass); end + + # Returns all instance methods matching the pattern +re+. + # + # source://minitest//lib/minitest.rb#318 + def methods_matching(re); end + + # source://minitest//lib/minitest.rb#383 + def on_signal(name, action); end + + # source://minitest//lib/minitest.rb#322 + 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 + def run(reporter, options = T.unsafe(nil)); end + + # Runs a single method and has the reporter record the result. + # This was considered internal API but is factored out of run so + # that subclasses can specialize the running of an individual + # test. See Minitest::ParallelTest::ClassMethods for an example. + # + # source://minitest//lib/minitest.rb#363 + def run_one_method(klass, method_name, reporter); end + + # Each subclass of Runnable is responsible for overriding this + # method to return all runnable methods. See #methods_matching. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#400 + def runnable_methods; end + + # Returns all subclasses of Runnable. + # + # source://minitest//lib/minitest.rb#407 + def runnables; end + + # source://minitest//lib/minitest.rb#368 + def with_info_handler(reporter, &block); end + end +end + +# source://minitest//lib/minitest.rb#381 +Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) + +# Assertion raised when skipping a run. +# +# source://minitest//lib/minitest.rb#924 +class Minitest::Skip < ::Minitest::Assertion + # source://minitest//lib/minitest.rb#925 + def result_label; end +end + +# A reporter that gathers statistics about a test run. Does not do +# any IO because meant to be used as a parent class for a reporter +# that does. +# +# If you want to create an entirely different type of output (eg, +# CI, HTML, etc), this is the place to start. +# +# Example: +# +# class JenkinsCIReporter < StatisticsReporter +# def report +# super # Needed to calculate some statistics +# +# print " + # + #

first

+ #

second

+ # + # + # eohtml + # assert_equal('second', doc.html.body.p[1].text) + # + # source://nokogiri//lib/nokogiri.rb#83 + def Slop(*args, &block); end + + # Parse XML. Convenience method for Nokogiri::XML::Document.parse + # + # source://nokogiri//lib/nokogiri/xml.rb#7 + def XML(thing, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Create a Nokogiri::XSLT::Stylesheet with +stylesheet+. + # + # Example: + # + # xslt = Nokogiri::XSLT(File.read(ARGV[0])) + # + # source://nokogiri//lib/nokogiri/xslt.rb#13 + def XSLT(stylesheet, modules = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri.rb#88 + def install_default_aliases; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#205 + def jruby?; end + + # source://nokogiri//lib/nokogiri/version/info.rb#210 + def libxml2_patches; end + + # Create a new Nokogiri::XML::DocumentFragment + # + # source://nokogiri//lib/nokogiri.rb#60 + def make(input = T.unsafe(nil), opts = T.unsafe(nil), &blk); end + + # Parse an HTML or XML document. +string+ contains the document. + # + # source://nokogiri//lib/nokogiri.rb#42 + def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#200 + def uses_gumbo?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#192 + def uses_libxml?(requirement = T.unsafe(nil)); end + end +end + +# Translate a CSS selector into an XPath 1.0 query +# +# source://nokogiri//lib/nokogiri/css.rb#6 +module Nokogiri::CSS + class << self + # TODO: Deprecate this method ahead of 2.0 and delete it in 2.0. + # It is not used by Nokogiri and shouldn't be part of the public API. + # + # source://nokogiri//lib/nokogiri/css.rb#10 + def parse(selector); end + + # :call-seq: + # xpath_for(selector) → String + # xpath_for(selector [, prefix:] [, visitor:] [, ns:]) → String + # + # Translate a CSS selector to the equivalent XPath query. + # + # [Parameters] + # - +selector+ (String) The CSS selector to be translated into XPath + # + # - +prefix:+ (String) + # + # The XPath prefix for the query, see Nokogiri::XML::XPath for some options. Default is + # +XML::XPath::GLOBAL_SEARCH_PREFIX+. + # + # - +visitor:+ (Nokogiri::CSS::XPathVisitor) + # + # The visitor class to use to transform the AST into XPath. Default is + # +Nokogiri::CSS::XPathVisitor.new+. + # + # - +ns:+ (Hash) + # + # The namespaces that are referenced in the query, if any. This is a hash where the keys are + # the namespace prefix and the values are the namespace URIs. Default is an empty Hash. + # + # [Returns] (String) The equivalent XPath query for +selector+ + # + # 💡 Note that translated queries are cached for performance concerns. + # + # @raise [TypeError] + # + # source://nokogiri//lib/nokogiri/css.rb#42 + def xpath_for(selector, options = T.unsafe(nil)); end + end +end + +# source://nokogiri//lib/nokogiri/css/node.rb#5 +class Nokogiri::CSS::Node + # Create a new Node with +type+ and +value+ + # + # @return [Node] a new instance of Node + # + # source://nokogiri//lib/nokogiri/css/node.rb#14 + def initialize(type, value); end + + # Accept +visitor+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#20 + def accept(visitor); end + + # Find a node by type using +types+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#32 + def find_by_type(types); end + + # Convert to array + # + # source://nokogiri//lib/nokogiri/css/node.rb#49 + def to_a; end + + # Convert to_type + # + # source://nokogiri//lib/nokogiri/css/node.rb#42 + def to_type; end + + # Convert this CSS node to xpath with +prefix+ using +visitor+ + # + # source://nokogiri//lib/nokogiri/css/node.rb#26 + def to_xpath(prefix, visitor); end + + # Get the type of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#9 + def type; end + + # Get the type of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#9 + def type=(_arg0); end + + # Get the value of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#11 + def value; end + + # Get the value of this node + # + # source://nokogiri//lib/nokogiri/css/node.rb#11 + def value=(_arg0); end +end + +# source://nokogiri//lib/nokogiri/css/node.rb#6 +Nokogiri::CSS::Node::ALLOW_COMBINATOR_ON_SELF = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/parser_extras.rb#7 +class Nokogiri::CSS::Parser < ::Racc::Parser + # Create a new CSS parser with respect to +namespaces+ + # + # @return [Parser] a new instance of Parser + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#60 + def initialize(namespaces = T.unsafe(nil)); end + + # reduce 0 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#361 + def _reduce_1(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#407 + def _reduce_10(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#412 + def _reduce_11(val, _values, result); end + + # reduce 12 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#424 + def _reduce_13(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#429 + def _reduce_14(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#434 + def _reduce_15(val, _values, result); end + + # reduce 16 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#441 + def _reduce_17(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#446 + def _reduce_18(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#451 + def _reduce_19(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#367 + def _reduce_2(val, _values, result); end + + # reduce 20 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#458 + def _reduce_21(val, _values, result); end + + # reduce 22 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#465 + def _reduce_23(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#470 + def _reduce_24(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#475 + def _reduce_25(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#482 + def _reduce_26(val, _values, result); end + + # reduce 27 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#489 + def _reduce_28(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#495 + def _reduce_29(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#372 + def _reduce_3(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#501 + def _reduce_30(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#507 + def _reduce_31(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#512 + def _reduce_32(val, _values, result); end + + # reduce 33 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#519 + def _reduce_34(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#525 + def _reduce_35(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#531 + def _reduce_36(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#537 + def _reduce_37(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#543 + def _reduce_38(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#549 + def _reduce_39(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#377 + def _reduce_4(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#554 + def _reduce_40(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#559 + def _reduce_41(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#564 + def _reduce_42(val, _values, result); end + + # reduce 44 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#573 + def _reduce_45(val, _values, result); end + + # reduce 46 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#590 + def _reduce_47(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#600 + def _reduce_48(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#616 + def _reduce_49(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#382 + def _reduce_5(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#636 + def _reduce_50(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#642 + def _reduce_51(val, _values, result); end + + # reduce 53 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#651 + def _reduce_54(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#657 + def _reduce_55(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#663 + def _reduce_56(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#669 + def _reduce_57(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#675 + def _reduce_58(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#387 + def _reduce_6(val, _values, result); end + + # reduce 63 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#691 + def _reduce_64(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#696 + def _reduce_65(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#701 + def _reduce_66(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#706 + def _reduce_67(val, _values, result); end + + # reduce 68 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#713 + def _reduce_69(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#392 + def _reduce_7(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#718 + def _reduce_70(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#723 + def _reduce_71(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#728 + def _reduce_72(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#733 + def _reduce_73(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#738 + def _reduce_74(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#743 + def _reduce_75(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#748 + def _reduce_76(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#397 + def _reduce_8(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#402 + def _reduce_9(val, _values, result); end + + # reduce 81 omitted + # + # source://nokogiri//lib/nokogiri/css/parser.rb#764 + def _reduce_none(val, _values, result); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#89 + def cache_key(query, prefix, visitor); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#71 + def next_token; end + + # On CSS parser error, raise an exception + # + # @raise [SyntaxError] + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#84 + def on_error(error_token_id, error_value, value_stack); end + + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#66 + def parse(string); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#26 + def unescape_css_identifier(identifier); end + + # source://nokogiri//lib/nokogiri/css/parser.rb#30 + def unescape_css_string(str); end + + # Get the xpath for +string+ using +options+ + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#76 + def xpath_for(string, prefix, visitor); end + + class << self + # Get the css selector in +string+ from the cache + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#25 + def [](string); end + + # Set the css selector in +string+ in the cache to +value+ + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#32 + def []=(string, value); end + + # Return a thread-local boolean indicating whether the CSS-to-XPath cache is active. (Default is `true`.) + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#15 + def cache_on?; end + + # Clear the cache + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#39 + def clear_cache(create_new_object = T.unsafe(nil)); end + + # Set a thread-local boolean to turn cacheing on and off. Truthy values turn the cache on, falsey values turn the cache off. + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#20 + def set_cache(value); end + + # Execute +block+ without cache + # + # source://nokogiri//lib/nokogiri/css/parser_extras.rb#50 + def without_cache(&block); end + end +end + +# source://nokogiri//lib/nokogiri/css/parser_extras.rb#8 +Nokogiri::CSS::Parser::CACHE_SWITCH_NAME = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/parser.rb#279 +Nokogiri::CSS::Parser::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/parser.rb#355 +Nokogiri::CSS::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://nokogiri//lib/nokogiri/css/parser.rb#295 +Nokogiri::CSS::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/css/syntax_error.rb#6 +class Nokogiri::CSS::SyntaxError < ::Nokogiri::SyntaxError; end + +# source://nokogiri//lib/nokogiri/css/tokenizer.rb#11 +class Nokogiri::CSS::Tokenizer + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#57 + def _next_token; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#26 + def action; end + + # Returns the value of attribute filename. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#17 + def filename; end + + # Returns the value of attribute lineno. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#16 + def lineno; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#36 + def load_file(filename); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#49 + def next_token; end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30 + def scan(str); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#43 + def scan_file(filename); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#20 + def scan_setup(str); end + + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#30 + def scan_str(str); end + + # Returns the value of attribute state. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + def state; end + + # Sets the attribute state + # + # @param value the value to set the attribute state to. + # + # source://nokogiri//lib/nokogiri/css/tokenizer.rb#18 + def state=(_arg0); end +end + +# source://nokogiri//lib/nokogiri/css/tokenizer.rb#14 +class Nokogiri::CSS::Tokenizer::ScanError < ::StandardError; end + +# When translating CSS selectors to XPath queries with Nokogiri::CSS.xpath_for, the XPathVisitor +# class allows for changing some of the behaviors related to builtin xpath functions and quirks +# of HTML5. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#9 +class Nokogiri::CSS::XPathVisitor + # :call-seq: + # new() → XPathVisitor + # new(builtins:, doctype:) → XPathVisitor + # + # [Parameters] + # - +builtins:+ (BuiltinsConfig) Determine when to use Nokogiri's built-in xpath functions for performance improvements. + # - +doctype:+ (DoctypeConfig) Make document-type-specific accommodations for CSS queries. + # + # [Returns] XPathVisitor + # + # @return [XPathVisitor] a new instance of XPathVisitor + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#57 + def initialize(builtins: T.unsafe(nil), doctype: T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#267 + def accept(node); end + + # :call-seq: config() → Hash + # + # [Returns] + # a Hash representing the configuration of the XPathVisitor, suitable for use as + # part of the CSS cache key. + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#74 + def config; end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#263 + def visit_attrib_name(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#154 + def visit_attribute_condition(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_child_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#215 + def visit_class_condition(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#219 + def visit_combinator(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#240 + def visit_conditional_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_descendant_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_direct_adjacent_selector(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#245 + def visit_element_name(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#234 + def visit_following_selector(node); end + + # :stopdoc: + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#79 + def visit_function(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#149 + def visit_id(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#140 + def visit_not(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#190 + def visit_pseudo_class(node); end + + private + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#328 + def css_class(hay, needle); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#273 + def html5_element_name_needs_namespace_handling(node); end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#318 + def is_of_type_pseudo_class?(node); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#280 + def nth(node, options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#304 + def read_a_and_positive_b(values); end +end + +# Enum to direct XPathVisitor when to use Nokogiri builtin XPath functions. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#13 +module Nokogiri::CSS::XPathVisitor::BuiltinsConfig; end + +# Always use Nokogiri builtin functions whenever possible. This is probably only useful for testing. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#19 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::ALWAYS = T.let(T.unsafe(nil), Symbol) + +# Never use Nokogiri builtin functions, always generate vanilla XPath 1.0 queries. This is +# the default when calling Nokogiri::CSS.xpath_for directly. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#16 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::NEVER = T.let(T.unsafe(nil), Symbol) + +# Only use Nokogiri builtin functions when they will be faster than vanilla XPath. This is +# the behavior chosen when searching for CSS selectors on a Nokogiri document, fragment, or +# node. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#24 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::OPTIMAL = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#27 +Nokogiri::CSS::XPathVisitor::BuiltinsConfig::VALUES = T.let(T.unsafe(nil), Array) + +# Enum to direct XPathVisitor when to tweak the XPath query to suit the nature of the document +# being searched. Note that searches for CSS selectors from a Nokogiri document, fragment, or +# node will choose the correct option automatically. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#33 +module Nokogiri::CSS::XPathVisitor::DoctypeConfig; end + +# The document being searched is an HTML4 document. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#38 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML4 = T.let(T.unsafe(nil), Symbol) + +# The document being searched is an HTML5 document. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#41 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::HTML5 = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#44 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::VALUES = T.let(T.unsafe(nil), Array) + +# The document being searched is an XML document. This is the default. +# +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#35 +Nokogiri::CSS::XPathVisitor::DoctypeConfig::XML = T.let(T.unsafe(nil), Symbol) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#10 +Nokogiri::CSS::XPathVisitor::WILDCARD_NAMESPACES = T.let(T.unsafe(nil), TrueClass) + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#339 +module Nokogiri::CSS::XPathVisitorAlwaysUseBuiltins + class << self + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#340 + def new; end + end +end + +# source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#349 +module Nokogiri::CSS::XPathVisitorOptimallyUseBuiltins + class << self + # source://nokogiri//lib/nokogiri/css/xpath_visitor.rb#350 + def new; end + end +end + +# Some classes in Nokogiri are namespaced as a group, for example +# Document, DocumentFragment, and Builder. +# +# It's sometimes necessary to look up the related class, e.g.: +# +# XML::Builder → XML::Document +# HTML4::Builder → HTML4::Document +# HTML5::Document → HTML5::DocumentFragment +# +# This module is included into those key classes who need to do this. +# +# source://nokogiri//lib/nokogiri/class_resolver.rb#19 +module Nokogiri::ClassResolver + # :call-seq: + # related_class(class_name) → Class + # + # Find a class constant within the + # + # Some examples: + # + # Nokogiri::XML::Document.new.related_class("DocumentFragment") + # # => Nokogiri::XML::DocumentFragment + # Nokogiri::HTML4::Document.new.related_class("DocumentFragment") + # # => Nokogiri::HTML4::DocumentFragment + # + # Note this will also work for subclasses that follow the same convention, e.g.: + # + # Loofah::HTML::Document.new.related_class("DocumentFragment") + # # => Loofah::HTML::DocumentFragment + # + # And even if it's a subclass, this will iterate through the superclasses: + # + # class ThisIsATopLevelClass < Nokogiri::HTML4::Builder ; end + # ThisIsATopLevelClass.new.related_class("Document") + # # => Nokogiri::HTML4::Document + # + # source://nokogiri//lib/nokogiri/class_resolver.rb#46 + def related_class(class_name); end +end + +# #related_class restricts matching namespaces to those matching this set. +# +# source://nokogiri//lib/nokogiri/class_resolver.rb#21 +Nokogiri::ClassResolver::VALID_NAMESPACES = T.let(T.unsafe(nil), Set) + +# source://nokogiri//lib/nokogiri/decorators/slop.rb#4 +module Nokogiri::Decorators; end + +# The Slop decorator implements method missing such that a methods may be +# used instead of XPath or CSS. See Nokogiri.Slop +# +# source://nokogiri//lib/nokogiri/decorators/slop.rb#8 +module Nokogiri::Decorators::Slop + # look for node with +name+. See Nokogiri.Slop + # + # source://nokogiri//lib/nokogiri/decorators/slop.rb#14 + def method_missing(name, *args, &block); end + + private + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/decorators/slop.rb#37 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end +end + +# The default XPath search context for Slop +# +# source://nokogiri//lib/nokogiri/decorators/slop.rb#10 +Nokogiri::Decorators::Slop::XPATH_PREFIX = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/encoding_handler.rb#5 +class Nokogiri::EncodingHandler + # Returns the value of attribute name. + def name; end + + class << self + def [](_arg0); end + def alias(_arg0, _arg1); end + def clear_aliases!; end + def delete(_arg0); end + + # source://nokogiri//lib/nokogiri/encoding_handler.rb#15 + def install_default_aliases; end + end +end + +# Popular encoding aliases not known by all iconv implementations that Nokogiri should support. +# +# source://nokogiri//lib/nokogiri/encoding_handler.rb#7 +Nokogiri::EncodingHandler::USEFUL_ALIASES = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/gumbo.rb#4 +module Nokogiri::Gumbo + class << self + def fragment(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end + def parse(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5); end + end +end + +# The default maximum number of attributes per element. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#6 +Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = T.let(T.unsafe(nil), Integer) + +# The default maximum number of errors for parsing a document or a fragment. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#9 +Nokogiri::Gumbo::DEFAULT_MAX_ERRORS = T.let(T.unsafe(nil), Integer) + +# The default maximum depth of the DOM tree produced by parsing a document +# or fragment. +# +# source://nokogiri//lib/nokogiri/gumbo.rb#13 +Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = T.let(T.unsafe(nil), Integer) + +# 💡 This module/namespace is an alias for Nokogiri::HTML4 as of v1.12.0. Before v1.12.0, +# Nokogiri::HTML4 did not exist, and this was the module/namespace for all HTML-related +# classes. +# +# source://nokogiri//lib/nokogiri/html.rb#8 +Nokogiri::HTML = Nokogiri::HTML4 + +# Since v1.12.0 +# +# 💡 Before v1.12.0, Nokogiri::HTML4 did not exist, and Nokogiri::HTML was the module/namespace +# for parsing HTML. +# +# source://nokogiri//lib/nokogiri/html4.rb#19 +module Nokogiri::HTML4 + class << self + # Parse a fragment from +string+ in to a NodeSet. + # + # source://nokogiri//lib/nokogiri/html4.rb#29 + def fragment(string, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Parse HTML. Convenience method for Nokogiri::HTML4::Document.parse + # + # source://nokogiri//lib/nokogiri/html4.rb#23 + def parse(input, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + end +end + +# Nokogiri HTML builder is used for building HTML documents. It is very +# similar to the Nokogiri::XML::Builder. In fact, you should go read the +# documentation for Nokogiri::XML::Builder before reading this +# documentation. +# +# == Synopsis: +# +# Create an HTML document with a body that has an onload attribute, and a +# span tag with a class of "bold" that has content of "Hello world". +# +# builder = Nokogiri::HTML4::Builder.new do |doc| +# doc.html { +# doc.body(:onload => 'some_func();') { +# doc.span.bold { +# doc.text "Hello world" +# } +# } +# } +# end +# puts builder.to_html +# +# The HTML builder inherits from the XML builder, so make sure to read the +# Nokogiri::XML::Builder documentation. +# +# source://nokogiri//lib/nokogiri/html.rb#31 +class Nokogiri::HTML4::Builder < ::Nokogiri::XML::Builder + # Convert the builder to HTML + # + # source://nokogiri//lib/nokogiri/html4/builder.rb#32 + def to_html; end +end + +# source://nokogiri//lib/nokogiri/html4/document.rb#8 +class Nokogiri::HTML4::Document < ::Nokogiri::XML::Document + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # + # source://nokogiri//lib/nokogiri/html4/document.rb#149 + def fragment(tags = T.unsafe(nil)); end + + # Get the meta tag encoding for this document. If there is no meta tag, + # then nil is returned. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#12 + def meta_encoding; end + + # Set the meta tag encoding for this document. + # + # If an meta encoding tag is already present, its content is + # replaced with the given text. + # + # Otherwise, this method tries to create one at an appropriate + # place supplying head and/or html elements as necessary, which + # is inside a head element if any, and before any text node or + # content element (typically ) if any. + # + # The result when trying to set an encoding that is different + # from the document encoding is undefined. + # + # Beware in CRuby, that libxml2 automatically inserts a meta tag + # into a head element. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#36 + def meta_encoding=(encoding); end + + # Serialize Node using +options+. Save options can also be set using a block. + # + # See also Nokogiri::XML::Node::SaveOptions and Node@Serialization+and+Generating+Output. + # + # These two statements are equivalent: + # + # node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML) + # + # or + # + # node.serialize(:encoding => 'UTF-8') do |config| + # config.format.as_xml + # end + # + # source://nokogiri//lib/nokogiri/html4/document.rb#142 + def serialize(options = T.unsafe(nil)); end + + # Get the title string of this document. Return nil if there is + # no title tag. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#70 + def title; end + + # Set the title string of this document. + # + # If a title element is already present, its content is replaced + # with the given text. + # + # Otherwise, this method tries to create one at an appropriate + # place supplying head and/or html elements as necessary, which + # is inside a head element if any, right after a meta + # encoding/charset tag if any, and before any text node or + # content element (typically ) if any. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#85 + def title=(text); end + + def type; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/html4/document.rb#159 + def xpath_doctype; end + + private + + # source://nokogiri//lib/nokogiri/html4/document.rb#60 + def meta_content_type; end + + # source://nokogiri//lib/nokogiri/html4/document.rb#103 + def set_metadata_element(element); end + + class << self + def new(*_arg0); end + + # Parse HTML. +string_or_io+ may be a String, or any object that + # responds to _read_ and _close_ such as an IO, or StringIO. + # +url+ is resource where this document is located. +encoding+ is the + # encoding that should be used when processing the document. +options+ + # is a number that sets options in the parser, such as + # Nokogiri::XML::ParseOptions::RECOVER. See the constants in + # Nokogiri::XML::ParseOptions. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html4/document.rb#172 + def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + def read_io(_arg0, _arg1, _arg2, _arg3); end + def read_memory(_arg0, _arg1, _arg2, _arg3); end + end +end + +# source://nokogiri//lib/nokogiri/html4/document_fragment.rb#5 +class Nokogiri::HTML4::DocumentFragment < ::Nokogiri::XML::DocumentFragment + # @return [DocumentFragment] a new instance of DocumentFragment + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#27 + def initialize(document, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end + + class << self + # Create a Nokogiri::XML::DocumentFragment from +tags+, using +encoding+ + # + # source://nokogiri//lib/nokogiri/html4/document_fragment.rb#8 + def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + end +end + +# source://nokogiri//lib/nokogiri/html4/element_description.rb#5 +class Nokogiri::HTML4::ElementDescription + # Is this element a block element? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#8 + def block?; end + + def default_sub_element; end + + # @return [Boolean] + def deprecated?; end + + def deprecated_attributes; end + def description; end + def empty?; end + + # @return [Boolean] + def implied_end_tag?; end + + # @return [Boolean] + def implied_start_tag?; end + + def inline?; end + + # Inspection information + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#20 + def inspect; end + + def name; end + def optional_attributes; end + def required_attributes; end + + # @return [Boolean] + def save_end_tag?; end + + def sub_elements; end + + # Convert this description to a string + # + # source://nokogiri//lib/nokogiri/html4/element_description.rb#14 + def to_s; end + + private + + # source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#21 + def default_desc; end + + class << self + def [](_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#233 +Nokogiri::HTML4::ElementDescription::ACTION_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#228 +Nokogiri::HTML4::ElementDescription::ALIGN_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#167 +Nokogiri::HTML4::ElementDescription::ALT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#174 +Nokogiri::HTML4::ElementDescription::APPLET_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#177 +Nokogiri::HTML4::ElementDescription::AREA_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#153 +Nokogiri::HTML4::ElementDescription::ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#162 +Nokogiri::HTML4::ElementDescription::A_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#179 +Nokogiri::HTML4::ElementDescription::BASEFONT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#272 +Nokogiri::HTML4::ElementDescription::BGCOLOR_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#135 +Nokogiri::HTML4::ElementDescription::BLOCK = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#234 +Nokogiri::HTML4::ElementDescription::BLOCKLI_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#182 +Nokogiri::HTML4::ElementDescription::BODY_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#181 +Nokogiri::HTML4::ElementDescription::BODY_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#183 +Nokogiri::HTML4::ElementDescription::BODY_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#185 +Nokogiri::HTML4::ElementDescription::BUTTON_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#154 +Nokogiri::HTML4::ElementDescription::CELLHALIGN = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#155 +Nokogiri::HTML4::ElementDescription::CELLVALIGN = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#170 +Nokogiri::HTML4::ElementDescription::CLEAR_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#188 +Nokogiri::HTML4::ElementDescription::COL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#189 +Nokogiri::HTML4::ElementDescription::COL_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#193 +Nokogiri::HTML4::ElementDescription::COMPACT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#191 +Nokogiri::HTML4::ElementDescription::COMPACT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#236 +Nokogiri::HTML4::ElementDescription::CONTENT_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#148 +Nokogiri::HTML4::ElementDescription::COREATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#159 +Nokogiri::HTML4::ElementDescription::CORE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#158 +Nokogiri::HTML4::ElementDescription::CORE_I18N_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#275 +Nokogiri::HTML4::ElementDescription::DIR_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#192 +Nokogiri::HTML4::ElementDescription::DL_CONTENTS = T.let(T.unsafe(nil), Array) + +# This is filled in down below. +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#19 +Nokogiri::HTML4::ElementDescription::DefaultDescriptions = T.let(T.unsafe(nil), Hash) + +# Methods are defined protected by method_defined? because at +# this point the C-library or Java library is already loaded, +# and we don't want to clobber any methods that have been +# defined there. +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#11 +Nokogiri::HTML4::ElementDescription::Desc = Struct + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#190 +Nokogiri::HTML4::ElementDescription::EDIT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#217 +Nokogiri::HTML4::ElementDescription::EMBED_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#141 +Nokogiri::HTML4::ElementDescription::EMPTY = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#150 +Nokogiri::HTML4::ElementDescription::EVENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#195 +Nokogiri::HTML4::ElementDescription::FIELDSET_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#139 +Nokogiri::HTML4::ElementDescription::FLOW = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#173 +Nokogiri::HTML4::ElementDescription::FLOW_PARAM = T.let(T.unsafe(nil), Array) + +# Attributes defined and categorized +# +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#125 +Nokogiri::HTML4::ElementDescription::FONTSTYLE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#196 +Nokogiri::HTML4::ElementDescription::FONT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#134 +Nokogiri::HTML4::ElementDescription::FORMCTRL = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#200 +Nokogiri::HTML4::ElementDescription::FORM_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#197 +Nokogiri::HTML4::ElementDescription::FORM_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#204 +Nokogiri::HTML4::ElementDescription::FRAMESET_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#205 +Nokogiri::HTML4::ElementDescription::FRAMESET_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#202 +Nokogiri::HTML4::ElementDescription::FRAME_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#132 +Nokogiri::HTML4::ElementDescription::HEADING = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#206 +Nokogiri::HTML4::ElementDescription::HEAD_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#207 +Nokogiri::HTML4::ElementDescription::HEAD_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#169 +Nokogiri::HTML4::ElementDescription::HREF_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#209 +Nokogiri::HTML4::ElementDescription::HR_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#157 +Nokogiri::HTML4::ElementDescription::HTML_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#146 +Nokogiri::HTML4::ElementDescription::HTML_CDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#211 +Nokogiri::HTML4::ElementDescription::HTML_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#143 +Nokogiri::HTML4::ElementDescription::HTML_FLOW = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#144 +Nokogiri::HTML4::ElementDescription::HTML_INLINE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#145 +Nokogiri::HTML4::ElementDescription::HTML_PCDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#149 +Nokogiri::HTML4::ElementDescription::I18N = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#160 +Nokogiri::HTML4::ElementDescription::I18N_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#212 +Nokogiri::HTML4::ElementDescription::IFRAME_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#215 +Nokogiri::HTML4::ElementDescription::IMG_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#138 +Nokogiri::HTML4::ElementDescription::INLINE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#171 +Nokogiri::HTML4::ElementDescription::INLINE_P = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#221 +Nokogiri::HTML4::ElementDescription::INPUT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#194 +Nokogiri::HTML4::ElementDescription::LABEL_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#226 +Nokogiri::HTML4::ElementDescription::LABEL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#253 +Nokogiri::HTML4::ElementDescription::LANGUAGE_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#227 +Nokogiri::HTML4::ElementDescription::LEGEND_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#229 +Nokogiri::HTML4::ElementDescription::LINK_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#133 +Nokogiri::HTML4::ElementDescription::LIST = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#273 +Nokogiri::HTML4::ElementDescription::LI_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#231 +Nokogiri::HTML4::ElementDescription::MAP_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#235 +Nokogiri::HTML4::ElementDescription::META_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#140 +Nokogiri::HTML4::ElementDescription::MODIFIER = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#232 +Nokogiri::HTML4::ElementDescription::NAME_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#238 +Nokogiri::HTML4::ElementDescription::NOFRAMES_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#240 +Nokogiri::HTML4::ElementDescription::OBJECT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#239 +Nokogiri::HTML4::ElementDescription::OBJECT_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#243 +Nokogiri::HTML4::ElementDescription::OBJECT_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#244 +Nokogiri::HTML4::ElementDescription::OL_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#246 +Nokogiri::HTML4::ElementDescription::OPTGROUP_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#247 +Nokogiri::HTML4::ElementDescription::OPTION_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#245 +Nokogiri::HTML4::ElementDescription::OPTION_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#248 +Nokogiri::HTML4::ElementDescription::PARAM_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#131 +Nokogiri::HTML4::ElementDescription::PCDATA = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#126 +Nokogiri::HTML4::ElementDescription::PHRASE = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#250 +Nokogiri::HTML4::ElementDescription::PRE_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#225 +Nokogiri::HTML4::ElementDescription::PROMPT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#180 +Nokogiri::HTML4::ElementDescription::QUOTE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#166 +Nokogiri::HTML4::ElementDescription::ROWS_COLS_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#252 +Nokogiri::HTML4::ElementDescription::SCRIPT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#255 +Nokogiri::HTML4::ElementDescription::SELECT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#254 +Nokogiri::HTML4::ElementDescription::SELECT_CONTENT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#128 +Nokogiri::HTML4::ElementDescription::SPECIAL = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#168 +Nokogiri::HTML4::ElementDescription::SRC_ALT_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#257 +Nokogiri::HTML4::ElementDescription::STYLE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#258 +Nokogiri::HTML4::ElementDescription::TABLE_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#261 +Nokogiri::HTML4::ElementDescription::TABLE_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#260 +Nokogiri::HTML4::ElementDescription::TABLE_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#264 +Nokogiri::HTML4::ElementDescription::TALIGN_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#165 +Nokogiri::HTML4::ElementDescription::TARGET_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#268 +Nokogiri::HTML4::ElementDescription::TEXTAREA_ATTRS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#266 +Nokogiri::HTML4::ElementDescription::TH_TD_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#265 +Nokogiri::HTML4::ElementDescription::TH_TD_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#271 +Nokogiri::HTML4::ElementDescription::TR_CONTENTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#263 +Nokogiri::HTML4::ElementDescription::TR_ELT = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#237 +Nokogiri::HTML4::ElementDescription::TYPE_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#274 +Nokogiri::HTML4::ElementDescription::UL_DEPR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#210 +Nokogiri::HTML4::ElementDescription::VERSION_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/element_description_defaults.rb#249 +Nokogiri::HTML4::ElementDescription::WIDTH_ATTR = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#14 +class Nokogiri::HTML4::EncodingReader + # @return [EncodingReader] a new instance of EncodingReader + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#82 + def initialize(io); end + + # This method is used by the C extension so that + # Nokogiri::HTML4::Document#read_io() does not leak memory when + # EncodingFound is raised. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#91 + def encoding_found; end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#93 + def read(len); end + + class << self + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#59 + def detect_encoding(chunk); end + end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#15 +class Nokogiri::HTML4::EncodingReader::EncodingFound < ::StandardError + # @return [EncodingFound] a new instance of EncodingFound + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#18 + def initialize(encoding); end + + # Returns the value of attribute found_encoding. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#16 + def found_encoding; end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#46 +class Nokogiri::HTML4::EncodingReader::JumpSAXHandler < ::Nokogiri::HTML4::EncodingReader::SAXHandler + # @return [JumpSAXHandler] a new instance of JumpSAXHandler + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#47 + def initialize(jumptag); end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#52 + def start_element(name, attrs = T.unsafe(nil)); end +end + +# source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#24 +class Nokogiri::HTML4::EncodingReader::SAXHandler < ::Nokogiri::XML::SAX::Document + # @return [SAXHandler] a new instance of SAXHandler + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#27 + def initialize; end + + # Returns the value of attribute encoding. + # + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#25 + def encoding; end + + # source://nokogiri//lib/nokogiri/html4/encoding_reader.rb#32 + def start_element(name, attrs = T.unsafe(nil)); end +end + +# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#5 +class Nokogiri::HTML4::EntityDescription < ::Struct; end + +# source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#7 +class Nokogiri::HTML4::EntityLookup + # Look up entity with +name+ + # + # source://nokogiri//lib/nokogiri/html4/entity_lookup.rb#10 + def [](name); end + + def get(_arg0); end +end + +# Instance of Nokogiri::HTML4::EntityLookup +# +# source://nokogiri//lib/nokogiri/html4.rb#35 +Nokogiri::HTML4::NamedCharacters = T.let(T.unsafe(nil), Nokogiri::HTML4::EntityLookup) + +# Nokogiri lets you write a SAX parser to process HTML but get HTML correction features. +# +# See Nokogiri::HTML4::SAX::Parser for a basic example of using a SAX parser with HTML. +# +# For more information on SAX parsers, see Nokogiri::XML::SAX +# +# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#5 +module Nokogiri::HTML4::SAX; end + +# This class lets you perform SAX style parsing on HTML with HTML error correction. +# +# Here is a basic usage example: +# +# class MyDoc < Nokogiri::XML::SAX::Document +# def start_element name, attributes = [] +# puts "found a #{name}" +# end +# end +# +# parser = Nokogiri::HTML4::SAX::Parser.new(MyDoc.new) +# parser.parse(File.read(ARGV[0], mode: 'rb')) +# +# For more information on SAX parsers, see Nokogiri::XML::SAX +# +# source://nokogiri//lib/nokogiri/html4/sax/parser.rb#27 +class Nokogiri::HTML4::SAX::Parser < ::Nokogiri::XML::SAX::Parser + # Parse a file with +filename+ + # + # @raise [ArgumentError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#51 + def parse_file(filename, encoding = T.unsafe(nil)); end + + # Parse given +io+ + # + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#41 + def parse_io(io, encoding = T.unsafe(nil)); end + + # Parse html stored in +data+ using +encoding+ + # + # @raise [TypeError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/html4/sax/parser.rb#30 + def parse_memory(data, encoding = T.unsafe(nil)); end +end + +# Context for HTML SAX parsers. This class is usually not instantiated by the user. Instead, +# you should be looking at Nokogiri::HTML4::SAX::Parser +# +# source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#9 +class Nokogiri::HTML4::SAX::ParserContext < ::Nokogiri::XML::SAX::ParserContext + def parse_with(_arg0); end + + class << self + def file(_arg0, _arg1); end + def memory(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/html4/sax/parser_context.rb#10 + def new(thing, encoding = T.unsafe(nil)); end + end +end + +# source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#6 +class Nokogiri::HTML4::SAX::PushParser < ::Nokogiri::XML::SAX::PushParser + # @return [PushParser] a new instance of PushParser + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#11 + def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Write a +chunk+ of HTML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23 + def <<(chunk, last_chunk = T.unsafe(nil)); end + + # The Nokogiri::HTML4::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + def document; end + + # The Nokogiri::HTML4::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#9 + def document=(_arg0); end + + # Finish the parsing. This method is only necessary for + # Nokogiri::HTML4::SAX::Document#end_document to be called. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#31 + def finish; end + + # Write a +chunk+ of HTML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/html4/sax/push_parser.rb#23 + def write(chunk, last_chunk = T.unsafe(nil)); end + + private + + def initialize_native(_arg0, _arg1, _arg2); end + def native_write(_arg0, _arg1); end +end + +# == Usage +# +# ⚠ HTML5 functionality is not available when running JRuby. +# +# Parse an HTML5 document: +# +# doc = Nokogiri.HTML5(string) +# +# Parse an HTML5 fragment: +# +# fragment = Nokogiri::HTML5.fragment(string) +# +# == Parsing options +# +# The document and fragment parsing methods support options that are different from Nokogiri's. +# +# - Nokogiri.HTML5(html, url = nil, encoding = nil, options = {}) +# - Nokogiri::HTML5.parse(html, url = nil, encoding = nil, options = {}) +# - Nokogiri::HTML5::Document.parse(html, url = nil, encoding = nil, options = {}) +# - Nokogiri::HTML5.fragment(html, encoding = nil, options = {}) +# - Nokogiri::HTML5::DocumentFragment.parse(html, encoding = nil, options = {}) +# +# The three currently supported options are +:max_errors+, +:max_tree_depth+ and +# +:max_attributes+, described below. +# +# === Error reporting +# +# Nokogiri contains an experimental HTML5 parse error reporting facility. By default, no parse +# errors are reported but this can be configured by passing the +:max_errors+ option to +# {HTML5.parse} or {HTML5.fragment}. +# +# For example, this script: +# +# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10) +# doc.errors.each do |err| +# puts(err) +# end +# +# Emits: +# +# 1:1: ERROR: Expected a doctype token +# Hi there! +# ^ +# 1:1: ERROR: Start tag of nonvoid HTML element ends with '/>', use '>'. +# Hi there! +# ^ +# 1:17: ERROR: End tag ends with '/>', use '>'. +# Hi there! +# ^ +# 1:17: ERROR: End tag contains attributes. +# Hi there! +# ^ +# +# Using max_errors: -1 results in an unlimited number of errors being returned. +# +# The errors returned by {HTML5::Document#errors} are instances of {Nokogiri::XML::SyntaxError}. +# +# The {https://html.spec.whatwg.org/multipage/parsing.html#parse-errors HTML standard} defines a +# number of standard parse error codes. These error codes only cover the "tokenization" stage of +# parsing HTML. The parse errors in the "tree construction" stage do not have standardized error +# codes (yet). +# +# As a convenience to Nokogiri users, the defined error codes are available via +# {Nokogiri::XML::SyntaxError#str1} method. +# +# doc = Nokogiri::HTML5.parse('Hi there!', max_errors: 10) +# doc.errors.each do |err| +# puts("#{err.line}:#{err.column}: #{err.str1}") +# end +# # => 1:1: generic-parser +# # 1:1: non-void-html-element-start-tag-with-trailing-solidus +# # 1:17: end-tag-with-trailing-solidus +# # 1:17: end-tag-with-attributes +# +# Note that the first error is +generic-parser+ because it's an error from the tree construction +# stage and doesn't have a standardized error code. +# +# For the purposes of semantic versioning, the error messages, error locations, and error codes +# are not part of Nokogiri's public API. That is, these are subject to change without Nokogiri's +# major version number changing. These may be stabilized in the future. +# +# === Maximum tree depth +# +# The maximum depth of the DOM tree parsed by the various parsing methods is configurable by the +# +:max_tree_depth+ option. If the depth of the tree would exceed this limit, then an +# {::ArgumentError} is thrown. +# +# This limit (which defaults to Nokogiri::Gumbo::DEFAULT_MAX_TREE_DEPTH = 400) can be +# removed by giving the option max_tree_depth: -1. +# +# html = '' + '
' * 1000 +# doc = Nokogiri.HTML5(html) +# # raises ArgumentError: Document tree depth limit exceeded +# doc = Nokogiri.HTML5(html, max_tree_depth: -1) +# +# === Attribute limit per element +# +# The maximum number of attributes per DOM element is configurable by the +:max_attributes+ +# option. If a given element would exceed this limit, then an {::ArgumentError} is thrown. +# +# This limit (which defaults to Nokogiri::Gumbo::DEFAULT_MAX_ATTRIBUTES = 400) can be +# removed by giving the option max_attributes: -1. +# +# html = '
' +# # "
" +# doc = Nokogiri.HTML5(html) +# # raises ArgumentError: Attributes per element limit exceeded +# doc = Nokogiri.HTML5(html, max_attributes: -1) +# +# == HTML Serialization +# +# After parsing HTML, it may be serialized using any of the {Nokogiri::XML::Node} serialization +# methods. In particular, {XML::Node#serialize}, {XML::Node#to_html}, and {XML::Node#to_s} will +# serialize a given node and its children. (This is the equivalent of JavaScript's +# +Element.outerHTML+.) Similarly, {XML::Node#inner_html} will serialize the children of a given +# node. (This is the equivalent of JavaScript's +Element.innerHTML+.) +# +# doc = Nokogiri::HTML5("Hello world!") +# puts doc.serialize +# # => Hello world! +# +# Due to quirks in how HTML is parsed and serialized, it's possible for a DOM tree to be +# serialized and then re-parsed, resulting in a different DOM. Mostly, this happens with DOMs +# produced from invalid HTML. Unfortunately, even valid HTML may not survive serialization and +# re-parsing. +# +# In particular, a newline at the start of +pre+, +listing+, and +textarea+ elements is ignored by +# the parser. +# +# doc = Nokogiri::HTML5(<<-EOF) +# +#
+#   Content
+# EOF +# puts doc.at('/html/body/pre').serialize +# # =>
Content
+# +# In this case, the original HTML is semantically equivalent to the serialized version. If the +# +pre+, +listing+, or +textarea+ content starts with two newlines, the first newline will be +# stripped on the first parse and the second newline will be stripped on the second, leading to +# semantically different DOMs. Passing the parameter preserve_newline: true will cause +# two or more newlines to be preserved. (A single leading newline will still be removed.) +# +# doc = Nokogiri::HTML5(<<-EOF) +# +# +# +# Content +# EOF +# puts doc.at('/html/body/listing').serialize(preserve_newline: true) +# # => +# # +# # Content +# +# == Encodings +# +# Nokogiri always parses HTML5 using {https://en.wikipedia.org/wiki/UTF-8 UTF-8}; however, the +# encoding of the input can be explicitly selected via the optional +encoding+ parameter. This is +# most useful when the input comes not from a string but from an IO object. +# +# When serializing a document or node, the encoding of the output string can be specified via the +# +:encoding+ options. Characters that cannot be encoded in the selected encoding will be encoded +# as {https://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references HTML numeric +# entities}. +# +# frag = Nokogiri::HTML5.fragment('아는 길도 물어가라') +# puts html +# # => 아는 길도 물어가라 +# frag = Nokogiri::HTML5.fragment(html) +# puts frag.serialize +# # => 아는 길도 물어가라 +# +# (There's a {https://bugs.ruby-lang.org/issues/15033 bug} in all current versions of Ruby that +# can cause the entity encoding to fail. Of the mandated supported encodings for HTML, the only +# encoding I'm aware of that has this bug is 'ISO-2022-JP'. We recommend avoiding this +# encoding.) +# +# == Notes +# +# * The {Nokogiri::HTML5.fragment} function takes a string and parses it +# as a HTML5 document. The ++, ++, and ++ elements are +# removed from this document, and any children of these elements that remain +# are returned as a {Nokogiri::HTML5::DocumentFragment}. +# +# * The {Nokogiri::HTML5.parse} function takes a string and passes it to the +# gumbo_parse_with_options method, using the default options. +# The resulting Gumbo parse tree is then walked. +# +# * Instead of uppercase element names, lowercase element names are produced. +# +# * Instead of returning +unknown+ as the element name for unknown tags, the +# original tag name is returned verbatim. +# +# Since v1.12.0 +# +# source://nokogiri//lib/nokogiri/html5/document.rb#23 +module Nokogiri::HTML5 + class << self + # Parse a fragment from +string+. Convenience method for + # {Nokogiri::HTML5::DocumentFragment.parse}. + # + # source://nokogiri//lib/nokogiri/html5.rb#238 + def fragment(string, encoding = T.unsafe(nil), **options); end + + # Fetch and parse a HTML document from the web, following redirects, + # handling https, and determining the character encoding using HTML5 + # rules. +uri+ may be a +String+ or a +URI+. +options+ contains + # http headers and special options. Everything which is not a + # special option is considered a header. Special options include: + # * :follow_limit => number of redirects which are followed + # * :basic_auth => [username, password] + # + # source://nokogiri//lib/nokogiri/html5.rb#249 + def get(uri, options = T.unsafe(nil)); end + + # Parse an HTML 5 document. Convenience method for {Nokogiri::HTML5::Document.parse} + # + # source://nokogiri//lib/nokogiri/html5.rb#232 + def parse(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end + + # source://nokogiri//lib/nokogiri/html5.rb#257 + def read_and_encode(string, encoding); end + + private + + # source://nokogiri//lib/nokogiri/html5.rb#283 + def get_impl(uri, options = T.unsafe(nil)); end + + # Charset sniffing is a complex and controversial topic that understandably isn't done _by + # default_ by the Ruby Net::HTTP library. This being said, it is a very real problem for + # consumers of HTML as the default for HTML is iso-8859-1, most "good" producers use utf-8, and + # the Gumbo parser *only* supports utf-8. + # + # Accordingly, Nokogiri::HTML4::Document.parse provides limited encoding detection. Following + # this lead, Nokogiri::HTML5 attempts to do likewise, while attempting to more closely follow + # the HTML5 standard. + # + # http://bugs.ruby-lang.org/issues/2567 + # http://www.w3.org/TR/html5/syntax.html#determining-the-character-encoding + # + # source://nokogiri//lib/nokogiri/html5.rb#344 + def reencode(body, content_type = T.unsafe(nil)); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/document.rb#39 +class Nokogiri::HTML5::Document < ::Nokogiri::HTML4::Document + # @return [Document] a new instance of Document + # + # source://nokogiri//lib/nokogiri/html5/document.rb#129 + def initialize(*args); end + + # :call-seq: + # fragment() → Nokogiri::HTML5::DocumentFragment + # fragment(markup) → Nokogiri::HTML5::DocumentFragment + # + # Parse a HTML5 document fragment from +markup+, returning a Nokogiri::HTML5::DocumentFragment. + # + # [Properties] + # - +markup+ (String) The HTML5 markup fragment to be parsed + # + # [Returns] + # Nokogiri::HTML5::DocumentFragment. This object's children will be empty if `markup` is not passed, is empty, or is `nil`. + # + # source://nokogiri//lib/nokogiri/html5/document.rb#147 + def fragment(markup = T.unsafe(nil)); end + + # Get the parser's quirks mode value. See HTML5::QuirksMode. + # + # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::Document.new`). + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/html5/document.rb#49 + def quirks_mode; end + + # source://nokogiri//lib/nokogiri/html5/document.rb#151 + def to_xml(options = T.unsafe(nil), &block); end + + # Get the url name for this document, as passed into Document.parse, Document.read_io, or + # Document.read_memory + # + # source://nokogiri//lib/nokogiri/html5/document.rb#42 + def url; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See CSS::XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/html5/document.rb#163 + def xpath_doctype; end + + class << self + # :call-seq: + # parse(input) + # parse(input, url=nil, encoding=nil, **options) + # parse(input, url=nil, encoding=nil) { |options| ... } + # + # Parse HTML5 input. + # + # [Parameters] + # - +input+ may be a String, or any object that responds to _read_ and _close_ such as an + # IO, or StringIO. + # + # - +url+ (optional) is a String indicating the canonical URI where this document is located. + # + # - +encoding+ (optional) is the encoding that should be used when processing + # the document. + # + # - +options+ (optional) is a configuration Hash (or keyword arguments) to set options + # during parsing. The three currently supported options are +:max_errors+, + # +:max_tree_depth+ and +:max_attributes+, described at Nokogiri::HTML5. + # + # ⚠ Note that these options are different than those made available by + # Nokogiri::XML::Document and Nokogiri::HTML4::Document. + # + # - +block+ (optional) is passed a configuration Hash on which parse options may be set. See + # Nokogiri::HTML5 for more information and usage. + # + # [Returns] Nokogiri::HTML5::Document + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#80 + def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options, &block); end + + # Create a new document from an IO object. + # + # 💡 Most users should prefer Document.parse to this method. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#101 + def read_io(io, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end + + # Create a new document from a String. + # + # 💡 Most users should prefer Document.parse to this method. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/html5/document.rb#110 + def read_memory(string, url = T.unsafe(nil), encoding = T.unsafe(nil), **options); end + + private + + # source://nokogiri//lib/nokogiri/html5/document.rb#118 + def do_parse(string_or_io, url, encoding, options); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/document_fragment.rb#27 +class Nokogiri::HTML5::DocumentFragment < ::Nokogiri::HTML4::DocumentFragment + # Create a document fragment. + # + # @return [DocumentFragment] a new instance of DocumentFragment + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#39 + def initialize(doc, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28 + def document; end + + # Sets the attribute document + # + # @param value the value to set the attribute document to. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#28 + def document=(_arg0); end + + # Returns the value of attribute errors. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29 + def errors; end + + # Sets the attribute errors + # + # @param value the value to set the attribute errors to. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#29 + def errors=(_arg0); end + + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#65 + def extract_params(params); end + + # Get the parser's quirks mode value. See HTML5::QuirksMode. + # + # This method returns `nil` if the parser was not invoked (e.g., `Nokogiri::HTML5::DocumentFragment.new(doc)`). + # + # Since v1.14.0 + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#36 + def quirks_mode; end + + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#51 + def serialize(options = T.unsafe(nil), &block); end + + class << self + # Parse a document fragment from +tags+, returning a Nodeset. + # + # source://nokogiri//lib/nokogiri/html5/document_fragment.rb#58 + def parse(tags, encoding = T.unsafe(nil), options = T.unsafe(nil)); end + end +end + +# Since v1.12.0 +# +# 💡 HTML5 functionality is not available when running JRuby. +# +# source://nokogiri//lib/nokogiri/html5/node.rb#27 +module Nokogiri::HTML5::Node + # source://nokogiri//lib/nokogiri/html5/node.rb#65 + def fragment(tags); end + + # source://nokogiri//lib/nokogiri/html5/node.rb#28 + def inner_html(options = T.unsafe(nil)); end + + # @yield [config] + # + # source://nokogiri//lib/nokogiri/html5/node.rb#36 + def write_to(io, *options); end + + private + + # HTML elements can have attributes that contain colons. + # Nokogiri::XML::Node#[]= treats names with colons as a prefixed QName + # and tries to create an attribute in a namespace. This is especially + # annoying with attribute names like xml:lang since libxml2 will + # actually create the xml namespace if it doesn't exist already. + # + # source://nokogiri//lib/nokogiri/html5/node.rb#78 + def add_child_node_and_reparent_attrs(node); end +end + +# Enum for the HTML5 parser quirks mode values. Values returned by HTML5::Document#quirks_mode +# +# See https://dom.spec.whatwg.org/#concept-document-quirks for more information on HTML5 quirks +# mode. +# +# Since v1.14.0 +# +# source://nokogiri//lib/nokogiri/html5/document.rb#30 +module Nokogiri::HTML5::QuirksMode; end + +# The document was parsed in "limited-quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#33 +Nokogiri::HTML5::QuirksMode::LIMITED_QUIRKS = T.let(T.unsafe(nil), Integer) + +# The document was parsed in "no-quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#31 +Nokogiri::HTML5::QuirksMode::NO_QUIRKS = T.let(T.unsafe(nil), Integer) + +# The document was parsed in "quirks" mode +# +# source://nokogiri//lib/nokogiri/html5/document.rb#32 +Nokogiri::HTML5::QuirksMode::QUIRKS = T.let(T.unsafe(nil), Integer) + +Nokogiri::LIBXML2_PATCHES = T.let(T.unsafe(nil), Array) +Nokogiri::LIBXML_COMPILED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_ICONV_ENABLED = T.let(T.unsafe(nil), TrueClass) +Nokogiri::LIBXML_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_MEMORY_MANAGEMENT = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_COMPILED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_DATETIME_ENABLED = T.let(T.unsafe(nil), TrueClass) +Nokogiri::LIBXSLT_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXSLT_PATCHES = T.let(T.unsafe(nil), Array) +Nokogiri::OTHER_LIBRARY_VERSIONS = T.let(T.unsafe(nil), String) +Nokogiri::PACKAGED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) +Nokogiri::PRECOMPILED_LIBRARIES = T.let(T.unsafe(nil), TrueClass) + +# source://nokogiri//lib/nokogiri/syntax_error.rb#4 +class Nokogiri::SyntaxError < ::StandardError; end + +module Nokogiri::Test + class << self + def __foreign_error_handler; end + end +end + +# The version of Nokogiri you are using +# +# source://nokogiri//lib/nokogiri/version/constant.rb#5 +Nokogiri::VERSION = T.let(T.unsafe(nil), String) + +# Detailed version info about Nokogiri and the installed extension dependencies. +# +# source://nokogiri//lib/nokogiri/version/info.rb#222 +Nokogiri::VERSION_INFO = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/version/info.rb#7 +class Nokogiri::VersionInfo + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://nokogiri//lib/nokogiri/version/info.rb#33 + def compiled_libxml_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#44 + def compiled_libxslt_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#22 + def engine; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#10 + def jruby?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#48 + def libxml2?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#52 + def libxml2_has_iconv?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#68 + def libxml2_precompiled?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#60 + def libxml2_using_packaged?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#64 + def libxml2_using_system?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#56 + def libxslt_has_datetime?; end + + # source://nokogiri//lib/nokogiri/version/info.rb#26 + def loaded_libxml_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#37 + def loaded_libxslt_version; end + + # source://nokogiri//lib/nokogiri/version/info.rb#18 + def ruby_minor; end + + # source://nokogiri//lib/nokogiri/version/info.rb#88 + def to_hash; end + + # source://nokogiri//lib/nokogiri/version/info.rb#180 + def to_markdown; end + + # source://nokogiri//lib/nokogiri/version/info.rb#72 + def warnings; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/version/info.rb#14 + def windows?; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml.rb#12 +module Nokogiri::XML + class << self + # Parse an XML document using the Nokogiri::XML::Reader API. See + # Nokogiri::XML::Reader for mor information + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml.rb#23 + def Reader(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + # Create a new Nokogiri::XML::RelaxNG document from +string_or_io+. + # See Nokogiri::XML::RelaxNG for an example. + # + # source://nokogiri//lib/nokogiri/xml/relax_ng.rb#9 + def RelaxNG(string_or_io, options = T.unsafe(nil)); end + + # Create a new Nokogiri::XML::Schema object using a +string_or_io+ + # object. + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#9 + def Schema(string_or_io, options = T.unsafe(nil)); end + + # Parse a fragment from +string+ in to a NodeSet. + # + # source://nokogiri//lib/nokogiri/xml.rb#42 + def fragment(string, options = T.unsafe(nil), &block); end + + # Parse XML. Convenience method for Nokogiri::XML::Document.parse + # + # source://nokogiri//lib/nokogiri/xml.rb#36 + def parse(thing, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil), &block); end + end +end + +# source://nokogiri//lib/nokogiri/xml/attr.rb#6 +class Nokogiri::XML::Attr < ::Nokogiri::XML::Node + def content=(_arg0); end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Attr, to use in pattern matching. + # + # Valid keys and their values: + # - +name+ → (String) The name of the attribute. + # - +value+ → (String) The value of the attribute. + # - +namespace+ → (Namespace, nil) The Namespace of the attribute, or +nil+ if there is no namespace. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # + # + # XML + # + # attributes = doc.root.elements.first.attribute_nodes + # # => [#(Attr:0x35c { name = "foo", value = "abc" }), + # # #(Attr:0x370 { + # # name = "bar", + # # namespace = #(Namespace:0x384 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # }), + # # value = "def" + # # })] + # + # attributes.first.deconstruct_keys([:name, :value, :namespace]) + # # => {:name=>"foo", :value=>"abc", :namespace=>nil} + # + # attributes.last.deconstruct_keys([:name, :value, :namespace]) + # # => {:name=>"bar", + # # :value=>"def", + # # :namespace=> + # # #(Namespace:0x384 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # })} + # + # source://nokogiri//lib/nokogiri/xml/attr.rb#55 + def deconstruct_keys(keys); end + + def to_s; end + def value; end + def value=(_arg0); end + + private + + # source://nokogiri//lib/nokogiri/xml/attr.rb#61 + def inspect_attributes; end + + class << self + def new(*_arg0); end + end +end + +# Represents an attribute declaration in a DTD +# +# source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#7 +class Nokogiri::XML::AttributeDecl < ::Nokogiri::XML::Node + def attribute_type; end + def default; end + def enumeration; end + + # source://nokogiri//lib/nokogiri/xml/attribute_decl.rb#15 + def inspect; end +end + +# Nokogiri builder can be used for building XML and HTML documents. +# +# == Synopsis: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.products { +# xml.widget { +# xml.id_ "10" +# xml.name "Awesome widget" +# } +# } +# } +# end +# puts builder.to_xml +# +# Will output: +# +# +# +# +# +# 10 +# Awesome widget +# +# +# +# +# +# === Builder scope +# +# The builder allows two forms. When the builder is supplied with a block +# that has a parameter, the outside scope is maintained. This means you +# can access variables that are outside your builder. If you don't need +# outside scope, you can use the builder without the "xml" prefix like +# this: +# +# builder = Nokogiri::XML::Builder.new do +# root { +# products { +# widget { +# id_ "10" +# name "Awesome widget" +# } +# } +# } +# end +# +# == Special Tags +# +# The builder works by taking advantage of method_missing. Unfortunately +# some methods are defined in ruby that are difficult or dangerous to +# remove. You may want to create tags with the name "type", "class", and +# "id" for example. In that case, you can use an underscore to +# disambiguate your tag name from the method call. +# +# Here is an example of using the underscore to disambiguate tag names from +# ruby methods: +# +# @objects = [Object.new, Object.new, Object.new] +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# @objects.each do |o| +# xml.object { +# xml.type_ o.type +# xml.class_ o.class.name +# xml.id_ o.id +# } +# end +# } +# } +# end +# puts builder.to_xml +# +# The underscore may be used with any tag name, and the last underscore +# will just be removed. This code will output the following XML: +# +# +# +# +# +# Object +# Object +# 48390 +# +# +# Object +# Object +# 48380 +# +# +# Object +# Object +# 48370 +# +# +# +# +# == Tag Attributes +# +# Tag attributes may be supplied as method arguments. Here is our +# previous example, but using attributes rather than tags: +# +# @objects = [Object.new, Object.new, Object.new] +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# @objects.each do |o| +# xml.object(:type => o.type, :class => o.class, :id => o.id) +# end +# } +# } +# end +# puts builder.to_xml +# +# === Tag Attribute Short Cuts +# +# A couple attribute short cuts are available when building tags. The +# short cuts are available by special method calls when building a tag. +# +# This example builds an "object" tag with the class attribute "classy" +# and the id of "thing": +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root { +# xml.objects { +# xml.object.classy.thing! +# } +# } +# end +# puts builder.to_xml +# +# Which will output: +# +# +# +# +# +# +# +# +# All other options are still supported with this syntax, including +# blocks and extra tag attributes. +# +# == Namespaces +# +# Namespaces are added similarly to attributes. Nokogiri::XML::Builder +# assumes that when an attribute starts with "xmlns", it is meant to be +# a namespace: +# +# builder = Nokogiri::XML::Builder.new { |xml| +# xml.root('xmlns' => 'default', 'xmlns:foo' => 'bar') do +# xml.tenderlove +# end +# } +# puts builder.to_xml +# +# Will output XML like this: +# +# +# +# +# +# +# === Referencing declared namespaces +# +# Tags that reference non-default namespaces (i.e. a tag "foo:bar") can be +# built by using the Nokogiri::XML::Builder#[] method. +# +# For example: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.root('xmlns:foo' => 'bar') { +# xml.objects { +# xml['foo'].object.classy.thing! +# } +# } +# end +# puts builder.to_xml +# +# Will output this XML: +# +# +# +# +# +# +# +# +# Note the "foo:object" tag. +# +# === Namespace inheritance +# +# In the Builder context, children will inherit their parent's namespace. This is the same +# behavior as if the underlying {XML::Document} set +namespace_inheritance+ to +true+: +# +# result = Nokogiri::XML::Builder.new do |xml| +# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do +# xml.Header +# end +# end +# result.doc.to_xml +# # => +# # +# # +# # +# +# Users may turn this behavior off by passing a keyword argument +namespace_inheritance:false+ +# to the initializer: +# +# result = Nokogiri::XML::Builder.new(namespace_inheritance: false) do |xml| +# xml["soapenv"].Envelope("xmlns:soapenv" => "http://schemas.xmlsoap.org/soap/envelope/") do +# xml.Header +# xml["soapenv"].Body # users may explicitly opt into the namespace +# end +# end +# result.doc.to_xml +# # => +# # +# #
+# # +# # +# +# For more information on namespace inheritance, please see {XML::Document#namespace_inheritance} +# +# +# == Document Types +# +# To create a document type (DTD), use the Builder#doc method to get +# the current context document. Then call Node#create_internal_subset to +# create the DTD node. +# +# For example, this Ruby: +# +# builder = Nokogiri::XML::Builder.new do |xml| +# xml.doc.create_internal_subset( +# 'html', +# "-//W3C//DTD HTML 4.01 Transitional//EN", +# "http://www.w3.org/TR/html4/loose.dtd" +# ) +# xml.root do +# xml.foo +# end +# end +# +# puts builder.to_xml +# +# Will output this xml: +# +# +# +# +# +# +# +# source://nokogiri//lib/nokogiri/xml/builder.rb#264 +class Nokogiri::XML::Builder + include ::Nokogiri::ClassResolver + + # Create a new Builder object. +options+ are sent to the top level + # Document that is being built. + # + # Building a document with a particular encoding for example: + # + # Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml| + # ... + # end + # + # @return [Builder] a new instance of Builder + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#307 + def initialize(options = T.unsafe(nil), root = T.unsafe(nil), &block); end + + # Append the given raw XML +string+ to the document + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#390 + def <<(string); end + + # Build a tag that is associated with namespace +ns+. Raises an + # ArgumentError if +ns+ has not been defined higher in the tree. + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#358 + def [](ns); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + def arity; end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#278 + def arity=(_arg0); end + + # Create a CDATA Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#345 + def cdata(string); end + + # Create a Comment Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#351 + def comment(string); end + + # A context object for use when the block has no arguments + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + def context; end + + # A context object for use when the block has no arguments + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#276 + def context=(_arg0); end + + # The current Document object being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + def doc; end + + # The current Document object being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#270 + def doc=(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#394 + def method_missing(method, *args, &block); end + + # The parent of the current node being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + def parent; end + + # The parent of the current node being built + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#273 + def parent=(_arg0); end + + # Create a Text Node with content of +string+ + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#339 + def text(string); end + + # Convert this Builder object to XML + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#377 + def to_xml(*args); end + + private + + # Insert +node+ as a child of the current Node + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#423 + def insert(node, &block); end + + class << self + # Create a builder with an existing root object. This is for use when + # you have an existing document that you would like to augment with + # builder methods. The builder context created will start with the + # given +root+ node. + # + # For example: + # + # doc = Nokogiri::XML(File.read('somedoc.xml')) + # Nokogiri::XML::Builder.with(doc.at_css('some_tag')) do |xml| + # # ... Use normal builder methods here ... + # xml.awesome # add the "awesome" tag below "some_tag" + # end + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#294 + def with(root, &block); end + end +end + +# source://nokogiri//lib/nokogiri/xml/builder.rb#267 +Nokogiri::XML::Builder::DEFAULT_DOCUMENT_OPTIONS = T.let(T.unsafe(nil), Hash) + +# source://nokogiri//lib/nokogiri/xml/builder.rb#442 +class Nokogiri::XML::Builder::NodeBuilder + # @return [NodeBuilder] a new instance of NodeBuilder + # + # source://nokogiri//lib/nokogiri/xml/builder.rb#443 + def initialize(node, doc_builder); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#452 + def [](k); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#448 + def []=(k, v); end + + # source://nokogiri//lib/nokogiri/xml/builder.rb#456 + def method_missing(method, *args, &block); end +end + +# source://nokogiri//lib/nokogiri/xml/cdata.rb#5 +class Nokogiri::XML::CDATA < ::Nokogiri::XML::Text + # Get the name of this CDATA node + # + # source://nokogiri//lib/nokogiri/xml/cdata.rb#8 + def name; end + + class << self + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/character_data.rb#5 +class Nokogiri::XML::CharacterData < ::Nokogiri::XML::Node + include ::Nokogiri::XML::PP::CharacterData +end + +class Nokogiri::XML::Comment < ::Nokogiri::XML::CharacterData + class << self + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/dtd.rb#5 +class Nokogiri::XML::DTD < ::Nokogiri::XML::Node + def attributes; end + + # source://nokogiri//lib/nokogiri/xml/dtd.rb#17 + def each; end + + def elements; end + def entities; end + def external_id; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/dtd.rb#27 + def html5_dtd?; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/dtd.rb#23 + def html_dtd?; end + + # source://nokogiri//lib/nokogiri/xml/dtd.rb#13 + def keys; end + + def notations; end + def system_id; end + def validate(_arg0); end +end + +# Nokogiri::XML::Document is the main entry point for dealing with XML documents. The Document +# is created by parsing an XML document. See Nokogiri::XML::Document.parse for more information +# on parsing. +# +# For searching a Document, see Nokogiri::XML::Searchable#css and +# Nokogiri::XML::Searchable#xpath +# +# source://nokogiri//lib/nokogiri/xml/document.rb#14 +class Nokogiri::XML::Document < ::Nokogiri::XML::Node + # @return [Document] a new instance of Document + # + # source://nokogiri//lib/nokogiri/xml/document.rb#178 + def initialize(*args); end + + # source://nokogiri//lib/nokogiri/xml/document.rb#394 + def <<(node_or_tags); end + + # source://nokogiri//lib/nokogiri/xml/document.rb#394 + def add_child(node_or_tags); end + + def canonicalize(*_arg0); end + def clone(*_arg0); end + + # :call-seq: + # collect_namespaces() → Hash + # + # Recursively get all namespaces from this node and its subtree and return them as a + # hash. + # + # ⚠ This method will not handle duplicate namespace prefixes, since the return value is a hash. + # + # Note that this method does an xpath lookup for nodes with namespaces, and as a result the + # order (and which duplicate prefix "wins") may be dependent on the implementation of the + # underlying XML library. + # + # *Example:* Basic usage + # + # Given this document: + # + # + # + # + # + # This method will return: + # + # {"xmlns:foo"=>"bar", "xmlns"=>"default", "xmlns:hello"=>"world"} + # + # *Example:* Duplicate prefixes + # + # Given this document: + # + # + # + # + # + # The hash returned will be something like: + # + # {"xmlns:foo" => "baz"} + # + # source://nokogiri//lib/nokogiri/xml/document.rb#317 + def collect_namespaces; end + + # Create a CDATA Node containing +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#262 + def create_cdata(string, &block); end + + # Create a Comment Node containing +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#267 + def create_comment(string, &block); end + + # :call-seq: + # create_element(name, *contents_or_attrs, &block) → Nokogiri::XML::Element + # + # Create a new Element with `name` belonging to this document, optionally setting contents or + # attributes. + # + # This method is _not_ the most user-friendly option if your intention is to add a node to the + # document tree. Prefer one of the Nokogiri::XML::Node methods like Node#add_child, + # Node#add_next_sibling, Node#replace, etc. which will both create an element (or subtree) and + # place it in the document tree. + # + # Arguments may be passed to initialize the element: + # + # - a Hash argument will be used to set attributes + # - a non-Hash object that responds to \#to_s will be used to set the new node's contents + # + # A block may be passed to mutate the node. + # + # [Parameters] + # - `name` (String) + # - `contents_or_attrs` (\#to_s, Hash) + # [Yields] `node` (Nokogiri::XML::Element) + # [Returns] Nokogiri::XML::Element + # + # *Example:* An empty element without attributes + # + # doc.create_element("div") + # # =>
+ # + # *Example:* An element with contents + # + # doc.create_element("div", "contents") + # # =>
contents
+ # + # *Example:* An element with attributes + # + # doc.create_element("div", {"class" => "container"}) + # # =>
+ # + # *Example:* An element with contents and attributes + # + # doc.create_element("div", "contents", {"class" => "container"}) + # # =>
contents
+ # + # *Example:* Passing a block to mutate the element + # + # doc.create_element("div") { |node| node["class"] = "blue" if before_noon? } + # + # source://nokogiri//lib/nokogiri/xml/document.rb#232 + def create_element(name, *contents_or_attrs, &block); end + + def create_entity(*_arg0); end + + # Create a Text Node with +string+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#257 + def create_text_node(string, &block); end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Document, to use in pattern matching. + # + # Valid keys and their values: + # - +root+ → (Node, nil) The root node of the Document, or +nil+ if the document is empty. + # + # In the future, other keys may allow accessing things like doctype and processing + # instructions. If you have a use case and would like this functionality, please let us know + # by opening an issue or a discussion on the github project. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # + # + # XML + # + # doc.deconstruct_keys([:root]) + # # => {:root=> + # # #(Element:0x35c { + # # name = "root", + # # children = [ + # # #(Text "\n" + " "), + # # #(Element:0x370 { name = "child", children = [ #(Text "\n")] }), + # # #(Text "\n")] + # # })} + # + # *Example* of an empty document + # + # doc = Nokogiri::XML::Document.new + # + # doc.deconstruct_keys([:root]) + # # => {:root=>nil} + # + # source://nokogiri//lib/nokogiri/xml/document.rb#458 + def deconstruct_keys(keys); end + + # Apply any decorators to +node+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#365 + def decorate(node); end + + # Get the list of decorators given +key+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#324 + def decorators(key); end + + # A reference to +self+ + # + # source://nokogiri//lib/nokogiri/xml/document.rb#277 + def document; end + + def dup(*_arg0); end + def encoding; end + def encoding=(_arg0); end + + # The errors found while parsing a document. + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/document.rb#128 + def errors; end + + # The errors found while parsing a document. + # + # [Returns] Array + # + # source://nokogiri//lib/nokogiri/xml/document.rb#128 + def errors=(_arg0); end + + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # Returns an empty fragment if +tags+ is nil. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#386 + def fragment(tags = T.unsafe(nil)); end + + # The name of this document. Always returns "document" + # + # source://nokogiri//lib/nokogiri/xml/document.rb#272 + def name; end + + # When `true`, reparented elements without a namespace will inherit their new parent's + # namespace (if one exists). Defaults to `false`. + # + # [Returns] Boolean + # + # *Example:* Default behavior of namespace inheritance + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # *Example:* Setting namespace inheritance to `true` + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # doc.namespace_inheritance = true + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # Since v1.12.4 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#175 + def namespace_inheritance; end + + # When `true`, reparented elements without a namespace will inherit their new parent's + # namespace (if one exists). Defaults to `false`. + # + # [Returns] Boolean + # + # *Example:* Default behavior of namespace inheritance + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # *Example:* Setting namespace inheritance to `true` + # + # xml = <<~EOF + # + # + # + # + # EOF + # doc = Nokogiri::XML(xml) + # doc.namespace_inheritance = true + # parent = doc.at_xpath("//foo:parent", "foo" => "http://nokogiri.org/default_ns/test/foo") + # parent.add_child("") + # doc.to_xml + # # => + # # + # # + # # + # # + # # + # + # Since v1.12.4 + # + # source://nokogiri//lib/nokogiri/xml/document.rb#175 + def namespace_inheritance=(_arg0); end + + # Get the hash of namespaces on the root Nokogiri::XML::Node + # + # source://nokogiri//lib/nokogiri/xml/document.rb#379 + def namespaces; end + + def remove_namespaces!; end + def root; end + def root=(_arg0); end + + # Explore a document with shortcut methods. See Nokogiri::Slop for details. + # + # Note that any nodes that have been instantiated before #slop! + # is called will not be decorated with sloppy behavior. So, if you're in + # irb, the preferred idiom is: + # + # irb> doc = Nokogiri::Slop my_markup + # + # and not + # + # irb> doc = Nokogiri::HTML my_markup + # ... followed by irb's implicit inspect (and therefore instantiation of every node) ... + # irb> doc.slop! + # ... which does absolutely nothing. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#354 + def slop!; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1280 + def to_xml(*args, &block); end + + def url; end + + # Validate this Document against it's DTD. Returns a list of errors on + # the document or +nil+ when there is no DTD. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#332 + def validate; end + + def version; end + + # :call-seq: + # xpath_doctype() → Nokogiri::CSS::XPathVisitor::DoctypeConfig + # + # [Returns] The document type which determines CSS-to-XPath translation. + # + # See XPathVisitor for more information. + # + # source://nokogiri//lib/nokogiri/xml/document.rb#414 + def xpath_doctype; end + + private + + # source://nokogiri//lib/nokogiri/xml/document.rb#466 + def inspect_attributes; end + + class << self + def new(*_arg0); end + + # Parse an XML file. + # + # +string_or_io+ may be a String, or any object that responds to + # _read_ and _close_ such as an IO, or StringIO. + # + # +url+ (optional) is the URI where this document is located. + # + # +encoding+ (optional) is the encoding that should be used when processing + # the document. + # + # +options+ (optional) is a configuration object that sets options during + # parsing, such as Nokogiri::XML::ParseOptions::RECOVER. See the + # Nokogiri::XML::ParseOptions for more information. + # + # +block+ (optional) is passed a configuration object on which + # parse options may be set. + # + # By default, Nokogiri treats documents as untrusted, and so + # does not attempt to load DTDs or access the network. See + # Nokogiri::XML::ParseOptions for a complete list of options; + # and that module's DEFAULT_XML constant for what's set (and not + # set) by default. + # + # Nokogiri.XML() is a convenience method which will call this method. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/document.rb#48 + def parse(string_or_io, url = T.unsafe(nil), encoding = T.unsafe(nil), options = T.unsafe(nil)); end + + def read_io(_arg0, _arg1, _arg2, _arg3); end + def read_memory(_arg0, _arg1, _arg2, _arg3); end + + private + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/document.rb#83 + def empty_doc?(string_or_io); end + end +end + +# source://nokogiri//lib/nokogiri/xml/document.rb#464 +Nokogiri::XML::Document::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/xml/document.rb#19 +Nokogiri::XML::Document::NCNAME_CHAR = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/document.rb#20 +Nokogiri::XML::Document::NCNAME_RE = T.let(T.unsafe(nil), Regexp) + +# See http://www.w3.org/TR/REC-xml-names/#ns-decl for more details. Note that we're not +# attempting to handle unicode characters partly because libxml2 doesn't handle unicode +# characters in NCNAMEs. +# +# source://nokogiri//lib/nokogiri/xml/document.rb#18 +Nokogiri::XML::Document::NCNAME_START_CHAR = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/document_fragment.rb#6 +class Nokogiri::XML::DocumentFragment < ::Nokogiri::XML::Node + # Create a new DocumentFragment from +tags+. + # + # If +ctx+ is present, it is used as a context node for the + # subtree created, e.g., namespaces will be resolved relative + # to +ctx+. + # + # @return [DocumentFragment] a new instance of DocumentFragment + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#19 + def initialize(document, tags = T.unsafe(nil), ctx = T.unsafe(nil), options = T.unsafe(nil)); end + + # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] + # + # Search this fragment for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # For more information see Nokogiri::XML::Searchable#css + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#102 + def css(*args); end + + # :call-seq: deconstruct() → Array + # + # Returns the root nodes of this document fragment as an array, to use in pattern matching. + # + # 💡 Note that text nodes are returned as well as elements. If you wish to operate only on + # root elements, you should deconstruct the array returned by + # DocumentFragment#elements. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *Example* + # + # frag = Nokogiri::HTML5.fragment(<<~HTML) + #
Start
+ # This is a shortcut for you. + #
End
+ # HTML + # + # frag.deconstruct + # # => [#(Element:0x35c { name = "div", children = [ #(Text "Start")] }), + # # #(Text "\n" + "This is a "), + # # #(Element:0x370 { + # # name = "a", + # # attributes = [ #(Attr:0x384 { name = "href", value = "#jump" })], + # # children = [ #(Text "shortcut")] + # # }), + # # #(Text " for you.\n"), + # # #(Element:0x398 { name = "div", children = [ #(Text "End")] }), + # # #(Text "\n")] + # + # *Example* only the elements, not the text nodes. + # + # frag.elements.deconstruct + # # => [#(Element:0x35c { name = "div", children = [ #(Text "Start")] }), + # # #(Element:0x370 { + # # name = "a", + # # attributes = [ #(Attr:0x384 { name = "href", value = "#jump" })], + # # children = [ #(Text "shortcut")] + # # }), + # # #(Element:0x398 { name = "div", children = [ #(Text "End")] })] + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#190 + def deconstruct; end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#42 + def dup; end + + # A list of Nokogiri::XML::SyntaxError found when parsing a document + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#136 + def errors; end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#140 + def errors=(things); end + + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#144 + def fragment(data); end + + # return the name for DocumentFragment + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#54 + def name; end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this fragment for +paths+. +paths+ must be one or more XPath or CSS queries. + # + # For more information see Nokogiri::XML::Searchable#search + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#121 + def search(*rules); end + + # Convert this DocumentFragment to a string + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#60 + def serialize; end + + # Convert this DocumentFragment to html + # See Nokogiri::XML::NodeSet#to_html + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#67 + def to_html(*args); end + + # Convert this DocumentFragment to a string + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#60 + def to_s; end + + # Convert this DocumentFragment to xhtml + # See Nokogiri::XML::NodeSet#to_xhtml + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#79 + def to_xhtml(*args); end + + # Convert this DocumentFragment to xml + # See Nokogiri::XML::NodeSet#to_xml + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#91 + def to_xml(*args); end + + private + + # fix for issue 770 + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#197 + def namespace_declarations(ctx); end + + class << self + def new(*_arg0); end + + # Create a Nokogiri::XML::DocumentFragment from +tags+ + # + # source://nokogiri//lib/nokogiri/xml/document_fragment.rb#9 + def parse(tags, options = T.unsafe(nil), &block); end + end +end + +class Nokogiri::XML::Element < ::Nokogiri::XML::Node; end + +# Represents the allowed content in an Element Declaration inside a DTD: +# +# +# +# ]> +# +# +# ElementContent represents the tree inside the tag shown above +# that lists the possible content for the div1 tag. +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#16 +class Nokogiri::XML::ElementContent + # Get the children of this ElementContent node + # + # source://nokogiri//lib/nokogiri/xml/element_content.rb#33 + def children; end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/xml/element_content.rb#29 + def document; end + + def name; end + def occur; end + def prefix; end + def type; end + + private + + def c1; end + def c2; end +end + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#19 +Nokogiri::XML::ElementContent::ELEMENT = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#26 +Nokogiri::XML::ElementContent::MULT = T.let(T.unsafe(nil), Integer) + +# Possible content occurrences +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#24 +Nokogiri::XML::ElementContent::ONCE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#25 +Nokogiri::XML::ElementContent::OPT = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#21 +Nokogiri::XML::ElementContent::OR = T.let(T.unsafe(nil), Integer) + +# Possible definitions of type +# +# source://nokogiri//lib/nokogiri/xml/element_content.rb#18 +Nokogiri::XML::ElementContent::PCDATA = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#27 +Nokogiri::XML::ElementContent::PLUS = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_content.rb#20 +Nokogiri::XML::ElementContent::SEQ = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/element_decl.rb#5 +class Nokogiri::XML::ElementDecl < ::Nokogiri::XML::Node + def content; end + def element_type; end + + # source://nokogiri//lib/nokogiri/xml/element_decl.rb#10 + def inspect; end + + def prefix; end +end + +# source://nokogiri//lib/nokogiri/xml/entity_decl.rb#5 +class Nokogiri::XML::EntityDecl < ::Nokogiri::XML::Node + def content; end + def entity_type; end + def external_id; end + + # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#16 + def inspect; end + + def original_content; end + def system_id; end + + class << self + # source://nokogiri//lib/nokogiri/xml/entity_decl.rb#12 + def new(name, doc, *args); end + end +end + +Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_PARSED = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::EXTERNAL_GENERAL_UNPARSED = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::EXTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_GENERAL = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_PARAMETER = T.let(T.unsafe(nil), Integer) +Nokogiri::XML::EntityDecl::INTERNAL_PREDEFINED = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/entity_reference.rb#5 +class Nokogiri::XML::EntityReference < ::Nokogiri::XML::Node + # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#6 + def children; end + + # source://nokogiri//lib/nokogiri/xml/entity_reference.rb#15 + def inspect_attributes; end + + class << self + def new(*_arg0); end + end +end + +# source://nokogiri//lib/nokogiri/xml/namespace.rb#6 +class Nokogiri::XML::Namespace + include ::Nokogiri::XML::PP::Node + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Namespace, to use in pattern matching. + # + # Valid keys and their values: + # - +prefix+ → (String, nil) The namespace's prefix, or +nil+ if there is no prefix (e.g., default namespace). + # - +href+ → (String) The namespace's URI + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # + # + # + # XML + # + # doc.root.elements.first.namespace + # # => #(Namespace:0x35c { href = "http://nokogiri.org/ns/default" }) + # + # doc.root.elements.first.namespace.deconstruct_keys([:prefix, :href]) + # # => {:prefix=>nil, :href=>"http://nokogiri.org/ns/default"} + # + # doc.root.elements.last.namespace + # # => #(Namespace:0x370 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # }) + # + # doc.root.elements.last.namespace.deconstruct_keys([:prefix, :href]) + # # => {:prefix=>"noko", :href=>"http://nokogiri.org/ns/noko"} + # + # source://nokogiri//lib/nokogiri/xml/namespace.rb#47 + def deconstruct_keys(keys); end + + # Returns the value of attribute document. + # + # source://nokogiri//lib/nokogiri/xml/namespace.rb#8 + def document; end + + def href; end + def prefix; end + + private + + # source://nokogiri//lib/nokogiri/xml/namespace.rb#53 + def inspect_attributes; end +end + +# Nokogiri::XML::Node is the primary API you'll use to interact with your Document. +# +# == Attributes +# +# A Nokogiri::XML::Node may be treated similarly to a hash with regard to attributes. For +# example: +# +# node = Nokogiri::XML::DocumentFragment.parse("link").at_css("a") +# node.to_html # => "link" +# node['href'] # => "#foo" +# node.keys # => ["href", "id"] +# node.values # => ["#foo", "link"] +# node['class'] = 'green' # => "green" +# node.to_html # => "link" +# +# See the method group entitled Node@Working+With+Node+Attributes for the full set of methods. +# +# == Navigation +# +# Nokogiri::XML::Node also has methods that let you move around your tree: +# +# [#parent, #children, #next, #previous] +# Navigate up, down, or through siblings. +# +# See the method group entitled Node@Traversing+Document+Structure for the full set of methods. +# +# == Serialization +# +# When printing or otherwise emitting a document or a node (and its subtree), there are a few +# methods you might want to use: +# +# [#content, #text, #inner_text, #to_str] +# These methods will all **emit plaintext**, +# meaning that entities will be replaced (e.g., +<+ will be replaced with +<+), meaning +# that any sanitizing will likely be un-done in the output. +# +# [#to_s, #to_xml, #to_html, #inner_html] +# These methods will all **emit properly-escaped markup**, meaning that it's suitable for +# consumption by browsers, parsers, etc. +# +# See the method group entitled Node@Serialization+and+Generating+Output for the full set of methods. +# +# == Searching +# +# You may search this node's subtree using methods like #xpath and #css. +# +# See the method group entitled Node@Searching+via+XPath+or+CSS+Queries for the full set of methods. +# +# source://nokogiri//lib/nokogiri/xml/node.rb#56 +class Nokogiri::XML::Node + include ::Nokogiri::HTML5::Node + include ::Nokogiri::XML::PP::Node + include ::Nokogiri::XML::Searchable + include ::Nokogiri::ClassResolver + include ::Enumerable + + # :call-seq: + # new(name, document) -> Nokogiri::XML::Node + # new(name, document) { |node| ... } -> Nokogiri::XML::Node + # + # Create a new node with +name+ that belongs to +document+. + # + # If you intend to add a node to a document tree, it's likely that you will prefer one of the + # Nokogiri::XML::Node methods like #add_child, #add_next_sibling, #replace, etc. which will + # both create an element (or subtree) and place it in the document tree. + # + # Another alternative, if you are concerned about performance, is + # Nokogiri::XML::Document#create_element which accepts additional arguments for contents or + # attributes but (like this method) avoids parsing markup. + # + # [Parameters] + # - +name+ (String) + # - +document+ (Nokogiri::XML::Document) The document to which the the returned node will belong. + # [Yields] Nokogiri::XML::Node + # [Returns] Nokogiri::XML::Node + # + # @return [Node] a new instance of Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#126 + def initialize(name, document); end + + # Add +node_or_tags+ as a child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls (e.g., root << child1 << child2) + # + # Also see related method +add_child+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#256 + def <<(node_or_tags); end + + # Compare two Node objects with respect to their Document. Nodes from + # different documents cannot be compared. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1256 + def <=>(other); end + + # Test to see if this Node is equal to +other+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1246 + def ==(other); end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#512 + def [](name); end + + # :call-seq: []=(name, value) → value + # + # Update the attribute +name+ to +value+, or create the attribute if it does not exist. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute, + # see the example below. + # + # [Returns] +value+ + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] = "broad" + # child.to_html + # # => "" + # + # *Example:* Add a namespaced attribute. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # child = doc.at_css("child") + # child["size"] = "broad" + # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" } + # child.attribute("size").namespace = ns + # doc.to_html + # # => "\n" + + # # " \n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#550 + def []=(name, value); end + + # Accept a visitor. This method calls "visit" on +visitor+ with self. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1240 + def accept(visitor); end + + # Add +node_or_tags+ as a child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +<<+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#148 + def add_child(node_or_tags); end + + # :call-seq: add_class(names) → self + # + # Ensure HTML CSS classes are present on +self+. Any CSS classes in +names+ that already exist + # in the "class" attribute are _not_ added. Note that any existing duplicates in the + # "class" attribute are not removed. Compare with #append_class. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_add("class", names) + # + # See related: #kwattr_add, #classes, #append_class, #remove_class + # + # [Parameters] + # - +names+ (String, Array) + # + # CSS class names to be added to the Node's "class" attribute. May be a string containing + # whitespace-delimited names, or an Array of String names. Any class names already present + # will not be added. Any class names not present will be added. If no "class" attribute + # exists, one is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Ensure that the node has CSS class "section" + # + # node # =>
+ # node.add_class("section") # =>
+ # node.add_class("section") # =>
# duplicate not added + # + # *Example:* Ensure that the node has CSS classes "section" and "header", via a String argument + # + # Note that the CSS class "section" is not added because it is already present. + # Note also that the pre-existing duplicate CSS class "section" is not removed. + # + # node # =>
+ # node.add_class("section header") # =>
+ # + # *Example:* Ensure that the node has CSS classes "section" and "header", via an Array argument + # + # node # =>
+ # node.add_class(["section", "header"]) # =>
+ # + # source://nokogiri//lib/nokogiri/xml/node.rb#715 + def add_class(names); end + + def add_namespace(_arg0, _arg1); end + def add_namespace_definition(_arg0, _arg1); end + + # Insert +node_or_tags+ after this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +after+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#288 + def add_next_sibling(node_or_tags); end + + # Insert +node_or_tags+ before this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +before+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#271 + def add_previous_sibling(node_or_tags); end + + # Insert +node_or_tags+ after this node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls. + # + # Also see related method +add_next_sibling+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#318 + def after(node_or_tags); end + + # Get a list of ancestor Node for this Node. If +selector+ is given, + # the ancestors must match +selector+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1209 + def ancestors(selector = T.unsafe(nil)); end + + # :call-seq: append_class(names) → self + # + # Add HTML CSS classes to +self+, regardless of duplication. Compare with #add_class. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_append("class", names) + # + # See related: #kwattr_append, #classes, #add_class, #remove_class + # + # [Parameters] + # - +names+ (String, Array) + # + # CSS class names to be appended to the Node's "class" attribute. May be a string containing + # whitespace-delimited names, or an Array of String names. All class names passed in will be + # appended to the "class" attribute even if they are already present in the attribute + # value. If no "class" attribute exists, one is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Append "section" to the node's CSS "class" attribute + # + # node # =>
+ # node.append_class("section") # =>
+ # node.append_class("section") # =>
# duplicate added! + # + # *Example:* Append "section" and "header" to the noded's CSS "class" attribute, via a String argument + # + # Note that the CSS class "section" is appended even though it is already present + # + # node # =>
+ # node.append_class("section header") # =>
+ # + # *Example:* Append "section" and "header" to the node's CSS "class" attribute, via an Array argument + # + # node # =>
+ # node.append_class(["section", "header"]) # =>
+ # node.append_class(["section", "header"]) # =>
+ # + # source://nokogiri//lib/nokogiri/xml/node.rb#759 + def append_class(names); end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#512 + def attr(name); end + + def attribute(_arg0); end + def attribute_nodes; end + def attribute_with_ns(_arg0, _arg1); end + + # :call-seq: attributes() → Hash + # + # Fetch this node's attributes. + # + # ⚠ Because the keys do not include any namespace information for the attribute, in case of a + # simple name collision, not all attributes will be returned. In this case, you will need to + # use #attribute_nodes. + # + # [Returns] + # Hash containing attributes belonging to +self+. The hash keys are String attribute + # names (without the namespace), and the hash values are Nokogiri::XML::Attr. + # + # *Example* with no namespaces: + # + # doc = Nokogiri::XML("") + # doc.at_css("child").attributes + # # => {"size"=>#(Attr:0x550 { name = "size", value = "large" }), + # # "class"=>#(Attr:0x564 { name = "class", value = "big wide tall" })} + # + # *Example* with a namespace: + # + # doc = Nokogiri::XML("") + # doc.at_css("child").attributes + # # => {"size"=> + # # #(Attr:0x550 { + # # name = "size", + # # namespace = #(Namespace:0x564 { + # # prefix = "desc", + # # href = "http://example.com/sizes" + # # }), + # # value = "large" + # # })} + # + # *Example* with an attribute name collision: + # + # ⚠ Note that only one of the attributes is returned in the Hash. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child").attributes + # # => {"size"=> + # # #(Attr:0x550 { + # # name = "size", + # # namespace = #(Namespace:0x564 { + # # prefix = "height", + # # href = "http://example.com/heights" + # # }), + # # value = "tall" + # # })} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#609 + def attributes; end + + # Insert +node_or_tags+ before this node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns +self+, to support chaining of calls. + # + # Also see related method +add_previous_sibling+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#304 + def before(node_or_tags); end + + def blank?; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1398 + def canonicalize(mode = T.unsafe(nil), inclusive_namespaces = T.unsafe(nil), with_comments = T.unsafe(nil)); end + + # Returns true if this is a CDATA + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1130 + def cdata?; end + + def child; end + def children; end + + # Set the content for this Node +node_or_tags+ + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # Also see related method +inner_html=+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#349 + def children=(node_or_tags); end + + # :call-seq: classes() → Array + # + # Fetch CSS class names of a Node. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_values("class") + # + # See related: #kwattr_values, #add_class, #append_class, #remove_class + # + # [Returns] + # The CSS classes (Array of String) present in the Node's "class" attribute. If the + # attribute is empty or non-existent, the return value is an empty array. + # + # *Example* + # + # node # =>
+ # node.classes # => ["section", "title", "header"] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#669 + def classes; end + + def clone(*_arg0); end + + # Returns true if this is a Comment + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1125 + def comment?; end + + def content; end + + # Set the Node's content to a Text node containing +string+. The string gets XML escaped, not + # interpreted as markup. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#411 + def content=(string); end + + def create_external_subset(_arg0, _arg1, _arg2); end + def create_internal_subset(_arg0, _arg1, _arg2); end + + # Get the path to this node as a CSS expression + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1200 + def css_path; end + + # :call-seq: deconstruct_keys(array_of_names) → Hash + # + # Returns a hash describing the Node, to use in pattern matching. + # + # Valid keys and their values: + # - +name+ → (String) The name of this node, or "text" if it is a Text node. + # - +namespace+ → (Namespace, nil) The namespace of this node, or nil if there is no namespace. + # - +attributes+ → (Array) The attributes of this node. + # - +children+ → (Array) The children of this node. 💡 Note this includes text nodes. + # - +elements+ → (Array) The child elements of this node. 💡 Note this does not include text nodes. + # - +content+ → (String) The contents of all the text nodes in this node's subtree. See #content. + # - +inner_html+ → (String) The inner markup for the children of this node. See #inner_html. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # *Example* + # + # doc = Nokogiri::XML.parse(<<~XML) + # + # + # First + # Second + # + # XML + # + # doc.root.deconstruct_keys([:name, :namespace]) + # # => {:name=>"parent", + # # :namespace=> + # # #(Namespace:0x35c { href = "http://nokogiri.org/ns/default" })} + # + # doc.root.deconstruct_keys([:inner_html, :content]) + # # => {:content=>"\n" + " First\n" + " Second\n", + # # :inner_html=> + # # "\n" + + # # " First\n" + + # # " Second\n"} + # + # doc.root.elements.first.deconstruct_keys([:attributes]) + # # => {:attributes=> + # # [#(Attr:0x370 { name = "foo", value = "abc" }), + # # #(Attr:0x384 { + # # name = "bar", + # # namespace = #(Namespace:0x398 { + # # prefix = "noko", + # # href = "http://nokogiri.org/ns/noko" + # # }), + # # value = "def" + # # })]} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1459 + def deconstruct_keys(keys); end + + # Decorate this node with the decorators set up in this node's Document + # + # source://nokogiri//lib/nokogiri/xml/node.rb#132 + def decorate!; end + + # Adds a default namespace supplied as a string +url+ href, to self. + # The consequence is as an xmlns attribute with supplied argument were + # present in parsed XML. A default namespace set with this method will + # now show up in #attributes, but when this node is serialized to XML an + # "xmlns" attribute will appear. See also #namespace and #namespace= + # + # source://nokogiri//lib/nokogiri/xml/node.rb#427 + def default_namespace=(url); end + + # Remove the attribute named +name+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#643 + def delete(name); end + + # Fetch the Nokogiri::HTML4::ElementDescription for this node. Returns + # nil on XML documents and on unknown tags. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1167 + def description; end + + # Do xinclude substitution on the subtree below node. If given a block, a + # Nokogiri::XML::ParseOptions object initialized from +options+, will be + # passed to it, allowing more convenient modification of the parser options. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#454 + def do_xinclude(options = T.unsafe(nil)); end + + def document; end + + # Returns true if this is a Document + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1145 + def document?; end + + def dup(*_arg0); end + + # Iterate over each attribute name and value pair for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#635 + def each; end + + # Returns true if this is an Element node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1181 + def elem?; end + + # Returns true if this is an Element node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1181 + def element?; end + + def element_children; end + def elements; end + def encode_special_chars(_arg0); end + def external_subset; end + def first_element_child; end + + # Create a DocumentFragment containing +tags+ that is relative to _this_ + # context node. + # + # source://nokogiri//lib/nokogiri/html5/node.rb#65 + def fragment(tags); end + + # Returns true if this is a DocumentFragment + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1160 + def fragment?; end + + # :call-seq: [](name) → (String, nil) + # + # Fetch an attribute from this node. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes, use #attribute_with_ns. + # + # [Returns] (String, nil) value of the attribute +name+, or +nil+ if no matching attribute exists + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] # => "large" + # child["class"] # => "big wide tall" + # + # *Example:* Namespaced attributes will not be returned. + # + # ⚠ Note namespaced attributes may be accessed with #attribute or #attribute_with_ns + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # doc.at_css("child")["size"] # => nil + # doc.at_css("child").attribute("size").value # => "broad" + # doc.at_css("child").attribute_with_ns("size", "http://example.com/widths").value + # # => "broad" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#512 + def get_attribute(name); end + + def has_attribute?(_arg0); end + + # Returns true if this is an HTML4::Document or HTML5::Document node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1140 + def html?; end + + # Get the inner_html for this node's Node#children + # + # source://nokogiri//lib/nokogiri/html5/node.rb#28 + def inner_html(options = T.unsafe(nil)); end + + # Set the content for this Node to +node_or_tags+. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a Nokogiri::XML::DocumentFragment, or a String + # containing markup. + # + # ⚠ Please note that despite the name, this method will *not* always parse a String argument + # as HTML. A String argument will be parsed with the +DocumentFragment+ parser related to this + # node's document. + # + # For example, if the document is an HTML4::Document then the string will be parsed as HTML4 + # using HTML4::DocumentFragment; but if the document is an XML::Document then it will + # parse the string as XML using XML::DocumentFragment. + # + # Also see related method +children=+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#338 + def inner_html=(node_or_tags); end + + # :section: + def inner_text; end + + def internal_subset; end + def key?(_arg0); end + + # Get the attribute names for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#629 + def keys; end + + # :call-seq: + # kwattr_add(attribute_name, keywords) → self + # + # Ensure that values are present in a keyword attribute. + # + # Any values in +keywords+ that already exist in the Node's attribute values are _not_ + # added. Note that any existing duplicates in the attribute values are not removed. Compare + # with #kwattr_append. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #add_class, #kwattr_values, #kwattr_append, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be added to the attribute named +attribute_name+. May be a string containing + # whitespace-delimited values, or an Array of String values. Any values already present will + # not be added. Any values not present will be added. If the named attribute does not exist, + # it is created. + # + # [Returns] +self+ (Nokogiri::XML::Node) for ease of chaining method calls. + # + # *Example:* Ensure that a +Node+ has "nofollow" in its +rel+ attribute. + # + # Note that duplicates are not added. + # + # node # => + # node.kwattr_add("rel", "nofollow") # => + # node.kwattr_add("rel", "nofollow") # => + # + # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via a + # String argument. + # + # Note that "nofollow" is not added because it is already present. Note also that the + # pre-existing duplicate "nofollow" is not removed. + # + # node # => + # node.kwattr_add("rel", "nofollow noreferrer") # => + # + # *Example:* Ensure that a +Node+ has "nofollow" and "noreferrer" in its +rel+ attribute, via + # an Array argument. + # + # node # => + # node.kwattr_add("rel", ["nofollow", "noreferrer"]) # => + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#892 + def kwattr_add(attribute_name, keywords); end + + # :call-seq: + # kwattr_append(attribute_name, keywords) → self + # + # Add keywords to a Node's keyword attribute, regardless of duplication. Compare with + # #kwattr_add. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #append_class, #kwattr_values, #kwattr_add, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be added to the attribute named +attribute_name+. May be a string containing + # whitespace-delimited values, or an Array of String values. All values passed in will be + # appended to the named attribute even if they are already present in the attribute. If the + # named attribute does not exist, it is created. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* Append "nofollow" to the +rel+ attribute. + # + # Note that duplicates are added. + # + # node # => + # node.kwattr_append("rel", "nofollow") # => + # node.kwattr_append("rel", "nofollow") # => + # + # *Example:* Append "nofollow" and "noreferrer" to the +rel+ attribute, via a String argument. + # + # Note that "nofollow" is appended even though it is already present. + # + # node # => + # node.kwattr_append("rel", "nofollow noreferrer") # => + # + # + # *Example:* Append "nofollow" and "noreferrer" to the +rel+ attribute, via an Array argument. + # + # node # => + # node.kwattr_append("rel", ["nofollow", "noreferrer"]) # => + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#945 + def kwattr_append(attribute_name, keywords); end + + # :call-seq: + # kwattr_remove(attribute_name, keywords) → self + # + # Remove keywords from a keyword attribute. Any matching keywords that exist in the named + # attribute are removed, including any multiple entries. + # + # If no keywords remain after this operation, or if +keywords+ is +nil+, the attribute is + # deleted from the node. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #remove_class, #kwattr_values, #kwattr_add, #kwattr_append + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be modified. + # - +keywords+ (String, Array) + # Keywords to be removed from the attribute named +attribute_name+. May be a string + # containing whitespace-delimited values, or an Array of String values. Any keywords present + # in the named attribute will be removed. If no keywords remain, or if +keywords+ is nil, + # the attribute is deleted. + # + # [Returns] +self+ (Node) for ease of chaining method calls. + # + # *Example:* + # + # Note that the +rel+ attribute is deleted when empty. + # + # node # => link + # node.kwattr_remove("rel", "nofollow") # => link + # node.kwattr_remove("rel", "noreferrer") # => link + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#988 + def kwattr_remove(attribute_name, keywords); end + + # :call-seq: + # kwattr_values(attribute_name) → Array + # + # Fetch values from a keyword attribute of a Node. + # + # A "keyword attribute" is a node attribute that contains a set of space-delimited + # values. Perhaps the most familiar example of this is the HTML "class" attribute used to + # contain CSS classes. But other keyword attributes exist, for instance + # {the "rel" attribute}[https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel]. + # + # See also #classes, #kwattr_add, #kwattr_append, #kwattr_remove + # + # [Parameters] + # - +attribute_name+ (String) The name of the keyword attribute to be inspected. + # + # [Returns] + # (Array) The values present in the Node's +attribute_name+ attribute. If the + # attribute is empty or non-existent, the return value is an empty array. + # + # *Example:* + # + # node # => link + # node.kwattr_values("rel") # => ["nofollow", "noopener", "external"] + # + # Since v1.11.0 + # + # source://nokogiri//lib/nokogiri/xml/node.rb#838 + def kwattr_values(attribute_name); end + + def lang; end + def lang=(_arg0); end + def last_element_child; end + def line; end + def line=(_arg0); end + + # Returns true if this Node matches +selector+ + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1015 + def matches?(selector); end + + def name; end + def name=(_arg0); end + def namespace; end + + # Set the default namespace on this node (as would be defined with an + # "xmlns=" attribute in XML source), as a Namespace object +ns+. Note that + # a Namespace added this way will NOT be serialized as an xmlns attribute + # for this node. You probably want #default_namespace= instead, or perhaps + # #add_namespace_definition with a nil prefix argument. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#437 + def namespace=(ns); end + + def namespace_definitions; end + def namespace_scopes; end + def namespaced_key?(_arg0, _arg1); end + + # :call-seq: + # namespaces() → Hash + # + # Fetch all the namespaces on this node and its ancestors. + # + # Note that the keys in this hash XML attributes that would be used to define this namespace, + # such as "xmlns:prefix", not just the prefix. + # + # The default namespace for this node will be included with key "xmlns". + # + # See also #namespace_scopes + # + # [Returns] + # Hash containing all the namespaces on this node and its ancestors. The hash keys are the + # namespace prefix, and the hash value for each key is the namespace URI. + # + # *Example:* + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # + # + # EOF + # doc.at_xpath("//root:first", "root" => "http://example.com/root").namespaces + # # => {"xmlns"=>"http://example.com/root", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # doc.at_xpath("//child:second", "child" => "http://example.com/child").namespaces + # # => {"xmlns"=>"http://example.com/child", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # doc.at_xpath("//root:third", "root" => "http://example.com/root").namespaces + # # => {"xmlns:foo"=>"http://example.com/foo", + # # "xmlns"=>"http://example.com/root", + # # "xmlns:in_scope"=>"http://example.com/in_scope"} + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1116 + def namespaces; end + + def native_content=(_arg0); end + def next; end + + # Insert +node_or_tags+ after this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +after+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#288 + def next=(node_or_tags); end + + def next_element; end + def next_sibling; end + def node_name; end + def node_name=(_arg0); end + def node_type; end + def parent; end + + # Set the parent Node for this Node + # + # source://nokogiri//lib/nokogiri/xml/node.rb#417 + def parent=(parent_node); end + + # Parse +string_or_io+ as a document fragment within the context of + # *this* node. Returns a XML::NodeSet containing the nodes parsed from + # +string_or_io+. + # + # @yield [options] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1030 + def parse(string_or_io, options = T.unsafe(nil)); end + + def path; end + def pointer_id; end + + # Add +node_or_tags+ as the first child of this Node. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +add_child+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#168 + def prepend_child(node_or_tags); end + + def previous; end + + # Insert +node_or_tags+ before this Node (as a sibling). + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +before+. + # + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#271 + def previous=(node_or_tags); end + + def previous_element; end + def previous_sibling; end + + # Returns true if this is a ProcessingInstruction node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1150 + def processing_instruction?; end + + # Is this a read only node? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1175 + def read_only?; end + + def remove; end + + # Remove the attribute named +name+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#643 + def remove_attribute(name); end + + # :call-seq: + # remove_class(css_classes) → self + # + # Remove HTML CSS classes from this node. Any CSS class names in +css_classes+ that exist in + # this node's "class" attribute are removed, including any multiple entries. + # + # If no CSS classes remain after this operation, or if +css_classes+ is +nil+, the "class" + # attribute is deleted from the node. + # + # This is a convenience function and is equivalent to: + # + # node.kwattr_remove("class", css_classes) + # + # Also see #kwattr_remove, #classes, #add_class, #append_class + # + # [Parameters] + # - +css_classes+ (String, Array) + # + # CSS class names to be removed from the Node's + # "class" attribute. May be a string containing whitespace-delimited names, or an Array of + # String names. Any class names already present will be removed. If no CSS classes remain, + # the "class" attribute is deleted. + # + # [Returns] +self+ (Nokogiri::XML::Node) for ease of chaining method calls. + # + # *Example*: Deleting a CSS class + # + # Note that all instances of the class "section" are removed from the "class" attribute. + # + # node # =>
+ # node.remove_class("section") # =>
+ # + # *Example*: Deleting the only remaining CSS class + # + # Note that the attribute is removed once there are no remaining classes. + # + # node # =>
+ # node.remove_class("section") # =>
+ # + # *Example*: Deleting multiple CSS classes + # + # Note that the "class" attribute is deleted once it's empty. + # + # node # =>
+ # node.remove_class(["section", "float"]) # =>
+ # + # source://nokogiri//lib/nokogiri/xml/node.rb#809 + def remove_class(names = T.unsafe(nil)); end + + # Replace this Node with +node_or_tags+. + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # containing markup. + # + # Returns the reparented node (if +node_or_tags+ is a Node), or NodeSet (if +node_or_tags+ is + # a DocumentFragment, NodeSet, or String). + # + # Also see related method +swap+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#369 + def replace(node_or_tags); end + + # Serialize Node using +options+. Save options can also be set using a block. + # + # See also Nokogiri::XML::Node::SaveOptions and Node@Serialization+and+Generating+Output. + # + # These two statements are equivalent: + # + # node.serialize(:encoding => 'UTF-8', :save_with => FORMAT | AS_XML) + # + # or + # + # node.serialize(:encoding => 'UTF-8') do |config| + # config.format.as_xml + # end + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1280 + def serialize(*args, &block); end + + # :call-seq: []=(name, value) → value + # + # Update the attribute +name+ to +value+, or create the attribute if it does not exist. + # + # ⚠ Note that attributes with namespaces cannot be accessed with this method. To access + # namespaced attributes for update, use #attribute_with_ns. To add a namespaced attribute, + # see the example below. + # + # [Returns] +value+ + # + # *Example* + # + # doc = Nokogiri::XML("") + # child = doc.at_css("child") + # child["size"] = "broad" + # child.to_html + # # => "" + # + # *Example:* Add a namespaced attribute. + # + # doc = Nokogiri::XML(<<~EOF) + # + # + # + # EOF + # child = doc.at_css("child") + # child["size"] = "broad" + # ns = doc.root.namespace_definitions.find { |ns| ns.prefix == "width" } + # child.attribute("size").namespace = ns + # doc.to_html + # # => "\n" + + # # " \n" + + # # "\n" + # + # source://nokogiri//lib/nokogiri/xml/node.rb#550 + def set_attribute(name, value); end + + # Swap this Node for +node_or_tags+ + # + # +node_or_tags+ can be a Nokogiri::XML::Node, a ::DocumentFragment, a ::NodeSet, or a String + # Containing markup. + # + # Returns self, to support chaining of calls. + # + # Also see related method +replace+. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#403 + def swap(node_or_tags); end + + def text; end + + # Returns true if this is a Text node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1155 + def text?; end + + # Serialize this Node to HTML + # + # doc.to_html + # + # See Node#write_to for a list of +options+. For formatted output, + # use Node#to_xhtml instead. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1306 + def to_html(options = T.unsafe(nil)); end + + # Turn this node in to a string. If the document is HTML, this method + # returns html. If the document is XML, this method returns XML. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1190 + def to_s; end + + def to_str; end + + # Serialize this Node to XHTML using +options+ + # + # doc.to_xhtml(:indent => 5, :encoding => 'UTF-8') + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1327 + def to_xhtml(options = T.unsafe(nil)); end + + # Serialize this Node to XML using +options+ + # + # doc.to_xml(:indent => 5, :encoding => 'UTF-8') + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1316 + def to_xml(options = T.unsafe(nil)); end + + # Yields self and all children to +block+ recursively. + # + # @yield [_self] + # @yieldparam _self [Nokogiri::XML::Node] the object that the method was called on + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1233 + def traverse(&block); end + + def type; end + def unlink; end + + # Does this Node's attributes include + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#623 + def value?(value); end + + # Get the attribute values for this Node. + # + # source://nokogiri//lib/nokogiri/xml/node.rb#617 + def values; end + + # :call-seq: + # wrap(markup) -> self + # wrap(node) -> self + # + # Wrap this Node with the node parsed from +markup+ or a dup of the +node+. + # + # [Parameters] + # - *markup* (String) + # Markup that is parsed and used as the wrapper. This node's parent, if it exists, is used + # as the context node for parsing; otherwise the associated document is used. If the parsed + # fragment has multiple roots, the first root node is used as the wrapper. + # - *node* (Nokogiri::XML::Node) + # An element that is `#dup`ed and used as the wrapper. + # + # [Returns] +self+, to support chaining. + # + # Also see NodeSet#wrap + # + # *Example* with a +String+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # asdf + # + # HTML + # doc.at_css("a").wrap("
") + # doc.to_html + # # => + # # + # # + # + # *Example* with a +Node+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # asdf + # + # HTML + # doc.at_css("a").wrap(doc.create_element("div")) + # doc.to_html + # # + # # + # # + # + # source://nokogiri//lib/nokogiri/xml/node.rb#223 + def wrap(node_or_tags); end + + # Write Node as HTML to +io+ with +options+ + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1375 + def write_html_to(io, options = T.unsafe(nil)); end + + # Write Node to +io+ with +options+. +options+ modify the output of + # this method. Valid options are: + # + # * +:encoding+ for changing the encoding + # * +:indent_text+ the indentation text, defaults to one space + # * +:indent+ the number of +:indent_text+ to use, defaults to 2 + # * +:save_with+ a combination of SaveOptions constants. + # + # To save with UTF-8 indented twice: + # + # node.write_to(io, :encoding => 'UTF-8', :indent => 2) + # + # To save indented with two dashes: + # + # node.write_to(io, :indent_text => '-', :indent => 2) + # + # @yield [config] + # + # source://nokogiri//lib/nokogiri/html5/node.rb#36 + def write_to(io, *options); end + + # Write Node as XHTML to +io+ with +options+ + # + # See Node#write_to for a list of +options+ + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1383 + def write_xhtml_to(io, options = T.unsafe(nil)); end + + # Write Node as XML to +io+ with +options+ + # + # doc.write_xml_to io, :encoding => 'UTF-8' + # + # See Node#write_to for a list of options + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1393 + def write_xml_to(io, options = T.unsafe(nil)); end + + # Returns true if this is an XML::Document node + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1135 + def xml?; end + + protected + + # @raise [ArgumentError] + # + # source://nokogiri//lib/nokogiri/xml/node.rb#1473 + def coerce(data); end + + private + + def add_child_node(_arg0); end + + # source://nokogiri//lib/nokogiri/html5/node.rb#78 + def add_child_node_and_reparent_attrs(node); end + + def add_next_sibling_node(_arg0); end + def add_previous_sibling_node(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1507 + def add_sibling(next_or_previous, node_or_tags); end + + def compare(_arg0); end + def dump_html; end + def get(_arg0); end + def html_standard_serialize(_arg0); end + def in_context(_arg0, _arg1); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1546 + def inspect_attributes; end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1495 + def keywordify(keywords); end + + def native_write_to(_arg0, _arg1, _arg2, _arg3); end + def prepend_newline?; end + def process_xincludes(_arg0); end + def replace_node(_arg0); end + def set(_arg0, _arg1); end + def set_namespace(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1532 + def to_format(save_option, options); end + + # source://nokogiri//lib/nokogiri/xml/node.rb#1539 + def write_format_to(save_option, io, options); end + + class << self + def new(*_arg0); end + end +end + +# Attribute declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#93 +Nokogiri::XML::Node::ATTRIBUTE_DECL = T.let(T.unsafe(nil), Integer) + +# Attribute node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#65 +Nokogiri::XML::Node::ATTRIBUTE_NODE = T.let(T.unsafe(nil), Integer) + +# CDATA node type, see Nokogiri::XML::Node#cdata? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#69 +Nokogiri::XML::Node::CDATA_SECTION_NODE = T.let(T.unsafe(nil), Integer) + +# Comment node type, see Nokogiri::XML::Node#comment? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#77 +Nokogiri::XML::Node::COMMENT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1406 +Nokogiri::XML::Node::DECONSTRUCT_KEYS = T.let(T.unsafe(nil), Array) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1407 +Nokogiri::XML::Node::DECONSTRUCT_METHODS = T.let(T.unsafe(nil), Hash) + +# DOCB document node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#103 +Nokogiri::XML::Node::DOCB_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) + +# Document fragment node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#83 +Nokogiri::XML::Node::DOCUMENT_FRAG_NODE = T.let(T.unsafe(nil), Integer) + +# Document node type, see Nokogiri::XML::Node#xml? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#79 +Nokogiri::XML::Node::DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) + +# Document type node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#81 +Nokogiri::XML::Node::DOCUMENT_TYPE_NODE = T.let(T.unsafe(nil), Integer) + +# DTD node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#89 +Nokogiri::XML::Node::DTD_NODE = T.let(T.unsafe(nil), Integer) + +# Element declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#91 +Nokogiri::XML::Node::ELEMENT_DECL = T.let(T.unsafe(nil), Integer) + +# Element node type, see Nokogiri::XML::Node#element? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#63 +Nokogiri::XML::Node::ELEMENT_NODE = T.let(T.unsafe(nil), Integer) + +# Entity declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#95 +Nokogiri::XML::Node::ENTITY_DECL = T.let(T.unsafe(nil), Integer) + +# Entity node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#73 +Nokogiri::XML::Node::ENTITY_NODE = T.let(T.unsafe(nil), Integer) + +# Entity reference node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#71 +Nokogiri::XML::Node::ENTITY_REF_NODE = T.let(T.unsafe(nil), Integer) + +# HTML document node type, see Nokogiri::XML::Node#html? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#87 +Nokogiri::XML::Node::HTML_DOCUMENT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1550 +Nokogiri::XML::Node::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# Namespace declaration type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#97 +Nokogiri::XML::Node::NAMESPACE_DECL = T.let(T.unsafe(nil), Integer) + +# Notation node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#85 +Nokogiri::XML::Node::NOTATION_NODE = T.let(T.unsafe(nil), Integer) + +# PI node type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#75 +Nokogiri::XML::Node::PI_NODE = T.let(T.unsafe(nil), Integer) + +# Save options for serializing nodes. +# See the method group entitled Node@Serialization+and+Generating+Output for usage. +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#9 +class Nokogiri::XML::Node::SaveOptions + # Create a new SaveOptions object with +options+ + # + # @return [SaveOptions] a new instance of SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#47 + def initialize(options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def as_html; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def as_html?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def as_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def as_xhtml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def as_xml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def as_xml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def default_html; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def default_html?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def default_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def default_xhtml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def default_xml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def default_xml?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def format; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def format?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def no_declaration; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def no_declaration?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def no_empty_tags; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def no_empty_tags?; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#53 + def no_xhtml; end + + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#58 + def no_xhtml?; end + + # Integer representation of the SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#44 + def options; end + + # Integer representation of the SaveOptions + # + # source://nokogiri//lib/nokogiri/xml/node/save_options.rb#44 + def to_i; end +end + +# Save as HTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#23 +Nokogiri::XML::Node::SaveOptions::AS_HTML = T.let(T.unsafe(nil), Integer) + +# Save as XHTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#19 +Nokogiri::XML::Node::SaveOptions::AS_XHTML = T.let(T.unsafe(nil), Integer) + +# Save as XML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#21 +Nokogiri::XML::Node::SaveOptions::AS_XML = T.let(T.unsafe(nil), Integer) + +# the default for HTML document +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#38 +Nokogiri::XML::Node::SaveOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) + +# the default for XHTML document +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#40 +Nokogiri::XML::Node::SaveOptions::DEFAULT_XHTML = T.let(T.unsafe(nil), Integer) + +# the default for XML documents +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#36 +Nokogiri::XML::Node::SaveOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) + +# Format serialized xml +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#11 +Nokogiri::XML::Node::SaveOptions::FORMAT = T.let(T.unsafe(nil), Integer) + +# Do not include declarations +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#13 +Nokogiri::XML::Node::SaveOptions::NO_DECLARATION = T.let(T.unsafe(nil), Integer) + +# Do not include empty tags +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#15 +Nokogiri::XML::Node::SaveOptions::NO_EMPTY_TAGS = T.let(T.unsafe(nil), Integer) + +# Do not save XHTML +# +# source://nokogiri//lib/nokogiri/xml/node/save_options.rb#17 +Nokogiri::XML::Node::SaveOptions::NO_XHTML = T.let(T.unsafe(nil), Integer) + +# Text node type, see Nokogiri::XML::Node#text? +# +# source://nokogiri//lib/nokogiri/xml/node.rb#67 +Nokogiri::XML::Node::TEXT_NODE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/node.rb#1529 +Nokogiri::XML::Node::USING_LIBXML_WITH_BROKEN_SERIALIZATION = T.let(T.unsafe(nil), FalseClass) + +# XInclude end type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#101 +Nokogiri::XML::Node::XINCLUDE_END = T.let(T.unsafe(nil), Integer) + +# XInclude start type +# +# source://nokogiri//lib/nokogiri/xml/node.rb#99 +Nokogiri::XML::Node::XINCLUDE_START = T.let(T.unsafe(nil), Integer) + +# A NodeSet contains a list of Nokogiri::XML::Node objects. Typically +# a NodeSet is return as a result of searching a Document via +# Nokogiri::XML::Searchable#css or Nokogiri::XML::Searchable#xpath +# +# source://nokogiri//lib/nokogiri/xml/node_set.rb#10 +class Nokogiri::XML::NodeSet + include ::Nokogiri::XML::Searchable + include ::Enumerable + + # Create a NodeSet with +document+ defaulting to +list+ + # + # @return [NodeSet] a new instance of NodeSet + # @yield [_self] + # @yieldparam _self [Nokogiri::XML::NodeSet] the object that the method was called on + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#20 + def initialize(document, list = T.unsafe(nil)); end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # Or, if passed an integer, index into the NodeSet: + # + # node_set.at(3) # same as node_set[3] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#119 + def %(*args); end + + def &(_arg0); end + def +(_arg0); end + def -(_arg0); end + def <<(_arg0); end + + # Equality -- Two NodeSets are equal if the contain the same number + # of elements and if each element is equal to the corresponding + # element in the other NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#393 + def ==(other); end + + def [](*_arg0); end + + # Add the class attribute +name+ to all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#add_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#139 + def add_class(name); end + + # Insert +datum+ after the last Node in this NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#69 + def after(datum); end + + # Append the class attribute +name+ to all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#append_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#151 + def append_class(name); end + + # call-seq: search *paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class] + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # Or, if passed an integer, index into the NodeSet: + # + # node_set.at(3) # same as node_set[3] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#119 + def at(*args); end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#203 + def attr(key, value = T.unsafe(nil), &block); end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#203 + def attribute(key, value = T.unsafe(nil), &block); end + + # Insert +datum+ before the first Node in this NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#63 + def before(datum); end + + # Returns a new NodeSet containing all the children of all the nodes in + # the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#406 + def children; end + + def clone; end + + # call-seq: css *rules, [namespace-bindings, custom-pseudo-class] + # + # Search this node set for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # For more information see Nokogiri::XML::Searchable#css + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#83 + def css(*args); end + + # :call-seq: deconstruct() → Array + # + # Returns the members of this NodeSet as an array, to use in pattern matching. + # + # ⚡ This is an experimental feature, available since v1.14.0 + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#440 + def deconstruct; end + + def delete(_arg0); end + + # The Document this NodeSet is associated with + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#15 + def document; end + + # The Document this NodeSet is associated with + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#15 + def document=(_arg0); end + + def dup; end + + # Iterate over each node, yielding to +block+ + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#231 + def each; end + + # Is this NodeSet empty? + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#45 + def empty?; end + + # Filter this list for nodes that match +expr+ + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#130 + def filter(expr); end + + # Get the first element of the NodeSet. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#29 + def first(n = T.unsafe(nil)); end + + def include?(_arg0); end + + # Returns the index of the first node in self that is == to +node+ or meets the given block. Returns nil if no match is found. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#51 + def index(node = T.unsafe(nil)); end + + # Get the inner html of all contained Node objects + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#260 + def inner_html(*args); end + + # Get the inner text of all contained Node objects + # + # Note: This joins the text of all Node objects in the NodeSet: + # + # doc = Nokogiri::XML('foobar') + # doc.css('d').text # => "foobar" + # + # Instead, if you want to return the text of all nodes in the NodeSet: + # + # doc.css('d').map(&:text) # => ["foo", "bar"] + # + # See Nokogiri::XML::Node#content for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#253 + def inner_text; end + + # Return a nicely formated string representation + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#427 + def inspect; end + + # Get the last element of the NodeSet. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#39 + def last; end + + def length; end + + # Removes the last element from set and returns it, or +nil+ if + # the set is empty + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#374 + def pop; end + + def push(_arg0); end + def remove; end + + # Remove the attributed named +name+ from all Node objects in the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#223 + def remove_attr(name); end + + # Remove the attributed named +name+ from all Node objects in the NodeSet + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#223 + def remove_attribute(name); end + + # Remove the class attribute +name+ from all Node objects in the + # NodeSet. + # + # See Nokogiri::XML::Node#remove_class for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#163 + def remove_class(name = T.unsafe(nil)); end + + # Returns a new NodeSet containing all the nodes in the NodeSet + # in reverse order + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#417 + def reverse; end + + # Set attributes on each Node in the NodeSet, or get an + # attribute from the first Node in the NodeSet. + # + # To get an attribute from the first Node in a NodeSet: + # + # node_set.attr("href") # => "https://www.nokogiri.org" + # + # Note that an empty NodeSet will return nil when +#attr+ is called as a getter. + # + # To set an attribute on each node, +key+ can either be an + # attribute name, or a Hash of attribute names and values. When + # called as a setter, +#attr+ returns the NodeSet. + # + # If +key+ is an attribute name, then either +value+ or +block+ + # must be passed. + # + # If +key+ is a Hash then attributes will be set for each + # key/value pair: + # + # node_set.attr("href" => "https://www.nokogiri.org", "class" => "member") + # + # If +value+ is passed, it will be used as the attribute value + # for all nodes: + # + # node_set.attr("href", "https://www.nokogiri.org") + # + # If +block+ is passed, it will be called on each Node object in + # the NodeSet and the return value used as the attribute value + # for that node: + # + # node_set.attr("class") { |node| node.name } + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#203 + def set(key, value = T.unsafe(nil), &block); end + + # Returns the first element of the NodeSet and removes it. Returns + # +nil+ if the set is empty. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#383 + def shift; end + + def size; end + def slice(*_arg0); end + + # Get the inner text of all contained Node objects + # + # Note: This joins the text of all Node objects in the NodeSet: + # + # doc = Nokogiri::XML('foobar') + # doc.css('d').text # => "foobar" + # + # Instead, if you want to return the text of all nodes in the NodeSet: + # + # doc.css('d').map(&:text) # => ["foo", "bar"] + # + # See Nokogiri::XML::Node#content for more information. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#253 + def text; end + + def to_a; end + def to_ary; end + + # Convert this NodeSet to HTML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#341 + def to_html(*args); end + + # Convert this NodeSet to a string. + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#335 + def to_s; end + + # Convert this NodeSet to XHTML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#358 + def to_xhtml(*args); end + + # Convert this NodeSet to XML + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#364 + def to_xml(*args); end + + def unlink; end + + # :call-seq: + # wrap(markup) -> self + # wrap(node) -> self + # + # Wrap each member of this NodeSet with the node parsed from +markup+ or a dup of the +node+. + # + # [Parameters] + # - *markup* (String) + # Markup that is parsed, once per member of the NodeSet, and used as the wrapper. Each + # node's parent, if it exists, is used as the context node for parsing; otherwise the + # associated document is used. If the parsed fragment has multiple roots, the first root + # node is used as the wrapper. + # - *node* (Nokogiri::XML::Node) + # An element that is `#dup`ed and used as the wrapper. + # + # [Returns] +self+, to support chaining. + # + # ⚠ Note that if a +String+ is passed, the markup will be parsed once per node in the + # NodeSet. You can avoid this overhead in cases where you know exactly the wrapper you wish to + # use by passing a +Node+ instead. + # + # Also see Node#wrap + # + # *Example* with a +String+ argument: + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # a + # b + # c + # d + # + # HTML + # doc.css("a").wrap("
") + # doc.to_html + # # => + # # + # # + # # + # # + # # + # + # *Example* with a +Node+ argument + # + # 💡 Note that this is faster than the equivalent call passing a +String+ because it avoids + # having to reparse the wrapper markup for each node. + # + # doc = Nokogiri::HTML5(<<~HTML) + # + # a + # b + # c + # d + # + # HTML + # doc.css("a").wrap(doc.create_element("div")) + # doc.to_html + # # => + # # + # # + # # + # # + # # + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#328 + def wrap(node_or_tags); end + + # call-seq: xpath *paths, [namespace-bindings, variable-bindings, custom-handler-class] + # + # Search this node set for XPath +paths+. +paths+ must be one or more XPath + # queries. + # + # For more information see Nokogiri::XML::Searchable#xpath + # + # source://nokogiri//lib/nokogiri/xml/node_set.rb#99 + def xpath(*args); end + + def |(_arg0); end +end + +# source://nokogiri//lib/nokogiri/xml/node_set.rb#444 +Nokogiri::XML::NodeSet::IMPLIED_XPATH_CONTEXTS = T.let(T.unsafe(nil), Array) + +# Struct representing an {XML Schema Notation}[https://www.w3.org/TR/xml/#Notations] +# +# source://nokogiri//lib/nokogiri/xml/notation.rb#6 +class Nokogiri::XML::Notation < ::Struct; end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#6 +module Nokogiri::XML::PP; end + +# source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#7 +module Nokogiri::XML::PP::CharacterData + # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#15 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/pp/character_data.rb#8 + def pretty_print(pp); end +end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#7 +module Nokogiri::XML::PP::Node + # source://nokogiri//lib/nokogiri/xml/pp/node.rb#10 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/pp/node.rb#22 + def pretty_print(pp); end +end + +# source://nokogiri//lib/nokogiri/xml/pp/node.rb#8 +Nokogiri::XML::PP::Node::COLLECTIONS = T.let(T.unsafe(nil), Array) + +# Options that control the parsing behavior for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# These options directly expose libxml2's parse options, which are all boolean in the sense that +# an option is "on" or "off". +# +# 💡 Note that HTML5 parsing has a separate, orthogonal set of options due to the nature of the +# HTML5 specification. See Nokogiri::HTML5. +# +# ⚠ Not all parse options are supported on JRuby. Nokogiri will attempt to invoke the equivalent +# behavior in Xerces/NekoHTML on JRuby when it's possible. +# +# == Setting and unsetting parse options +# +# You can build your own combinations of parse options by using any of the following methods: +# +# [ParseOptions method chaining] +# +# Every option has an equivalent method in lowercase. You can chain these methods together to +# set various combinations. +# +# # Set the HUGE & PEDANTIC options +# po = Nokogiri::XML::ParseOptions.new.huge.pedantic +# doc = Nokogiri::XML::Document.parse(xml, nil, nil, po) +# +# Every option has an equivalent no{option} method in lowercase. You can call these +# methods on an instance of ParseOptions to unset the option. +# +# # Set the HUGE & PEDANTIC options +# po = Nokogiri::XML::ParseOptions.new.huge.pedantic +# +# # later we want to modify the options +# po.nohuge # Unset the HUGE option +# po.nopedantic # Unset the PEDANTIC option +# +# 💡 Note that some options begin with "no" leading to the logical but perhaps unintuitive +# double negative: +# +# po.nocdata # Set the NOCDATA parse option +# po.nonocdata # Unset the NOCDATA parse option +# +# 💡 Note that negation is not available for STRICT, which is itself a negation of all other +# features. +# +# +# [Using Ruby Blocks] +# +# Most parsing methods will accept a block for configuration of parse options, and we +# recommend chaining the setter methods: +# +# doc = Nokogiri::XML::Document.parse(xml) { |config| config.huge.pedantic } +# +# +# [ParseOptions constants] +# +# You can also use the constants declared under Nokogiri::XML::ParseOptions to set various +# combinations. They are bits in a bitmask, and so can be combined with bitwise operators: +# +# po = Nokogiri::XML::ParseOptions.new(Nokogiri::XML::ParseOptions::HUGE | Nokogiri::XML::ParseOptions::PEDANTIC) +# doc = Nokogiri::XML::Document.parse(xml, nil, nil, po) +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#67 +class Nokogiri::XML::ParseOptions + # @return [ParseOptions] a new instance of ParseOptions + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#165 + def initialize(options = T.unsafe(nil)); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#198 + def ==(other); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def big_lines; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def big_lines?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def compact; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def compact?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_html; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_html?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_schema; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_schema?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_xml; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_xml?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def default_xslt; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def default_xslt?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def dtdattr; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def dtdattr?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def dtdload; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def dtdload?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def dtdvalid; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def dtdvalid?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def huge; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def huge?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#204 + def inspect; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nobasefix; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nobasefix?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nobig_lines; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noblanks; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noblanks?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nocdata; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nocdata?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nocompact; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_html; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_schema; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_xml; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodefault_xslt; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nodict; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nodict?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodtdattr; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodtdload; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nodtdvalid; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noent; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noent?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noerror; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noerror?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nohuge; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nonet; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nonet?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonobasefix; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoblanks; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonocdata; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonodict; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoent; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoerror; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nononet; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonowarning; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonoxincnode; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nonsclean; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def noold10; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nopedantic; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def norecover; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def nosax1; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nowarning; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nowarning?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#178 + def noxinclude; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def noxincnode; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def noxincnode?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def nsclean; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def nsclean?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def old10; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def old10?; end + + # Returns the value of attribute options. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def options=(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def pedantic; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def pedantic?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def recover; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def recover?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def sax1; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def sax1?; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#189 + def strict; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#194 + def strict?; end + + # Returns the value of attribute options. + # + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#163 + def to_i; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#173 + def xinclude; end + + # source://nokogiri//lib/nokogiri/xml/parse_options.rb#183 + def xinclude?; end +end + +# Support line numbers up to long int (default is a short int). On +# by default for for XML::Document, XML::DocumentFragment, HTML4::Document, +# HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#149 +Nokogiri::XML::ParseOptions::BIG_LINES = T.let(T.unsafe(nil), Integer) + +# Compact small text nodes. Off by default. +# +# ⚠ No modification of the DOM tree is allowed after parsing. libxml2 may crash if you try to +# modify the tree. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#133 +Nokogiri::XML::ParseOptions::COMPACT = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#158 +Nokogiri::XML::ParseOptions::DEFAULT_HTML = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing XML::Schema +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#161 +Nokogiri::XML::ParseOptions::DEFAULT_SCHEMA = T.let(T.unsafe(nil), Integer) + +# The options mask used by default for parsing XML::Document and XML::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#152 +Nokogiri::XML::ParseOptions::DEFAULT_XML = T.let(T.unsafe(nil), Integer) + +# The options mask used by default used for parsing XSLT::Stylesheet +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#155 +Nokogiri::XML::ParseOptions::DEFAULT_XSLT = T.let(T.unsafe(nil), Integer) + +# Default DTD attributes. On by default for XSLT::Stylesheet. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#88 +Nokogiri::XML::ParseOptions::DTDATTR = T.let(T.unsafe(nil), Integer) + +# Load external subsets. On by default for XSLT::Stylesheet. +# +# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#85 +Nokogiri::XML::ParseOptions::DTDLOAD = T.let(T.unsafe(nil), Integer) + +# Validate with the DTD. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#91 +Nokogiri::XML::ParseOptions::DTDVALID = T.let(T.unsafe(nil), Integer) + +# Relax any hardcoded limit from the parser. Off by default. +# +# ⚠ There may be a performance penalty when this option is set. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#144 +Nokogiri::XML::ParseOptions::HUGE = T.let(T.unsafe(nil), Integer) + +# Do not fixup XInclude xml:base uris. Off by default +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#139 +Nokogiri::XML::ParseOptions::NOBASEFIX = T.let(T.unsafe(nil), Integer) + +# Remove blank nodes. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#103 +Nokogiri::XML::ParseOptions::NOBLANKS = T.let(T.unsafe(nil), Integer) + +# Merge CDATA as text nodes. On by default for XSLT::Stylesheet. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#124 +Nokogiri::XML::ParseOptions::NOCDATA = T.let(T.unsafe(nil), Integer) + +# Do not reuse the context dictionary. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#118 +Nokogiri::XML::ParseOptions::NODICT = T.let(T.unsafe(nil), Integer) + +# Substitute entities. Off by default. +# +# ⚠ This option enables entity substitution, contrary to what the name implies. +# +# ⚠ It is UNSAFE to set this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#80 +Nokogiri::XML::ParseOptions::NOENT = T.let(T.unsafe(nil), Integer) + +# Suppress error reports. On by default for HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#94 +Nokogiri::XML::ParseOptions::NOERROR = T.let(T.unsafe(nil), Integer) + +# Forbid network access. On by default for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# ⚠ It is UNSAFE to unset this option when parsing untrusted documents. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#115 +Nokogiri::XML::ParseOptions::NONET = T.let(T.unsafe(nil), Integer) + +# Suppress warning reports. On by default for HTML4::Document and HTML4::DocumentFragment +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#97 +Nokogiri::XML::ParseOptions::NOWARNING = T.let(T.unsafe(nil), Integer) + +# Do not generate XInclude START/END nodes. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#127 +Nokogiri::XML::ParseOptions::NOXINCNODE = T.let(T.unsafe(nil), Integer) + +# Remove redundant namespaces declarations. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#121 +Nokogiri::XML::ParseOptions::NSCLEAN = T.let(T.unsafe(nil), Integer) + +# Parse using XML-1.0 before update 5. Off by default +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#136 +Nokogiri::XML::ParseOptions::OLD10 = T.let(T.unsafe(nil), Integer) + +# Enable pedantic error reporting. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#100 +Nokogiri::XML::ParseOptions::PEDANTIC = T.let(T.unsafe(nil), Integer) + +# Recover from errors. On by default for XML::Document, XML::DocumentFragment, +# HTML4::Document, HTML4::DocumentFragment, XSLT::Stylesheet, and XML::Schema. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#73 +Nokogiri::XML::ParseOptions::RECOVER = T.let(T.unsafe(nil), Integer) + +# Use the SAX1 interface internally. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#106 +Nokogiri::XML::ParseOptions::SAX1 = T.let(T.unsafe(nil), Integer) + +# Strict parsing +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#69 +Nokogiri::XML::ParseOptions::STRICT = T.let(T.unsafe(nil), Integer) + +# Implement XInclude substitution. Off by default. +# +# source://nokogiri//lib/nokogiri/xml/parse_options.rb#109 +Nokogiri::XML::ParseOptions::XINCLUDE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#5 +class Nokogiri::XML::ProcessingInstruction < ::Nokogiri::XML::Node + # @return [ProcessingInstruction] a new instance of ProcessingInstruction + # + # source://nokogiri//lib/nokogiri/xml/processing_instruction.rb#6 + def initialize(document, name, content); end + + class << self + def new(*_arg0); end + end +end + +# Nokogiri::XML::Reader parses an XML document similar to the way a cursor +# would move. The Reader is given an XML document, and yields nodes +# to an each block. +# +# Here is an example of usage: +# +# reader = Nokogiri::XML::Reader(<<-eoxml) +# +# snuggles! +# +# eoxml +# +# reader.each do |node| +# +# # node is an instance of Nokogiri::XML::Reader +# puts node.name +# +# end +# +# Note that Nokogiri::XML::Reader#each can only be called once!! Once +# the cursor moves through the entire document, you must parse the +# document again. So make sure that you capture any information you +# need during the first iteration. +# +# The Reader parser is good for when you need the speed of a SAX parser, +# but do not want to write a Document handler. +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#32 +class Nokogiri::XML::Reader + include ::Enumerable + + # @return [Reader] a new instance of Reader + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#79 + def initialize(source, url = T.unsafe(nil), encoding = T.unsafe(nil)); end + + def attribute(_arg0); end + def attribute_at(_arg0); end + def attribute_count; end + def attribute_hash; end + def attribute_nodes; end + + # Get the attributes and namespaces of the current node as a Hash. + # + # This is the union of Reader#attribute_hash and Reader#namespaces + # + # [Returns] + # (Hash) Attribute names and values, and namespace prefixes and hrefs. + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#92 + def attributes; end + + def attributes?; end + def base_uri; end + def default?; end + def depth; end + + # Move the cursor through the document yielding the cursor to the block + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#98 + def each; end + + def empty_element?; end + def encoding; end + + # A list of errors encountered while parsing + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#72 + def errors; end + + # A list of errors encountered while parsing + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#72 + def errors=(_arg0); end + + def inner_xml; end + def lang; end + def local_name; end + def name; end + def namespace_uri; end + def namespaces; end + def node_type; end + def outer_xml; end + def prefix; end + def read; end + def self_closing?; end + + # The XML source + # + # source://nokogiri//lib/nokogiri/xml/reader.rb#75 + def source; end + + def state; end + def value; end + def value?; end + def xml_version; end + + class << self + def from_io(*_arg0); end + def from_memory(*_arg0); end + end +end + +# Attribute node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#39 +Nokogiri::XML::Reader::TYPE_ATTRIBUTE = T.let(T.unsafe(nil), Integer) + +# CDATA node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#43 +Nokogiri::XML::Reader::TYPE_CDATA = T.let(T.unsafe(nil), Integer) + +# Comment node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#51 +Nokogiri::XML::Reader::TYPE_COMMENT = T.let(T.unsafe(nil), Integer) + +# Document node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#53 +Nokogiri::XML::Reader::TYPE_DOCUMENT = T.let(T.unsafe(nil), Integer) + +# Document Fragment node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#57 +Nokogiri::XML::Reader::TYPE_DOCUMENT_FRAGMENT = T.let(T.unsafe(nil), Integer) + +# Document Type node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#55 +Nokogiri::XML::Reader::TYPE_DOCUMENT_TYPE = T.let(T.unsafe(nil), Integer) + +# Element node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#37 +Nokogiri::XML::Reader::TYPE_ELEMENT = T.let(T.unsafe(nil), Integer) + +# Element end node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#65 +Nokogiri::XML::Reader::TYPE_END_ELEMENT = T.let(T.unsafe(nil), Integer) + +# Entity end node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#67 +Nokogiri::XML::Reader::TYPE_END_ENTITY = T.let(T.unsafe(nil), Integer) + +# Entity node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#47 +Nokogiri::XML::Reader::TYPE_ENTITY = T.let(T.unsafe(nil), Integer) + +# Entity Reference node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#45 +Nokogiri::XML::Reader::TYPE_ENTITY_REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/reader.rb#35 +Nokogiri::XML::Reader::TYPE_NONE = T.let(T.unsafe(nil), Integer) + +# Notation node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#59 +Nokogiri::XML::Reader::TYPE_NOTATION = T.let(T.unsafe(nil), Integer) + +# PI node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#49 +Nokogiri::XML::Reader::TYPE_PROCESSING_INSTRUCTION = T.let(T.unsafe(nil), Integer) + +# Significant Whitespace node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#63 +Nokogiri::XML::Reader::TYPE_SIGNIFICANT_WHITESPACE = T.let(T.unsafe(nil), Integer) + +# Text node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#41 +Nokogiri::XML::Reader::TYPE_TEXT = T.let(T.unsafe(nil), Integer) + +# Whitespace node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#61 +Nokogiri::XML::Reader::TYPE_WHITESPACE = T.let(T.unsafe(nil), Integer) + +# XML Declaration node type +# +# source://nokogiri//lib/nokogiri/xml/reader.rb#69 +Nokogiri::XML::Reader::TYPE_XML_DECLARATION = T.let(T.unsafe(nil), Integer) + +# Nokogiri::XML::RelaxNG is used for validating XML against a +# RelaxNG schema. +# +# == Synopsis +# +# Validate an XML document against a RelaxNG schema. Loop over the errors +# that are returned and print them out: +# +# schema = Nokogiri::XML::RelaxNG(File.open(ADDRESS_SCHEMA_FILE)) +# doc = Nokogiri::XML(File.open(ADDRESS_XML_FILE)) +# +# schema.validate(doc).each do |error| +# puts error.message +# end +# +# The list of errors are Nokogiri::XML::SyntaxError objects. +# +# NOTE: RelaxNG input is always treated as TRUSTED documents, meaning that they will cause the +# underlying parsing libraries to access network resources. This is counter to Nokogiri's +# "untrusted by default" security policy, but is a limitation of the underlying libraries. +# +# source://nokogiri//lib/nokogiri/xml/relax_ng.rb#35 +class Nokogiri::XML::RelaxNG < ::Nokogiri::XML::Schema + private + + def validate_document(_arg0); end + + class << self + def from_document(*_arg0); end + def read_memory(*_arg0); end + end +end + +# SAX Parsers are event driven parsers. Nokogiri provides two different event based parsers when +# dealing with XML. If you want to do SAX style parsing using HTML, check out +# Nokogiri::HTML4::SAX. +# +# The basic way a SAX style parser works is by creating a parser, telling the parser about the +# events we're interested in, then giving the parser some XML to process. The parser will notify +# you when it encounters events you said you would like to know about. +# +# To register for events, you simply subclass Nokogiri::XML::SAX::Document, and implement the +# methods for which you would like notification. +# +# For example, if I want to be notified when a document ends, and when an element starts, I +# would write a class like this: +# +# class MyDocument < Nokogiri::XML::SAX::Document +# def end_document +# puts "the document has ended" +# end +# +# def start_element name, attributes = [] +# puts "#{name} started" +# end +# end +# +# Then I would instantiate a SAX parser with this document, and feed the parser some XML +# +# # Create a new parser +# parser = Nokogiri::XML::SAX::Parser.new(MyDocument.new) +# +# # Feed the parser some XML +# parser.parse(File.open(ARGV[0])) +# +# Now my document handler will be called when each node starts, and when then document ends. To +# see what kinds of events are available, take a look at Nokogiri::XML::SAX::Document. +# +# Two SAX parsers for XML are available, a parser that reads from a string or IO object as it +# feels necessary, and a parser that lets you spoon feed it XML. If you want to let Nokogiri +# deal with reading your XML, use the Nokogiri::XML::SAX::Parser. If you want to have fine grain +# control over the XML input, use the Nokogiri::XML::SAX::PushParser. +# +# source://nokogiri//lib/nokogiri/xml/sax/document.rb#45 +module Nokogiri::XML::SAX; end + +# This class is used for registering types of events you are interested in handling. All of +# the methods on this class are available as possible events while parsing an XML document. To +# register for any particular event, just subclass this class and implement the methods you +# are interested in knowing about. +# +# To only be notified about start and end element events, write a class like this: +# +# class MyDocument < Nokogiri::XML::SAX::Document +# def start_element name, attrs = [] +# puts "#{name} started!" +# end +# +# def end_element name +# puts "#{name} ended" +# end +# end +# +# You can use this event handler for any SAX style parser included with Nokogiri. See +# Nokogiri::XML::SAX, and Nokogiri::HTML4::SAX. +# +# source://nokogiri//lib/nokogiri/xml/sax/document.rb#66 +class Nokogiri::XML::SAX::Document + # Called when cdata blocks are found + # +string+ contains the cdata content + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#155 + def cdata_block(string); end + + # Characters read between a tag. This method might be called multiple + # times given one contiguous string of characters. + # + # +string+ contains the character data + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#131 + def characters(string); end + + # Called when comments are encountered + # +string+ contains the comment data + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#137 + def comment(string); end + + # Called when document ends parsing + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#79 + def end_document; end + + # Called at the end of an element + # +name+ is the tag name + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#93 + def end_element(name); end + + # Called at the end of an element + # +name+ is the element's name + # +prefix+ is the namespace prefix associated with the element + # +uri+ is the associated namespace URI + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#120 + def end_element_namespace(name, prefix = T.unsafe(nil), uri = T.unsafe(nil)); end + + # Called on document errors + # +string+ contains the error + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#149 + def error(string); end + + # Called when processing instructions are found + # +name+ is the target of the instruction + # +content+ is the value of the instruction + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#162 + def processing_instruction(name, content); end + + # Called when document starts parsing + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#74 + def start_document; end + + # Called at the beginning of an element + # * +name+ is the name of the tag + # * +attrs+ are an assoc list of namespaces and attributes, e.g.: + # [ ["xmlns:foo", "http://sample.net"], ["size", "large"] ] + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#87 + def start_element(name, attrs = T.unsafe(nil)); end + + # Called at the beginning of an element + # +name+ is the element name + # +attrs+ is a list of attributes + # +prefix+ is the namespace prefix for the element + # +uri+ is the associated namespace URI + # +ns+ is a hash of namespace prefix:urls associated with the element + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#103 + def start_element_namespace(name, attrs = T.unsafe(nil), prefix = T.unsafe(nil), uri = T.unsafe(nil), ns = T.unsafe(nil)); end + + # Called on document warnings + # +string+ contains the warning + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#143 + def warning(string); end + + # Called when an XML declaration is parsed + # + # source://nokogiri//lib/nokogiri/xml/sax/document.rb#69 + def xmldecl(version, encoding, standalone); end +end + +# This parser is a SAX style parser that reads it's input as it +# deems necessary. The parser takes a Nokogiri::XML::SAX::Document, +# an optional encoding, then given an XML input, sends messages to +# the Nokogiri::XML::SAX::Document. +# +# Here is an example of using this parser: +# +# # Create a subclass of Nokogiri::XML::SAX::Document and implement +# # the events we care about: +# class MyDoc < Nokogiri::XML::SAX::Document +# def start_element name, attrs = [] +# puts "starting: #{name}" +# end +# +# def end_element name +# puts "ending: #{name}" +# end +# end +# +# # Create our parser +# parser = Nokogiri::XML::SAX::Parser.new(MyDoc.new) +# +# # Send some XML to the parser +# parser.parse(File.open(ARGV[0])) +# +# For more information about SAX parsers, see Nokogiri::XML::SAX. Also +# see Nokogiri::XML::SAX::Document for the available events. +# +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#34 +class Nokogiri::XML::SAX::Parser + # Create a new Parser with +doc+ and +encoding+ + # + # @return [Parser] a new instance of Parser + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#72 + def initialize(doc = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # The Nokogiri::XML::SAX::Document where events will be sent. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#66 + def document; end + + # The Nokogiri::XML::SAX::Document where events will be sent. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#66 + def document=(_arg0); end + + # The encoding beings used for this document. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#69 + def encoding; end + + # The encoding beings used for this document. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#69 + def encoding=(_arg0); end + + # Parse given +thing+ which may be a string containing xml, or an + # IO object. + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#81 + def parse(thing, &block); end + + # Parse a file with +filename+ + # + # @raise [ArgumentError] + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#99 + def parse_file(filename); end + + # Parse given +io+ + # + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#91 + def parse_io(io, encoding = T.unsafe(nil)); end + + # @yield [ctx] + # + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#109 + def parse_memory(data); end + + private + + # source://nokogiri//lib/nokogiri/xml/sax/parser.rb#117 + def check_encoding(encoding); end +end + +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#35 +class Nokogiri::XML::SAX::Parser::Attribute < ::Struct; end + +# Encodinds this parser supports +# +# source://nokogiri//lib/nokogiri/xml/sax/parser.rb#39 +Nokogiri::XML::SAX::Parser::ENCODINGS = T.let(T.unsafe(nil), Hash) + +# Context for XML SAX parsers. This class is usually not instantiated +# by the user. Instead, you should be looking at +# Nokogiri::XML::SAX::Parser +# +# source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#10 +class Nokogiri::XML::SAX::ParserContext + def column; end + def line; end + def parse_with(_arg0); end + def recovery; end + def recovery=(_arg0); end + def replace_entities; end + def replace_entities=(_arg0); end + + class << self + def file(_arg0); end + def io(_arg0, _arg1); end + def memory(_arg0); end + + # source://nokogiri//lib/nokogiri/xml/sax/parser_context.rb#11 + def new(thing, encoding = T.unsafe(nil)); end + end +end + +# PushParser can parse a document that is fed to it manually. It +# must be given a SAX::Document object which will be called with +# SAX events as the document is being parsed. +# +# Calling PushParser#<< writes XML to the parser, calling any SAX +# callbacks it can. +# +# PushParser#finish tells the parser that the document is finished +# and calls the end_document SAX method. +# +# Example: +# +# parser = PushParser.new(Class.new(XML::SAX::Document) { +# def start_document +# puts "start document called" +# end +# }.new) +# parser << "
hello<" +# parser << "/div>" +# parser.finish +# +# source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#27 +class Nokogiri::XML::SAX::PushParser + # Create a new PushParser with +doc+ as the SAX Document, providing + # an optional +file_name+ and +encoding+ + # + # @return [PushParser] a new instance of PushParser + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#35 + def initialize(doc = T.unsafe(nil), file_name = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # Write a +chunk+ of XML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#47 + def <<(chunk, last_chunk = T.unsafe(nil)); end + + # The Nokogiri::XML::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + def document; end + + # The Nokogiri::XML::SAX::Document on which the PushParser will be + # operating + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#30 + def document=(_arg0); end + + # Finish the parsing. This method is only necessary for + # Nokogiri::XML::SAX::Document#end_document to be called. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#55 + def finish; end + + def options; end + def options=(_arg0); end + def replace_entities; end + def replace_entities=(_arg0); end + + # Write a +chunk+ of XML to the PushParser. Any callback methods + # that can be called will be called immediately. + # + # source://nokogiri//lib/nokogiri/xml/sax/push_parser.rb#47 + def write(chunk, last_chunk = T.unsafe(nil)); end + + private + + def initialize_native(_arg0, _arg1); end + def native_write(_arg0, _arg1); end +end + +# Nokogiri::XML::Schema is used for validating XML against a schema +# (usually from an xsd file). +# +# == Synopsis +# +# Validate an XML document against a Schema. Loop over the errors that +# are returned and print them out: +# +# xsd = Nokogiri::XML::Schema(File.read(PO_SCHEMA_FILE)) +# doc = Nokogiri::XML(File.read(PO_XML_FILE)) +# +# xsd.validate(doc).each do |error| +# puts error.message +# end +# +# The list of errors are Nokogiri::XML::SyntaxError objects. +# +# NOTE: As of v1.11.0, Schema treats inputs as UNTRUSTED by default, and so external entities +# are not resolved from the network (`http://` or `ftp://`). Previously, parsing treated +# documents as "trusted" by default which was counter to Nokogiri's "untrusted by default" +# security policy. If a document is trusted, then the caller may turn off the NONET option via +# the ParseOptions to re-enable external entity resolution over a network connection. +# +# source://nokogiri//lib/nokogiri/xml/schema.rb#37 +class Nokogiri::XML::Schema + # Errors while parsing the schema file + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#39 + def errors; end + + # Errors while parsing the schema file + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#39 + def errors=(_arg0); end + + # The Nokogiri::XML::ParseOptions used to parse the schema + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#41 + def parse_options; end + + # The Nokogiri::XML::ParseOptions used to parse the schema + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#41 + def parse_options=(_arg0); end + + # Returns true if +thing+ is a valid Nokogiri::XML::Document or + # file. + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#68 + def valid?(thing); end + + # Validate +thing+ against this schema. +thing+ can be a + # Nokogiri::XML::Document object, or a filename. An Array of + # Nokogiri::XML::SyntaxError objects found while validating the + # +thing+ is returned. + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#55 + def validate(thing); end + + private + + def validate_document(_arg0); end + def validate_file(_arg0); end + + class << self + def from_document(*_arg0); end + + # Create a new Nokogiri::XML::Schema object using a +string_or_io+ + # object. + # + # source://nokogiri//lib/nokogiri/xml/schema.rb#46 + def new(string_or_io, options = T.unsafe(nil)); end + + def read_memory(*_arg0); end + end +end + +# The Searchable module declares the interface used for searching your DOM. +# +# It implements the public methods #search, #css, and #xpath, +# as well as allowing specific implementations to specialize some +# of the important behaviors. +# +# source://nokogiri//lib/nokogiri/xml/searchable.rb#13 +module Nokogiri::XML::Searchable + # call-seq: + # at(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#71 + def %(*args); end + + # call-seq: + # search(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: + # + # node.search("div.employee", ".//title") + # + # A hash of namespace bindings may be appended: + # + # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) + # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # For XPath queries, a hash of variable bindings may also be appended to the namespace + # bindings. For example: + # + # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions and CSS pseudo-selectors may also be defined. To define custom + # functions create a class and implement the function you want to define. The first argument + # to the method will be the current matching NodeSet. Any other arguments are ones that you + # pass in. Note that this class may appear anywhere in the argument list. For example: + # + # handler = Class.new { + # def regex node_set, regex + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.search('.//title[regex(., "\w+")]', 'div.employee:regex("[0-9]+")', handler) + # + # See Searchable#xpath and Searchable#css for further usage help. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#51 + def /(*args); end + + # :call-seq: + # >(selector) → NodeSet + # + # Search this node's immediate children using CSS selector +selector+ + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#196 + def >(selector); end + + # call-seq: + # at(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+, and return only the first + # result. +paths+ must be one or more XPath or CSS queries. + # + # See Searchable#search for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#71 + def at(*args); end + + # call-seq: + # at_css(*rules, [namespace-bindings, custom-pseudo-class]) + # + # Search this object for CSS +rules+, and return only the first + # match. +rules+ must be one or more CSS selectors. + # + # See Searchable#css for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#140 + def at_css(*args); end + + # call-seq: + # at_xpath(*paths, [namespace-bindings, variable-bindings, custom-handler-class]) + # + # Search this node for XPath +paths+, and return only the first + # match. +paths+ must be one or more XPath queries. + # + # See Searchable#xpath for more information. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#188 + def at_xpath(*args); end + + # call-seq: + # css(*rules, [namespace-bindings, custom-pseudo-class]) + # + # Search this object for CSS +rules+. +rules+ must be one or more CSS + # selectors. For example: + # + # node.css('title') + # node.css('body h1.bold') + # node.css('div + p.green', 'div#one') + # + # A hash of namespace bindings may be appended. For example: + # + # node.css('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # 💡 Custom CSS pseudo classes may also be defined which are mapped to a custom XPath + # function. To define custom pseudo classes, create a class and implement the custom pseudo + # class you want defined. The first argument to the method will be the matching context + # NodeSet. Any other arguments are ones that you pass in. For example: + # + # handler = Class.new { + # def regex(node_set, regex) + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.css('title:regex("\w+")', handler) + # + # 💡 Some XPath syntax is supported in CSS queries. For example, to query for an attribute: + # + # node.css('img > @href') # returns all +href+ attributes on an +img+ element + # node.css('img / @href') # same + # + # # ⚠ this returns +class+ attributes from all +div+ elements AND THEIR CHILDREN! + # node.css('div @class') + # + # node.css + # + # 💡 Array-like syntax is supported in CSS queries as an alternative to using +:nth-child()+. + # + # ⚠ NOTE that indices are 1-based like +:nth-child+ and not 0-based like Ruby Arrays. For + # example: + # + # # equivalent to 'li:nth-child(2)' + # node.css('li[2]') # retrieve the second li element in a list + # + # ⚠ NOTE that the CSS query string is case-sensitive with regards to your document type. HTML + # tags will match only lowercase CSS queries, so if you search for "H1" in an HTML document, + # you'll never find anything. However, "H1" might be found in an XML document, where tags + # names are case-sensitive (e.g., "H1" is distinct from "h1"). + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#126 + def css(*args); end + + # call-seq: + # search(*paths, [namespace-bindings, xpath-variable-bindings, custom-handler-class]) + # + # Search this object for +paths+. +paths+ must be one or more XPath or CSS queries: + # + # node.search("div.employee", ".//title") + # + # A hash of namespace bindings may be appended: + # + # node.search('.//bike:tire', {'bike' => 'http://schwinn.com/'}) + # node.search('bike|tire', {'bike' => 'http://schwinn.com/'}) + # + # For XPath queries, a hash of variable bindings may also be appended to the namespace + # bindings. For example: + # + # node.search('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions and CSS pseudo-selectors may also be defined. To define custom + # functions create a class and implement the function you want to define. The first argument + # to the method will be the current matching NodeSet. Any other arguments are ones that you + # pass in. Note that this class may appear anywhere in the argument list. For example: + # + # handler = Class.new { + # def regex node_set, regex + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.search('.//title[regex(., "\w+")]', 'div.employee:regex("[0-9]+")', handler) + # + # See Searchable#xpath and Searchable#css for further usage help. + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#51 + def search(*args); end + + # call-seq: + # xpath(*paths, [namespace-bindings, variable-bindings, custom-handler-class]) + # + # Search this node for XPath +paths+. +paths+ must be one or more XPath + # queries. + # + # node.xpath('.//title') + # + # A hash of namespace bindings may be appended. For example: + # + # node.xpath('.//foo:name', {'foo' => 'http://example.org/'}) + # node.xpath('.//xmlns:name', node.root.namespaces) + # + # A hash of variable bindings may also be appended to the namespace bindings. For example: + # + # node.xpath('.//address[@domestic=$value]', nil, {:value => 'Yes'}) + # + # 💡 Custom XPath functions may also be defined. To define custom functions create a class and + # implement the function you want to define. The first argument to the method will be the + # current matching NodeSet. Any other arguments are ones that you pass in. Note that this + # class may appear anywhere in the argument list. For example: + # + # handler = Class.new { + # def regex(node_set, regex) + # node_set.find_all { |node| node['some_attribute'] =~ /#{regex}/ } + # end + # }.new + # node.xpath('.//title[regex(., "\w+")]', handler) + # + # source://nokogiri//lib/nokogiri/xml/searchable.rb#174 + def xpath(*args); end + + private + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#205 + def css_internal(node, rules, handler, ns); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#236 + def css_rules_to_xpath(rules, ns); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#251 + def extract_params(params); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#224 + def xpath_impl(node, path, handler, ns, binds); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#209 + def xpath_internal(node, paths, handler, ns, binds); end + + # source://nokogiri//lib/nokogiri/xml/searchable.rb#240 + def xpath_query_from_css_rule(rule, ns); end +end + +# Regular expression used by Searchable#search to determine if a query +# string is CSS or XPath +# +# source://nokogiri//lib/nokogiri/xml/searchable.rb#16 +Nokogiri::XML::Searchable::LOOKS_LIKE_XPATH = T.let(T.unsafe(nil), Regexp) + +# This class provides information about XML SyntaxErrors. These +# exceptions are typically stored on Nokogiri::XML::Document#errors. +# +# source://nokogiri//lib/nokogiri/xml/syntax_error.rb#8 +class Nokogiri::XML::SyntaxError < ::Nokogiri::SyntaxError + # Returns the value of attribute code. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#10 + def code; end + + # Returns the value of attribute column. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#18 + def column; end + + # Returns the value of attribute domain. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#9 + def domain; end + + # return true if this is an error + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#34 + def error?; end + + # return true if this error is fatal + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#40 + def fatal?; end + + # Returns the value of attribute file. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#12 + def file; end + + # Returns the value of attribute int1. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#17 + def int1; end + + # Returns the value of attribute level. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#11 + def level; end + + # Returns the value of attribute line. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#13 + def line; end + + # return true if this is a non error + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#22 + def none?; end + + # Returns the value of attribute str1. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#14 + def str1; end + + # Returns the value of attribute str2. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#15 + def str2; end + + # Returns the value of attribute str3. + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#16 + def str3; end + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#44 + def to_s; end + + # return true if this is a warning + # + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#28 + def warning?; end + + private + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#53 + def level_to_s; end + + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#65 + def location_to_s; end + + # @return [Boolean] + # + # source://nokogiri//lib/nokogiri/xml/syntax_error.rb#61 + def nil_or_zero?(attribute); end +end + +# source://nokogiri//lib/nokogiri/xml/text.rb#5 +class Nokogiri::XML::Text < ::Nokogiri::XML::CharacterData + # source://nokogiri//lib/nokogiri/xml/text.rb#6 + def content=(string); end + + class << self + def new(*_arg0); end + end +end + +# Original C14N 1.0 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#14 +Nokogiri::XML::XML_C14N_1_0 = T.let(T.unsafe(nil), Integer) + +# C14N 1.1 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#18 +Nokogiri::XML::XML_C14N_1_1 = T.let(T.unsafe(nil), Integer) + +# Exclusive C14N 1.0 spec canonicalization +# +# source://nokogiri//lib/nokogiri/xml.rb#16 +Nokogiri::XML::XML_C14N_EXCLUSIVE_1_0 = T.let(T.unsafe(nil), Integer) + +# source://nokogiri//lib/nokogiri/xml/xpath.rb#5 +module Nokogiri::XML::XPath; end + +# The XPath search prefix to search direct descendants of the current element, +./+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#13 +Nokogiri::XML::XPath::CURRENT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search globally, +//+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#7 +Nokogiri::XML::XPath::GLOBAL_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search direct descendants of the root element, +/+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#10 +Nokogiri::XML::XPath::ROOT_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# The XPath search prefix to search anywhere in the current element's subtree, +.//+ +# +# source://nokogiri//lib/nokogiri/xml/xpath.rb#16 +Nokogiri::XML::XPath::SUBTREE_SEARCH_PREFIX = T.let(T.unsafe(nil), String) + +# source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#6 +class Nokogiri::XML::XPath::SyntaxError < ::Nokogiri::XML::SyntaxError + # source://nokogiri//lib/nokogiri/xml/xpath/syntax_error.rb#7 + def to_s; end +end + +# source://nokogiri//lib/nokogiri/xml/xpath_context.rb#5 +class Nokogiri::XML::XPathContext + def evaluate(*_arg0); end + + # Register namespaces in +namespaces+ + # + # source://nokogiri//lib/nokogiri/xml/xpath_context.rb#8 + def register_namespaces(namespaces); end + + def register_ns(_arg0, _arg1); end + def register_variable(_arg0, _arg1); end + + class << self + def new(_arg0); end + end +end + +# See Nokogiri::XSLT::Stylesheet for creating and manipulating +# Stylesheet object. +# +# source://nokogiri//lib/nokogiri/xslt.rb#21 +module Nokogiri::XSLT + class << self + # Parse the stylesheet in +string+, register any +modules+ + # + # source://nokogiri//lib/nokogiri/xslt.rb#25 + def parse(string, modules = T.unsafe(nil)); end + + # :call-seq: + # quote_params(params) → Array + # + # Quote parameters in +params+ for stylesheet safety. + # See Nokogiri::XSLT::Stylesheet.transform for example usage. + # + # [Parameters] + # - +params+ (Hash, Array) XSLT parameters (key->value, or tuples of [key, value]) + # + # [Returns] Array of string parameters, with quotes correctly escaped for use with XSLT::Stylesheet.transform + # + # source://nokogiri//lib/nokogiri/xslt.rb#49 + def quote_params(params); end + + def register(_arg0, _arg1); end + end +end + +# A Stylesheet represents an XSLT Stylesheet object. Stylesheet creation +# is done through Nokogiri.XSLT. Here is an example of transforming +# an XML::Document with a Stylesheet: +# +# doc = Nokogiri::XML(File.read('some_file.xml')) +# xslt = Nokogiri::XSLT(File.read('some_transformer.xslt')) +# +# puts xslt.transform(doc) +# +# See Nokogiri::XSLT::Stylesheet#transform for more transformation +# information. +# +# source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#17 +class Nokogiri::XSLT::Stylesheet + # Apply an XSLT stylesheet to an XML::Document. + # +params+ is an array of strings used as XSLT parameters. + # returns serialized document + # + # source://nokogiri//lib/nokogiri/xslt/stylesheet.rb#22 + def apply_to(document, params = T.unsafe(nil)); end + + def serialize(_arg0); end + def transform(*_arg0); end + + class << self + def parse_stylesheet_doc(_arg0); end + end +end + +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + private + + # source://nokogiri//lib/nokogiri.rb#100 + def Nokogiri(*args, &block); end +end diff --git a/sorbet/rbi/gems/parallel@1.22.1.rbi b/sorbet/rbi/gems/parallel@1.22.1.rbi new file mode 100644 index 0000000..479beeb --- /dev/null +++ b/sorbet/rbi/gems/parallel@1.22.1.rbi @@ -0,0 +1,278 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `parallel` gem. +# Please instead update this file by running `bin/tapioca gem parallel`. + + +# source://parallel//lib/parallel/version.rb#2 +module Parallel + extend ::Parallel::ProcessorCount + + class << self + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#246 + def all?(*args, &block); end + + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#241 + def any?(*args, &block); end + + # source://parallel//lib/parallel.rb#237 + def each(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#251 + def each_with_index(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#306 + def flat_map(*args, &block); end + + # source://parallel//lib/parallel.rb#231 + def in_processes(options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#215 + def in_threads(options = T.unsafe(nil)); end + + # source://parallel//lib/parallel.rb#255 + def map(source, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#302 + def map_with_index(array, options = T.unsafe(nil), &block); end + + # source://parallel//lib/parallel.rb#310 + 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 + def worker_number=(worker_num); end + + private + + # source://parallel//lib/parallel.rb#321 + def add_progress_bar!(job_factory, options); end + + # source://parallel//lib/parallel.rb#584 + def call_with_index(item, index, options, &block); end + + # source://parallel//lib/parallel.rb#516 + def create_workers(job_factory, options, &block); end + + # options is either a Integer or a Hash with :count + # + # source://parallel//lib/parallel.rb#574 + def extract_count_from_options(options); end + + # source://parallel//lib/parallel.rb#602 + def instrument_finish(item, index, result, options); end + + # source://parallel//lib/parallel.rb#607 + def instrument_start(item, index, options); end + + # source://parallel//lib/parallel.rb#550 + def process_incoming_jobs(read, write, job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#504 + def replace_worker(job_factory, workers, index, options, blk); end + + # source://parallel//lib/parallel.rb#595 + def with_instrumentation(item, index, options); end + + # source://parallel//lib/parallel.rb#346 + def work_direct(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#456 + def work_in_processes(job_factory, options, &blk); end + + # source://parallel//lib/parallel.rb#390 + def work_in_ractors(job_factory, options); end + + # source://parallel//lib/parallel.rb#365 + def work_in_threads(job_factory, options, &block); end + + # source://parallel//lib/parallel.rb#524 + def worker(job_factory, options, &block); end + end +end + +# source://parallel//lib/parallel.rb#14 +class Parallel::Break < ::StandardError + # @return [Break] a new instance of Break + # + # source://parallel//lib/parallel.rb#17 + def initialize(value = T.unsafe(nil)); end + + # Returns the value of attribute value. + # + # source://parallel//lib/parallel.rb#15 + def value; end +end + +# source://parallel//lib/parallel.rb#11 +class Parallel::DeadWorker < ::StandardError; end + +# source://parallel//lib/parallel.rb#35 +class Parallel::ExceptionWrapper + # @return [ExceptionWrapper] a new instance of ExceptionWrapper + # + # source://parallel//lib/parallel.rb#38 + def initialize(exception); end + + # Returns the value of attribute exception. + # + # source://parallel//lib/parallel.rb#36 + def exception; end +end + +# source://parallel//lib/parallel.rb#101 +class Parallel::JobFactory + # @return [JobFactory] a new instance of JobFactory + # + # source://parallel//lib/parallel.rb#102 + def initialize(source, mutex); end + + # source://parallel//lib/parallel.rb#110 + 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 + def pack(item, index); end + + # source://parallel//lib/parallel.rb#129 + def size; end + + # unpack item that is sent to workers + # + # source://parallel//lib/parallel.rb#144 + def unpack(data); end + + private + + # @return [Boolean] + # + # source://parallel//lib/parallel.rb#150 + def producer?; end + + # source://parallel//lib/parallel.rb#154 + def queue_wrapper(array); end +end + +# source://parallel//lib/parallel.rb#23 +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 +Parallel::Stop = T.let(T.unsafe(nil), Object) + +# source://parallel//lib/parallel.rb#26 +class Parallel::UndumpableException < ::StandardError + # @return [UndumpableException] a new instance of UndumpableException + # + # source://parallel//lib/parallel.rb#29 + def initialize(original); end + + # Returns the value of attribute backtrace. + # + # source://parallel//lib/parallel.rb#27 + def backtrace; end +end + +# source://parallel//lib/parallel.rb#159 +class Parallel::UserInterruptHandler + class << self + # source://parallel//lib/parallel.rb#184 + def kill(thing); end + + # kill all these pids or threads if user presses Ctrl+c + # + # source://parallel//lib/parallel.rb#164 + def kill_on_ctrl_c(pids, options); end + + private + + # source://parallel//lib/parallel.rb#208 + def restore_interrupt(old, signal); end + + # source://parallel//lib/parallel.rb#193 + def trap_interrupt(signal); end + end +end + +# source://parallel//lib/parallel.rb#160 +Parallel::UserInterruptHandler::INTERRUPT_SIGNAL = T.let(T.unsafe(nil), Symbol) + +# source://parallel//lib/parallel/version.rb#3 +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 +class Parallel::Worker + # @return [Worker] a new instance of Worker + # + # source://parallel//lib/parallel.rb#58 + 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 + def close_pipes; end + + # Returns the value of attribute pid. + # + # source://parallel//lib/parallel.rb#55 + def pid; end + + # Returns the value of attribute read. + # + # source://parallel//lib/parallel.rb#55 + def read; end + + # source://parallel//lib/parallel.rb#64 + def stop; end + + # Returns the value of attribute thread. + # + # source://parallel//lib/parallel.rb#56 + def thread; end + + # Sets the attribute thread + # + # @param value the value to set the attribute thread to. + # + # source://parallel//lib/parallel.rb#56 + def thread=(_arg0); end + + # source://parallel//lib/parallel.rb#76 + def work(data); end + + # Returns the value of attribute write. + # + # source://parallel//lib/parallel.rb#55 + def write; end + + private + + # source://parallel//lib/parallel.rb#94 + def wait; end +end diff --git a/sorbet/rbi/gems/parser@3.2.1.0.rbi b/sorbet/rbi/gems/parser@3.2.1.0.rbi new file mode 100644 index 0000000..b8d5c4a --- /dev/null +++ b/sorbet/rbi/gems/parser@3.2.1.0.rbi @@ -0,0 +1,7254 @@ +# 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 + class << self + private + + # source://parser//lib/parser/current.rb#5 + def warn_syntax_deviation(feature, version); end + end +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#179 + 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#158 + 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#167 + 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#286 + 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 + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_forwarded_kwrestarg(node); end + + # @api public + # + # source://parser//lib/parser/ast/processor.rb#10 + def on_forwarded_restarg(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#196 + 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#179 + 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#279 + 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#271 + def process_var_asgn_node(node); end + + # @api public + # @private + # + # source://parser//lib/parser/ast/processor.rb#263 + def process_variable_node(node); end +end + +# Base class for version-specific parsers. +# +# @api public +# +# source://parser//lib/parser/base.rb#16 +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#77 +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#1583 + 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#1164 + 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#1428 + def begin(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1370 + 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#1446 + def begin_keyword(begin_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1198 + def binary_op(receiver, operator_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1115 + def block(method_call, begin_t, args, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1150 + 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#1106 + def call_lambda(lambda_t); end + + # source://parser//lib/parser/builders/default.rb#1089 + 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#1303 + def case(case_t, expr, when_bodies, else_t, else_body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1466 + 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#1416 + def compstmt(statements); end + + # source://parser//lib/parser/builders/default.rb#1279 + def condition(cond_t, cond, then_t, if_true, else_t, if_false, end_t); end + + # source://parser//lib/parser/builders/default.rb#1285 + 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#1613 + 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#1604 + 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#1324 + 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#1085 + def forwarded_kwrestarg(dstar_t); end + + # source://parser//lib/parser/builders/default.rb#1081 + def forwarded_restarg(star_t); end + + # source://parser//lib/parser/builders/default.rb#602 + def gvar(token); end + + # source://parser//lib/parser/builders/default.rb#1577 + 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#1493 + def if_guard(if_t, if_body); end + + # source://parser//lib/parser/builders/default.rb#1472 + def in_match(lhs, in_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1487 + def in_pattern(in_t, pattern, guard, then_t, body); end + + # source://parser//lib/parser/builders/default.rb#1173 + def index(receiver, lbrack_t, indexes, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1187 + 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#1332 + 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#1272 + def logical_op(type, lhs, op_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1310 + def loop(type, keyword_t, cond, do_t, body, end_t); end + + # source://parser//lib/parser/builders/default.rb#1315 + def loop_mod(type, body, keyword_t, cond); end + + # source://parser//lib/parser/builders/default.rb#1627 + def match_alt(left, pipe_t, right); end + + # source://parser//lib/parser/builders/default.rb#1634 + def match_as(value, assoc_t, as); end + + # source://parser//lib/parser/builders/default.rb#1513 + def match_hash_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1527 + def match_hash_var_from_str(begin_t, strings, end_t); end + + # source://parser//lib/parser/builders/default.rb#1665 + def match_label(label_type, label); end + + # source://parser//lib/parser/builders/default.rb#1641 + def match_nil_pattern(dstar_t, nil_t); end + + # source://parser//lib/parser/builders/default.rb#1220 + def match_op(receiver, match_t, arg); end + + # source://parser//lib/parser/builders/default.rb#1646 + def match_pair(label_type, label, value); end + + # source://parser//lib/parser/builders/default.rb#1477 + def match_pattern(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1482 + def match_pattern_p(lhs, match_t, rhs); end + + # source://parser//lib/parser/builders/default.rb#1566 + def match_rest(star_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1501 + def match_var(name_t); end + + # source://parser//lib/parser/builders/default.rb#1609 + 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#1248 + 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#1155 + 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#1622 + def pin(pin_t, var); end + + # source://parser//lib/parser/builders/default.rb#1355 + def postexe(postexe_t, lbrace_t, compstmt, rbrace_t); end + + # source://parser//lib/parser/builders/default.rb#1350 + 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#1362 + 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#1290 + 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#1236 + 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#1497 + def unless_guard(unless_t, unless_body); end + + # source://parser//lib/parser/builders/default.rb#1297 + 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#1804 + def arg_name_collides?(this_name, that_name); end + + # source://parser//lib/parser/builders/default.rb#2000 + def arg_prefix_map(op_t, name_t = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1974 + def binary_op_map(left_e, op_t, right_e); end + + # source://parser//lib/parser/builders/default.rb#2102 + def block_map(receiver_l, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1779 + def check_assignment_to_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1681 + def check_condition(cond); end + + # source://parser//lib/parser/builders/default.rb#1750 + def check_duplicate_arg(this_arg, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1725 + def check_duplicate_args(args, map = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1837 + def check_duplicate_pattern_key(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1827 + def check_duplicate_pattern_variable(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1819 + def check_lvar_name(name, loc); end + + # source://parser//lib/parser/builders/default.rb#1794 + def check_reserved_for_numparam(name, loc); end + + # source://parser//lib/parser/builders/default.rb#2259 + def collapse_string_parts?(parts); end + + # source://parser//lib/parser/builders/default.rb#1925 + def collection_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2129 + 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#1960 + def constant_map(scope, colon2_t, name_t); end + + # source://parser//lib/parser/builders/default.rb#2033 + def definition_map(keyword_t, operator_t, name_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1866 + def delimited_string_map(string_t); end + + # source://parser//lib/parser/builders/default.rb#2281 + def diagnostic(type, reason, arguments, location, highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2173 + def eh_keyword_map(compstmt_e, keyword_t, body_es, else_t, else_e); end + + # source://parser//lib/parser/builders/default.rb#2039 + def endless_definition_map(keyword_t, operator_t, name_t, assignment_t, body_e); end + + # source://parser//lib/parser/builders/default.rb#1921 + def expr_map(loc); end + + # source://parser//lib/parser/builders/default.rb#2154 + def for_map(keyword_t, in_t, begin_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#2201 + def guard_map(keyword_t, guard_body_e); end + + # source://parser//lib/parser/builders/default.rb#2091 + def index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#1857 + def join_exprs(left_expr, right_expr); end + + # source://parser//lib/parser/builders/default.rb#2107 + def keyword_map(keyword_t, begin_t, args, end_t); end + + # source://parser//lib/parser/builders/default.rb#2124 + def keyword_mod_map(pre_e, keyword_t, post_e); end + + # source://parser//lib/parser/builders/default.rb#2010 + def kwarg_map(name_t, value_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#2312 + def kwargs?(node); end + + # source://parser//lib/parser/builders/default.rb#2276 + def loc(token); end + + # source://parser//lib/parser/builders/default.rb#2023 + def module_definition_map(keyword_t, name_e, operator_t, end_t); end + + # source://parser//lib/parser/builders/default.rb#1849 + def n(type, children, source_map); end + + # source://parser//lib/parser/builders/default.rb#1853 + 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#1891 + def pair_keyword_map(key_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1906 + def pair_quoted_map(begin_t, end_t, value_e); end + + # source://parser//lib/parser/builders/default.rb#1877 + def prefix_string_map(symbol); end + + # source://parser//lib/parser/builders/default.rb#1988 + def range_map(start_e, op_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1955 + def regexp_map(begin_t, end_t, options_e); end + + # source://parser//lib/parser/builders/default.rb#2160 + 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#2302 + def rewrite_hash_args_to_kwargs(args); end + + # source://parser//lib/parser/builders/default.rb#2073 + def send_binary_op_map(lhs_e, selector_t, rhs_e); end + + # source://parser//lib/parser/builders/default.rb#2096 + def send_index_map(receiver_e, lbrack_t, rbrack_t); end + + # source://parser//lib/parser/builders/default.rb#2047 + 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#2079 + def send_unary_op_map(selector_t, arg_e); end + + # source://parser//lib/parser/builders/default.rb#2232 + def static_regexp(parts, options); end + + # source://parser//lib/parser/builders/default.rb#2252 + def static_regexp_node(node); end + + # source://parser//lib/parser/builders/default.rb#2215 + def static_string(nodes); end + + # source://parser//lib/parser/builders/default.rb#1941 + def string_map(begin_t, parts, end_t); end + + # source://parser//lib/parser/builders/default.rb#2268 + def string_value(token); end + + # source://parser//lib/parser/builders/default.rb#2149 + def ternary_map(begin_e, question_t, mid_e, colon_t, end_e); end + + # source://parser//lib/parser/builders/default.rb#1862 + def token_map(token); end + + # source://parser//lib/parser/builders/default.rb#1978 + def unary_op_map(op_t, arg_e = T.unsafe(nil)); end + + # source://parser//lib/parser/builders/default.rb#1886 + def unquoted_map(token); end + + # source://parser//lib/parser/builders/default.rb#2290 + def validate_definee(definee); end + + # source://parser//lib/parser/builders/default.rb#1764 + def validate_no_forward_arg_after_restarg(args); end + + # source://parser//lib/parser/builders/default.rb#2264 + def value(token); end + + # source://parser//lib/parser/builders/default.rb#2067 + def var_send_map(variable_e); end + + # source://parser//lib/parser/builders/default.rb#1970 + 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 + +# source://parser//lib/parser/current.rb#111 +Parser::CurrentRuby = Parser::Ruby32 + +# @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-F1.rb#82 +class Parser::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://parser//lib/parser/lexer-F1.rb#8250 + def initialize(version); end + + # Return next token: [type, value]. + # + # source://parser//lib/parser/lexer-F1.rb#8410 + def advance; end + + # Returns the value of attribute cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg; end + + # Sets the attribute cmdarg + # + # @param value the value to set the attribute cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg=(_arg0); end + + # Returns the value of attribute cmdarg_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cmdarg_stack; end + + # Returns the value of attribute command_start. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + 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-F1.rb#8244 + def command_start=(_arg0); end + + # Returns the value of attribute comments. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments=(_arg0); end + + # Returns the value of attribute cond. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond; end + + # Sets the attribute cond + # + # @param value the value to set the attribute cond to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond=(_arg0); end + + # Returns the value of attribute cond_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cond_stack; end + + # Returns the value of attribute context. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8405 + def dedent_level; end + + # Returns the value of attribute diagnostics. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics; end + + # Sets the attribute diagnostics + # + # @param value the value to set the attribute diagnostics to. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8358 + def encoding; end + + # Returns the value of attribute force_utf32. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + 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-F1.rb#8242 + def force_utf32=(_arg0); end + + # Returns the value of attribute lambda_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def lambda_stack; end + + # Returns the value of attribute paren_nest. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def paren_nest; end + + # source://parser//lib/parser/lexer-F1.rb#8392 + def pop_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8401 + def pop_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8387 + def push_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8396 + def push_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8281 + def reset(reset_state = T.unsafe(nil)); end + + # % + # + # source://parser//lib/parser/lexer-F1.rb#8238 + def source_buffer; end + + # source://parser//lib/parser/lexer-F1.rb#8334 + def source_buffer=(source_buffer); end + + # source://parser//lib/parser/lexer-F1.rb#8379 + def state; end + + # source://parser//lib/parser/lexer-F1.rb#8383 + def state=(state); end + + # Returns the value of attribute static_env. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + 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-F1.rb#8241 + def static_env=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens=(_arg0); end + + # Returns the value of attribute version. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def version; end + + protected + + # source://parser//lib/parser/lexer-F1.rb#14631 + def arg_or_cmdarg(cmd_state); end + + # source://parser//lib/parser/lexer-F1.rb#14693 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-F1.rb#14655 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14661 + def e_lbrace; end + + # source://parser//lib/parser/lexer-F1.rb#14605 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14714 + def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14742 + def emit_colon_with_digits(p, tm, diag_msg); end + + # source://parser//lib/parser/lexer-F1.rb#14639 + def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14651 + def emit_comment_from_range(p, pe); end + + # source://parser//lib/parser/lexer-F1.rb#14621 + def emit_do(do_block = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14704 + def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14722 + def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14730 + def emit_rbrace_rparen_rbrack; end + + # source://parser//lib/parser/lexer-F1.rb#14752 + def emit_singleton_class; end + + # source://parser//lib/parser/lexer-F1.rb#14615 + def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14670 + def numeric_literal_int; end + + # source://parser//lib/parser/lexer-F1.rb#14689 + def on_newline(p); end + + # source://parser//lib/parser/lexer-F1.rb#14601 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14592 + def stack_pop; end + + # source://parser//lib/parser/lexer-F1.rb#14597 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-F1.rb#14588 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_expr_arg. + # + # source://parser//lib/parser/lexer-F1.rb#8186 + 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-F1.rb#8186 + def lex_en_expr_arg=(_arg0); end + + # Returns the value of attribute lex_en_expr_beg. + # + # source://parser//lib/parser/lexer-F1.rb#8202 + 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-F1.rb#8202 + def lex_en_expr_beg=(_arg0); end + + # Returns the value of attribute lex_en_expr_cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8190 + 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-F1.rb#8190 + def lex_en_expr_cmdarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8182 + 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-F1.rb#8182 + def lex_en_expr_dot=(_arg0); end + + # Returns the value of attribute lex_en_expr_end. + # + # source://parser//lib/parser/lexer-F1.rb#8214 + 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-F1.rb#8214 + def lex_en_expr_end=(_arg0); end + + # Returns the value of attribute lex_en_expr_endarg. + # + # source://parser//lib/parser/lexer-F1.rb#8194 + 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-F1.rb#8194 + def lex_en_expr_endarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_endfn. + # + # source://parser//lib/parser/lexer-F1.rb#8178 + 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-F1.rb#8178 + def lex_en_expr_endfn=(_arg0); end + + # Returns the value of attribute lex_en_expr_fname. + # + # source://parser//lib/parser/lexer-F1.rb#8174 + 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-F1.rb#8174 + def lex_en_expr_fname=(_arg0); end + + # Returns the value of attribute lex_en_expr_labelarg. + # + # source://parser//lib/parser/lexer-F1.rb#8206 + 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-F1.rb#8206 + def lex_en_expr_labelarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_mid. + # + # source://parser//lib/parser/lexer-F1.rb#8198 + 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-F1.rb#8198 + def lex_en_expr_mid=(_arg0); end + + # Returns the value of attribute lex_en_expr_value. + # + # source://parser//lib/parser/lexer-F1.rb#8210 + 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-F1.rb#8210 + def lex_en_expr_value=(_arg0); end + + # Returns the value of attribute lex_en_expr_variable. + # + # source://parser//lib/parser/lexer-F1.rb#8170 + 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-F1.rb#8170 + def lex_en_expr_variable=(_arg0); end + + # Returns the value of attribute lex_en_inside_string. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string; end + + # Sets the attribute lex_en_inside_string + # + # @param value the value to set the attribute lex_en_inside_string to. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string=(_arg0); end + + # Returns the value of attribute lex_en_leading_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8218 + 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-F1.rb#8218 + def lex_en_leading_dot=(_arg0); end + + # Returns the value of attribute lex_en_line_begin. + # + # source://parser//lib/parser/lexer-F1.rb#8226 + 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-F1.rb#8226 + def lex_en_line_begin=(_arg0); end + + # Returns the value of attribute lex_en_line_comment. + # + # source://parser//lib/parser/lexer-F1.rb#8222 + 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-F1.rb#8222 + def lex_en_line_comment=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-F1.rb#8165 + 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-F1.rb#8165 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-F1.rb#8161 + 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-F1.rb#8161 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-F1.rb#8064 + 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-F1.rb#8064 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7967 + 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-F1.rb#7967 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-F1.rb#461 + 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-F1.rb#461 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-F1.rb#558 + 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-F1.rb#558 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-F1.rb#364 + 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-F1.rb#364 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7870 + 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-F1.rb#7870 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7722 + 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-F1.rb#7722 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-F1.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-F1.rb#87 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-F1.rb#7574 + 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-F1.rb#7574 + 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-F1.rb#14799 +Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14785 +Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14792 +Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#8362 +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-F1.rb#14759 +Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14779 +Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) + +# 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 + +# line 3 "lib/parser/lexer-strings.rl" +# +# source://parser//lib/parser/lexer-strings.rb#6 +class Parser::LexerStrings + # @return [LexerStrings] a new instance of LexerStrings + # + # source://parser//lib/parser/lexer-strings.rb#3300 + def initialize(lexer, version); end + + # source://parser//lib/parser/lexer-strings.rb#3339 + def advance(p); end + + # source://parser//lib/parser/lexer-strings.rb#5069 + def close_interp_on_current_literal(p); end + + # source://parser//lib/parser/lexer-strings.rb#5043 + def continue_lexing(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5092 + def dedent_level; end + + # Returns the value of attribute herebody_s. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s; end + + # Sets the attribute herebody_s + # + # @param value the value to set the attribute herebody_s to. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer-strings.rb#5047 + def literal; end + + # source://parser//lib/parser/lexer-strings.rb#5015 + def next_state_for_literal(literal); end + + # This hook is triggered by "main" lexer on every newline character + # + # source://parser//lib/parser/lexer-strings.rb#5100 + def on_newline(p); end + + # source://parser//lib/parser/lexer-strings.rb#5051 + def pop_literal; end + + # === LITERAL STACK === + # + # source://parser//lib/parser/lexer-strings.rb#5009 + def push_literal(*args); end + + # source://parser//lib/parser/lexer-strings.rb#4999 + def read_character_constant(p); end + + # source://parser//lib/parser/lexer-strings.rb#3314 + def reset; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts=(_arg0); end + + protected + + # source://parser//lib/parser/lexer-strings.rb#5397 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-strings.rb#5408 + def check_invalid_escapes(p); end + + # source://parser//lib/parser/lexer-strings.rb#5136 + def cond; end + + # source://parser//lib/parser/lexer-strings.rb#5132 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5128 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5387 + def emit_character_constant; end + + # source://parser//lib/parser/lexer-strings.rb#5364 + def emit_interp_var(interp_var_kind); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5140 + def emit_invalid_escapes?; end + + # source://parser//lib/parser/lexer-strings.rb#5291 + def encode_escape(ord); end + + # source://parser//lib/parser/lexer-strings.rb#5375 + def encode_escaped_char(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5112 + def eof_codepoint?(point); end + + # source://parser//lib/parser/lexer-strings.rb#5210 + def extend_interp_code(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5225 + def extend_interp_digit_var; end + + # source://parser//lib/parser/lexer-strings.rb#5355 + def extend_interp_var(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5234 + def extend_string_eol_check_eof(current_literal, pe); end + + # source://parser//lib/parser/lexer-strings.rb#5251 + def extend_string_eol_heredoc_intertwined(p); end + + # source://parser//lib/parser/lexer-strings.rb#5241 + def extend_string_eol_heredoc_line; end + + # source://parser//lib/parser/lexer-strings.rb#5267 + def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # source://parser//lib/parser/lexer-strings.rb#5154 + def extend_string_escaped; end + + # source://parser//lib/parser/lexer-strings.rb#5287 + def extend_string_for_token_range(current_literal, string); end + + # source://parser//lib/parser/lexer-strings.rb#5279 + def extend_string_slice_end(lookahead); end + + # source://parser//lib/parser/lexer-strings.rb#5124 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5347 + def read_post_meta_or_ctrl_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5379 + def slash_c_char; end + + # source://parser//lib/parser/lexer-strings.rb#5383 + def slash_m_char; end + + # source://parser//lib/parser/lexer-strings.rb#5120 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5295 + def unescape_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5307 + def unicode_points(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5116 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_character. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character; end + + # Sets the attribute lex_en_character + # + # @param value the value to set the attribute lex_en_character to. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + 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-strings.rb#3255 + def lex_en_interp_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + 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-strings.rb#3263 + def lex_en_interp_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_interp_string. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + 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-strings.rb#3243 + def lex_en_interp_string=(_arg0); end + + # Returns the value of attribute lex_en_interp_words. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + 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-strings.rb#3239 + def lex_en_interp_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + 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-strings.rb#3259 + def lex_en_plain_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + 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-strings.rb#3267 + def lex_en_plain_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_string. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + 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-strings.rb#3251 + def lex_en_plain_string=(_arg0); end + + # Returns the value of attribute lex_en_plain_words. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + 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-strings.rb#3247 + def lex_en_plain_words=(_arg0); end + + # Returns the value of attribute lex_en_regexp_modifiers. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + 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-strings.rb#3271 + def lex_en_regexp_modifiers=(_arg0); end + + # Returns the value of attribute lex_en_unknown. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown; end + + # Sets the attribute lex_en_unknown + # + # @param value the value to set the attribute lex_en_unknown to. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + 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-strings.rb#3234 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + 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-strings.rb#3230 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_actions. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions; end + + # Sets the attribute _lex_actions + # + # @param value the value to set the attribute _lex_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions=(_arg0); end + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + 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-strings.rb#3184 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + 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-strings.rb#3138 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-strings.rb#244 + 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-strings.rb#244 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-strings.rb#290 + 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-strings.rb#290 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-strings.rb#198 + 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-strings.rb#198 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + 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-strings.rb#3092 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + 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-strings.rb#3029 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-strings.rb#76 + 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-strings.rb#76 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + 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-strings.rb#2966 + def _lex_trans_targs=(_arg0); end + end +end + +# % +# +# source://parser//lib/parser/lexer-strings.rb#3287 +Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#5414 +Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3332 +Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3293 +Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# 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#107 +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#114 + 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#14 +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) + +# source://parser//lib/parser/ruby32.rb#14 +class Parser::Ruby32 < ::Parser::Base + # reduce 0 omitted + # + # source://parser//lib/parser/ruby32.rb#8419 + def _reduce_1(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8473 + def _reduce_10(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9108 + def _reduce_100(val, _values, result); end + + # reduce 101 omitted + # + # source://parser//lib/parser/ruby32.rb#9117 + def _reduce_102(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9123 + def _reduce_103(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9129 + def _reduce_104(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9135 + def _reduce_105(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9141 + def _reduce_106(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9147 + def _reduce_107(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9153 + def _reduce_108(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9159 + def _reduce_109(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8479 + def _reduce_11(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9165 + def _reduce_110(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9175 + def _reduce_111(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9181 + def _reduce_112(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9191 + def _reduce_113(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9198 + def _reduce_114(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9205 + def _reduce_115(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9211 + def _reduce_116(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9217 + def _reduce_117(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9223 + def _reduce_118(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9229 + def _reduce_119(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8496 + def _reduce_12(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9235 + def _reduce_120(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9241 + def _reduce_121(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9247 + def _reduce_122(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9254 + def _reduce_123(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9261 + def _reduce_124(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9267 + def _reduce_125(val, _values, result); end + + # reduce 126 omitted + # + # source://parser//lib/parser/ruby32.rb#9275 + def _reduce_127(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9281 + def _reduce_128(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9287 + def _reduce_129(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8502 + def _reduce_13(val, _values, result); end + + # reduce 134 omitted + # + # source://parser//lib/parser/ruby32.rb#9303 + def _reduce_135(val, _values, result); end + + # reduce 136 omitted + # + # source://parser//lib/parser/ruby32.rb#9311 + def _reduce_137(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9317 + def _reduce_138(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9323 + def _reduce_139(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8508 + def _reduce_14(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8514 + def _reduce_15(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8520 + def _reduce_16(val, _values, result); end + + # reduce 17 omitted + # + # source://parser//lib/parser/ruby32.rb#8528 + def _reduce_18(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8534 + def _reduce_19(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8426 + def _reduce_2(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8540 + def _reduce_20(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8546 + def _reduce_21(val, _values, result); end + + # reduce 210 omitted + # + # source://parser//lib/parser/ruby32.rb#9471 + def _reduce_211(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9477 + def _reduce_212(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9483 + def _reduce_213(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9492 + def _reduce_214(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9501 + def _reduce_215(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9510 + def _reduce_216(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9519 + def _reduce_217(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9527 + def _reduce_218(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9535 + def _reduce_219(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8554 + def _reduce_22(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9541 + def _reduce_220(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9547 + def _reduce_221(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9553 + def _reduce_222(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9559 + def _reduce_223(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9565 + def _reduce_224(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9571 + def _reduce_225(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9577 + def _reduce_226(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9583 + def _reduce_227(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9589 + def _reduce_228(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9595 + def _reduce_229(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8562 + def _reduce_23(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9601 + def _reduce_230(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9607 + def _reduce_231(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9613 + def _reduce_232(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9621 + def _reduce_233(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9627 + def _reduce_234(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9633 + def _reduce_235(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9639 + def _reduce_236(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9645 + def _reduce_237(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9651 + def _reduce_238(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8568 + def _reduce_24(val, _values, result); end + + # reduce 239 omitted + # + # source://parser//lib/parser/ruby32.rb#9659 + def _reduce_240(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9665 + def _reduce_241(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9671 + def _reduce_242(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9677 + def _reduce_243(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9683 + def _reduce_244(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9689 + def _reduce_245(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9695 + def _reduce_246(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9701 + def _reduce_247(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9707 + def _reduce_248(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9713 + def _reduce_249(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8574 + def _reduce_25(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9719 + def _reduce_250(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9725 + def _reduce_251(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9731 + def _reduce_252(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9738 + def _reduce_253(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9745 + def _reduce_254(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9759 + def _reduce_255(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9779 + def _reduce_256(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9793 + def _reduce_257(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8581 + def _reduce_26(val, _values, result); end + + # reduce 262 omitted + # + # source://parser//lib/parser/ruby32.rb#9823 + def _reduce_263(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9829 + def _reduce_264(val, _values, result); end + + # reduce 267 omitted + # + # source://parser//lib/parser/ruby32.rb#9841 + def _reduce_268(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9847 + def _reduce_269(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8588 + def _reduce_27(val, _values, result); end + + # reduce 270 omitted + # + # source://parser//lib/parser/ruby32.rb#9855 + def _reduce_271(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9865 + def _reduce_272(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9871 + def _reduce_273(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9881 + def _reduce_274(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9891 + def _reduce_275(val, _values, result); end + + # reduce 276 omitted + # + # source://parser//lib/parser/ruby32.rb#9899 + def _reduce_277(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8594 + def _reduce_28(val, _values, result); end + + # reduce 279 omitted + # + # source://parser//lib/parser/ruby32.rb#9909 + def _reduce_280(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9915 + def _reduce_281(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9921 + def _reduce_282(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9927 + def _reduce_283(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9933 + def _reduce_284(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9940 + def _reduce_285(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9948 + def _reduce_286(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9954 + def _reduce_287(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9981 + def _reduce_288(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10002 + def _reduce_289(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8600 + def _reduce_29(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10008 + def _reduce_290(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10018 + def _reduce_291(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10024 + def _reduce_292(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10030 + def _reduce_293(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10036 + def _reduce_294(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10042 + def _reduce_295(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10052 + def _reduce_296(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10058 + def _reduce_297(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10064 + def _reduce_298(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10074 + def _reduce_299(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8435 + def _reduce_3(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8610 + def _reduce_30(val, _values, result); end + + # reduce 300 omitted + # + # source://parser//lib/parser/ruby32.rb#10082 + def _reduce_301(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10088 + def _reduce_302(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10094 + def _reduce_303(val, _values, result); end + + # reduce 313 omitted + # + # source://parser//lib/parser/ruby32.rb#10120 + def _reduce_314(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10126 + def _reduce_315(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10132 + def _reduce_316(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10140 + def _reduce_317(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10146 + def _reduce_318(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10152 + def _reduce_319(val, _values, result); end + + # reduce 31 omitted + # + # source://parser//lib/parser/ruby32.rb#8618 + def _reduce_32(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10158 + def _reduce_320(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10164 + def _reduce_321(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10170 + def _reduce_322(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10176 + def _reduce_323(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10182 + def _reduce_324(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10188 + def _reduce_325(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10194 + def _reduce_326(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10200 + def _reduce_327(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10206 + def _reduce_328(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10212 + def _reduce_329(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8624 + def _reduce_33(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10218 + def _reduce_330(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10224 + def _reduce_331(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10232 + def _reduce_332(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10238 + def _reduce_333(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10244 + def _reduce_334(val, _values, result); end + + # reduce 335 omitted + # + # source://parser//lib/parser/ruby32.rb#10256 + def _reduce_336(val, _values, result); end + + # reduce 337 omitted + # + # source://parser//lib/parser/ruby32.rb#10266 + def _reduce_338(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10275 + def _reduce_339(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8631 + def _reduce_34(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10284 + def _reduce_340(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10290 + def _reduce_341(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10296 + def _reduce_342(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10306 + def _reduce_343(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10316 + def _reduce_344(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10326 + def _reduce_345(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10332 + def _reduce_346(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10339 + def _reduce_347(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10355 + def _reduce_348(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10363 + def _reduce_349(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8642 + def _reduce_35(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10375 + def _reduce_350(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10382 + def _reduce_351(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10396 + def _reduce_352(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10408 + def _reduce_353(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10420 + def _reduce_354(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10426 + def _reduce_355(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10432 + def _reduce_356(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10438 + def _reduce_357(val, _values, result); end + + # reduce 358 omitted + # + # source://parser//lib/parser/ruby32.rb#10446 + def _reduce_359(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10452 + def _reduce_360(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10458 + def _reduce_361(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10465 + def _reduce_362(val, _values, result); end + + # reduce 364 omitted + # + # source://parser//lib/parser/ruby32.rb#10477 + def _reduce_365(val, _values, result); end + + # reduce 368 omitted + # + # source://parser//lib/parser/ruby32.rb#10489 + def _reduce_369(val, _values, result); end + + # reduce 36 omitted + # + # source://parser//lib/parser/ruby32.rb#8650 + def _reduce_37(val, _values, result); end + + # reduce 370 omitted + # + # source://parser//lib/parser/ruby32.rb#10502 + def _reduce_371(val, _values, result); end + + # reduce 373 omitted + # + # source://parser//lib/parser/ruby32.rb#10512 + def _reduce_374(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10518 + def _reduce_375(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10524 + def _reduce_376(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10530 + def _reduce_377(val, _values, result); end + + # reduce 378 omitted + # + # source://parser//lib/parser/ruby32.rb#10538 + def _reduce_379(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8656 + def _reduce_38(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10545 + def _reduce_380(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10553 + def _reduce_381(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10559 + def _reduce_382(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10565 + def _reduce_383(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10571 + def _reduce_384(val, _values, result); end + + # reduce 386 omitted + # + # source://parser//lib/parser/ruby32.rb#10581 + def _reduce_387(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10587 + def _reduce_388(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10593 + def _reduce_389(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8662 + def _reduce_39(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10599 + def _reduce_390(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10605 + def _reduce_391(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10611 + def _reduce_392(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10617 + def _reduce_393(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10623 + def _reduce_394(val, _values, result); end + + # reduce 395 omitted + # + # source://parser//lib/parser/ruby32.rb#10631 + def _reduce_396(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10640 + def _reduce_397(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10650 + def _reduce_398(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10658 + def _reduce_399(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8441 + def _reduce_4(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8671 + def _reduce_40(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10667 + def _reduce_400(val, _values, result); end + + # reduce 401 omitted + # + # source://parser//lib/parser/ruby32.rb#10677 + def _reduce_402(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10686 + def _reduce_403(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10696 + def _reduce_404(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10704 + def _reduce_405(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10713 + def _reduce_406(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10720 + def _reduce_407(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10728 + def _reduce_408(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10735 + def _reduce_409(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8680 + def _reduce_41(val, _values, result); end + + # reduce 410 omitted + # + # source://parser//lib/parser/ruby32.rb#10745 + def _reduce_411(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10751 + def _reduce_412(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10757 + def _reduce_413(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10766 + def _reduce_414(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10775 + def _reduce_415(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10781 + def _reduce_416(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10787 + def _reduce_417(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10793 + def _reduce_418(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10799 + def _reduce_419(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8689 + def _reduce_42(val, _values, result); end + + # reduce 420 omitted + # + # source://parser//lib/parser/ruby32.rb#10808 + def _reduce_421(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10817 + def _reduce_422(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10823 + def _reduce_423(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10839 + def _reduce_424(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10847 + def _reduce_425(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10857 + def _reduce_426(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10864 + def _reduce_427(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10871 + def _reduce_428(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10878 + def _reduce_429(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8697 + def _reduce_43(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10885 + def _reduce_430(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10892 + def _reduce_431(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10899 + def _reduce_432(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10907 + def _reduce_433(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10915 + def _reduce_434(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10927 + def _reduce_435(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10938 + def _reduce_436(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10946 + def _reduce_437(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10954 + def _reduce_438(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10962 + def _reduce_439(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8706 + def _reduce_44(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10968 + def _reduce_440(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10976 + def _reduce_441(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10984 + def _reduce_442(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10992 + def _reduce_443(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#10998 + def _reduce_444(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11004 + def _reduce_445(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11011 + def _reduce_446(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11018 + def _reduce_447(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11025 + def _reduce_448(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11032 + def _reduce_449(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8720 + def _reduce_45(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11039 + def _reduce_450(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11049 + def _reduce_451(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11056 + def _reduce_452(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11062 + def _reduce_453(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11073 + def _reduce_454(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11080 + def _reduce_455(val, _values, result); end + + # reduce 456 omitted + # + # source://parser//lib/parser/ruby32.rb#11088 + def _reduce_457(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11100 + def _reduce_458(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11108 + def _reduce_459(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8740 + def _reduce_46(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11115 + def _reduce_460(val, _values, result); end + + # reduce 461 omitted + # + # source://parser//lib/parser/ruby32.rb#11123 + def _reduce_462(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11129 + def _reduce_463(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11135 + def _reduce_464(val, _values, result); end + + # reduce 465 omitted + # + # source://parser//lib/parser/ruby32.rb#11143 + def _reduce_466(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11153 + def _reduce_467(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11159 + def _reduce_468(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11165 + def _reduce_469(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8754 + def _reduce_47(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11171 + def _reduce_470(val, _values, result); end + + # reduce 471 omitted + # + # source://parser//lib/parser/ruby32.rb#11179 + def _reduce_472(val, _values, result); end + + # reduce 473 omitted + # + # source://parser//lib/parser/ruby32.rb#11187 + def _reduce_474(val, _values, result); end + + # reduce 475 omitted + # + # source://parser//lib/parser/ruby32.rb#11195 + def _reduce_476(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11202 + def _reduce_477(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8774 + def _reduce_48(val, _values, result); end + + # reduce 479 omitted + # + # source://parser//lib/parser/ruby32.rb#11213 + def _reduce_480(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11221 + def _reduce_481(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11229 + def _reduce_482(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11237 + def _reduce_483(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11244 + def _reduce_484(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11252 + def _reduce_485(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11260 + def _reduce_486(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11268 + def _reduce_487(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11275 + def _reduce_488(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11281 + def _reduce_489(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11287 + def _reduce_490(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11293 + def _reduce_491(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11301 + def _reduce_492(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11309 + def _reduce_493(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11315 + def _reduce_494(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11321 + def _reduce_495(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11328 + def _reduce_496(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11334 + def _reduce_497(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11340 + def _reduce_498(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11346 + def _reduce_499(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8447 + def _reduce_5(val, _values, result); end + + # reduce 49 omitted + # + # source://parser//lib/parser/ruby32.rb#8782 + def _reduce_50(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11352 + def _reduce_500(val, _values, result); end + + # reduce 501 omitted + # + # source://parser//lib/parser/ruby32.rb#11360 + def _reduce_502(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11370 + def _reduce_503(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11380 + def _reduce_504(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11386 + def _reduce_505(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11392 + def _reduce_506(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11398 + def _reduce_507(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11404 + def _reduce_508(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11410 + def _reduce_509(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11416 + def _reduce_510(val, _values, result); end + + # reduce 511 omitted + # + # source://parser//lib/parser/ruby32.rb#11424 + def _reduce_512(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11430 + def _reduce_513(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11436 + def _reduce_514(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11442 + def _reduce_515(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11448 + def _reduce_516(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11454 + def _reduce_517(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11460 + def _reduce_518(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11466 + def _reduce_519(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11472 + def _reduce_520(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11478 + def _reduce_521(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11484 + def _reduce_522(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11490 + def _reduce_523(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11496 + def _reduce_524(val, _values, result); end + + # reduce 525 omitted + # + # source://parser//lib/parser/ruby32.rb#11504 + def _reduce_526(val, _values, result); end + + # reduce 527 omitted + # + # source://parser//lib/parser/ruby32.rb#11512 + def _reduce_528(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11518 + def _reduce_529(val, _values, result); end + + # reduce 52 omitted + # + # source://parser//lib/parser/ruby32.rb#8796 + def _reduce_53(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11524 + def _reduce_530(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11530 + def _reduce_531(val, _values, result); end + + # reduce 534 omitted + # + # source://parser//lib/parser/ruby32.rb#11542 + def _reduce_535(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11548 + def _reduce_536(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8802 + def _reduce_54(val, _values, result); end + + # reduce 544 omitted + # + # source://parser//lib/parser/ruby32.rb#11570 + def _reduce_545(val, _values, result); end + + # reduce 546 omitted + # + # source://parser//lib/parser/ruby32.rb#11578 + def _reduce_547(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11584 + def _reduce_548(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11596 + def _reduce_549(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8808 + def _reduce_55(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11603 + def _reduce_550(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11610 + def _reduce_551(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11616 + def _reduce_552(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11622 + def _reduce_553(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11628 + def _reduce_554(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11643 + def _reduce_555(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11649 + def _reduce_556(val, _values, result); end + + # reduce 558 omitted + # + # source://parser//lib/parser/ruby32.rb#11659 + def _reduce_559(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8814 + def _reduce_56(val, _values, result); end + + # reduce 560 omitted + # + # source://parser//lib/parser/ruby32.rb#11667 + def _reduce_561(val, _values, result); end + + # reduce 564 omitted + # + # source://parser//lib/parser/ruby32.rb#11679 + def _reduce_565(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11685 + def _reduce_566(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11691 + def _reduce_567(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11697 + def _reduce_568(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11704 + def _reduce_569(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8820 + def _reduce_57(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11711 + def _reduce_570(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11717 + def _reduce_571(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11724 + def _reduce_572(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11731 + def _reduce_573(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11737 + def _reduce_574(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11743 + def _reduce_575(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11749 + def _reduce_576(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11755 + def _reduce_577(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11761 + def _reduce_578(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11767 + def _reduce_579(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8832 + def _reduce_58(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11773 + def _reduce_580(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11779 + def _reduce_581(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11785 + def _reduce_582(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11791 + def _reduce_583(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11797 + def _reduce_584(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11803 + def _reduce_585(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11809 + def _reduce_586(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11815 + def _reduce_587(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11821 + def _reduce_588(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11827 + def _reduce_589(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8841 + def _reduce_59(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11833 + def _reduce_590(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11839 + def _reduce_591(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11845 + def _reduce_592(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11851 + def _reduce_593(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11857 + def _reduce_594(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11863 + def _reduce_595(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11870 + def _reduce_596(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11879 + def _reduce_597(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11885 + def _reduce_598(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11891 + def _reduce_599(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8453 + def _reduce_6(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8853 + def _reduce_60(val, _values, result); end + + # reduce 602 omitted + # + # source://parser//lib/parser/ruby32.rb#11903 + def _reduce_603(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11910 + def _reduce_604(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11917 + def _reduce_605(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11923 + def _reduce_606(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11934 + def _reduce_607(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11941 + def _reduce_608(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11948 + def _reduce_609(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11955 + def _reduce_610(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11962 + def _reduce_611(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11968 + def _reduce_612(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11974 + def _reduce_613(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11980 + def _reduce_614(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#11986 + def _reduce_615(val, _values, result); end + + # reduce 616 omitted + # + # source://parser//lib/parser/ruby32.rb#11994 + def _reduce_617(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12000 + def _reduce_618(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12006 + def _reduce_619(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12012 + def _reduce_620(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12018 + def _reduce_621(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12024 + def _reduce_622(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12030 + def _reduce_623(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12036 + def _reduce_624(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12042 + def _reduce_625(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12048 + def _reduce_626(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12054 + def _reduce_627(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12060 + def _reduce_628(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12066 + def _reduce_629(val, _values, result); end + + # reduce 62 omitted + # + # source://parser//lib/parser/ruby32.rb#8866 + def _reduce_63(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12072 + def _reduce_630(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12078 + def _reduce_631(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12084 + def _reduce_632(val, _values, result); end + + # reduce 633 omitted + # + # source://parser//lib/parser/ruby32.rb#12092 + def _reduce_634(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12099 + def _reduce_635(val, _values, result); end + + # reduce 636 omitted + # + # source://parser//lib/parser/ruby32.rb#12110 + def _reduce_637(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12118 + def _reduce_638(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12126 + def _reduce_639(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8872 + def _reduce_64(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12132 + def _reduce_640(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12138 + def _reduce_641(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12144 + def _reduce_642(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12150 + def _reduce_643(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12157 + def _reduce_644(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12163 + def _reduce_645(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12169 + def _reduce_646(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12178 + def _reduce_647(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12188 + def _reduce_648(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12196 + def _reduce_649(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8879 + def _reduce_65(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12205 + def _reduce_650(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12213 + def _reduce_651(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12222 + def _reduce_652(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12229 + def _reduce_653(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12237 + def _reduce_654(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12246 + def _reduce_655(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12253 + def _reduce_656(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12261 + def _reduce_657(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12268 + def _reduce_658(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12276 + def _reduce_659(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8889 + def _reduce_66(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12282 + def _reduce_660(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12288 + def _reduce_661(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12294 + def _reduce_662(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12300 + def _reduce_663(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12306 + def _reduce_664(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12312 + def _reduce_665(val, _values, result); end + + # reduce 666 omitted + # + # source://parser//lib/parser/ruby32.rb#12320 + def _reduce_667(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12330 + def _reduce_668(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12337 + def _reduce_669(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8895 + def _reduce_67(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12344 + def _reduce_670(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12350 + def _reduce_671(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12356 + def _reduce_672(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12362 + def _reduce_673(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12377 + def _reduce_674(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12385 + def _reduce_675(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12393 + def _reduce_676(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12400 + def _reduce_677(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12407 + def _reduce_678(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12413 + def _reduce_679(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8902 + def _reduce_68(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12419 + def _reduce_680(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12425 + def _reduce_681(val, _values, result); end + + # reduce 683 omitted + # + # source://parser//lib/parser/ruby32.rb#12435 + def _reduce_684(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12441 + def _reduce_685(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12449 + def _reduce_686(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12457 + def _reduce_687(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12465 + def _reduce_688(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12473 + def _reduce_689(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12479 + def _reduce_690(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12485 + def _reduce_691(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12491 + def _reduce_692(val, _values, result); end + + # reduce 694 omitted + # + # source://parser//lib/parser/ruby32.rb#12501 + def _reduce_695(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12509 + def _reduce_696(val, _values, result); end + + # reduce 698 omitted + # + # source://parser//lib/parser/ruby32.rb#12521 + def _reduce_699(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8459 + def _reduce_7(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12529 + def _reduce_700(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12537 + def _reduce_701(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12543 + def _reduce_702(val, _values, result); end + + # reduce 703 omitted + # + # source://parser//lib/parser/ruby32.rb#12551 + def _reduce_704(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12557 + def _reduce_705(val, _values, result); end + + # reduce 706 omitted + # + # source://parser//lib/parser/ruby32.rb#12565 + def _reduce_707(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12571 + def _reduce_708(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12577 + def _reduce_709(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12583 + def _reduce_710(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12589 + def _reduce_711(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12595 + def _reduce_712(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12601 + def _reduce_713(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12607 + def _reduce_714(val, _values, result); end + + # reduce 71 omitted + # + # source://parser//lib/parser/ruby32.rb#8914 + def _reduce_72(val, _values, result); end + + # reduce 724 omitted + # + # source://parser//lib/parser/ruby32.rb#12637 + def _reduce_725(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12643 + def _reduce_726(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8921 + def _reduce_73(val, _values, result); end + + # reduce 730 omitted + # + # source://parser//lib/parser/ruby32.rb#12657 + def _reduce_731(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12663 + def _reduce_732(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12669 + def _reduce_733(val, _values, result); end + + # reduce 735 omitted + # + # source://parser//lib/parser/ruby32.rb#12679 + def _reduce_736(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8928 + def _reduce_74(val, _values, result); end + + # reduce 739 omitted + # + # source://parser//lib/parser/ruby32.rb#12691 + def _reduce_740(val, _values, result); end + + # reduce 75 omitted + # + # source://parser//lib/parser/ruby32.rb#8937 + def _reduce_76(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8944 + def _reduce_77(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8955 + def _reduce_78(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8962 + def _reduce_79(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8973 + def _reduce_80(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8980 + def _reduce_81(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8991 + def _reduce_82(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#8998 + def _reduce_83(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9005 + def _reduce_84(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9012 + def _reduce_85(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9019 + def _reduce_86(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9026 + def _reduce_87(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9032 + def _reduce_88(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9038 + def _reduce_89(val, _values, result); end + + # reduce 8 omitted + # + # source://parser//lib/parser/ruby32.rb#8467 + def _reduce_9(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9044 + def _reduce_90(val, _values, result); end + + # reduce 91 omitted + # + # source://parser//lib/parser/ruby32.rb#9052 + def _reduce_92(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9059 + def _reduce_93(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9066 + def _reduce_94(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9074 + def _reduce_95(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9081 + def _reduce_96(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9089 + def _reduce_97(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9095 + def _reduce_98(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#9102 + def _reduce_99(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#12697 + def _reduce_none(val, _values, result); end + + # source://parser//lib/parser/ruby32.rb#21 + def default_encoding; end + + # source://parser//lib/parser/ruby32.rb#25 + def endless_method_name(name_t); end + + # source://parser//lib/parser/ruby32.rb#38 + def local_pop; end + + # source://parser//lib/parser/ruby32.rb#31 + def local_push; end + + # source://parser//lib/parser/ruby32.rb#45 + def try_declare_numparam(node); end + + # source://parser//lib/parser/ruby32.rb#17 + def version; end +end + +# source://parser//lib/parser/ruby32.rb#8008 +Parser::Ruby32::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://parser//lib/parser/ruby32.rb#8413 +Parser::Ruby32::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://parser//lib/parser/ruby32.rb#8024 +Parser::Ruby32::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) + +# @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#242 + 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#217 + 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#312 + def freeze; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#318 + def inspect; end + + # Number of last line in the buffer + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/buffer.rb#307 + 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#231 + 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#284 + 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(start, length = T.unsafe(nil)); 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#273 + def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/source/buffer.rb#252 + def source_lines; end + + # @api public + # @return [Range] A range covering the whole source + # + # source://parser//lib/parser/source/buffer.rb#298 + def source_range; end + + private + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#348 + def bsearch(line_begins, position); end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#325 + def line_begins; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#339 + 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#11 + def initialize; end + + # source://parser//lib/parser/static_environment.rb#40 + def declare(name); end + + # source://parser//lib/parser/static_environment.rb#58 + def declare_anonymous_blockarg; end + + # source://parser//lib/parser/static_environment.rb#74 + def declare_anonymous_kwrestarg; end + + # source://parser//lib/parser/static_environment.rb#66 + def declare_anonymous_restarg; end + + # source://parser//lib/parser/static_environment.rb#50 + def declare_forward_args; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#46 + def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#62 + def declared_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#78 + def declared_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#70 + def declared_anonymous_restarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#54 + def declared_forward_args?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#82 + def empty?; end + + # source://parser//lib/parser/static_environment.rb#27 + def extend_dynamic; end + + # source://parser//lib/parser/static_environment.rb#20 + def extend_static; end + + # source://parser//lib/parser/static_environment.rb#15 + def reset; end + + # source://parser//lib/parser/static_environment.rb#34 + 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#9 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#8 +Parser::StaticEnvironment::ANONYMOUS_RESTARG = 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#51 +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/prism@0.29.0.rbi b/sorbet/rbi/gems/prism@0.29.0.rbi new file mode 100644 index 0000000..df5bddc --- /dev/null +++ b/sorbet/rbi/gems/prism@0.29.0.rbi @@ -0,0 +1,37987 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prism` gem. +# Please instead update this file by running `bin/tapioca gem prism`. + + +# typed: strict + +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/node.rbi.erb +# if you are looking to modify the template +# =end +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/visitor.rbi.erb +# if you are looking to modify the template +# =end + +# We keep these shims in here because our client libraries might not have parser +# in their bundle. +module Parser; end + +class Parser::Base; end + +# The Prism Ruby parser. +# +# "Parsing Ruby is suddenly manageable!" +# - You, hopefully +# +# source://prism//lib/prism.rb#8 +module Prism + class << self + # Mirror the Prism.dump API by using the serialization API. + def dump(*_arg0); end + + # Mirror the Prism.dump_file API by using the serialization API. + def dump_file(*_arg0); end + + # Mirror the Prism.lex API by using the serialization API. + def lex(*_arg0); end + + # :call-seq: + # Prism::lex_compat(source, **options) -> LexCompat::Result + # + # Returns a parse result whose value is an array of tokens that closely + # resembles the return value of Ripper::lex. The main difference is that the + # `:on_sp` token is not emitted. + # + # For supported options, see Prism::parse. + # + # source://prism//lib/prism.rb#47 + sig { params(source: String, options: T::Hash[Symbol, T.untyped]).returns(Prism::LexCompat::Result) } + def lex_compat(source, **options); end + + # Mirror the Prism.lex_file API by using the serialization API. + def lex_file(*_arg0); end + + # :call-seq: + # Prism::lex_ripper(source) -> Array + # + # This lexes with the Ripper lex. It drops any space events but otherwise + # returns the same tokens. Raises SyntaxError if the syntax in source is + # invalid. + # + # source://prism//lib/prism.rb#57 + sig { params(source: String).returns(T::Array[T.untyped]) } + def lex_ripper(source); end + + # :call-seq: + # Prism::load(source, serialized) -> ParseResult + # + # Load the serialized AST using the source as a reference into a tree. + # + # source://prism//lib/prism.rb#65 + sig { params(source: String, serialized: String).returns(Prism::ParseResult) } + def load(source, serialized); end + + # Mirror the Prism.parse API by using the serialization API. + def parse(*_arg0); end + + # Mirror the Prism.parse_comments API by using the serialization API. + def parse_comments(*_arg0); end + + # Mirror the Prism.parse_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_failure?(*_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_file_comments API by using the serialization + # API. This uses native strings instead of Ruby strings because it allows us + # to use mmap when it is available. + def parse_file_comments(*_arg0); end + + # Mirror the Prism.parse_file_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_file_failure?(*_arg0); end + + # Mirror the Prism.parse_file_success? API by using the serialization API. + # + # @return [Boolean] + def parse_file_success?(*_arg0); end + + # Mirror the Prism.parse_lex API by using the serialization API. + def parse_lex(*_arg0); end + + # Mirror the Prism.parse_lex_file API by using the serialization API. + def parse_lex_file(*_arg0); end + + # Mirror the Prism.parse_stream API by using the serialization API. + def parse_stream(*_arg0); end + + # Mirror the Prism.parse_success? API by using the serialization API. + # + # @return [Boolean] + def parse_success?(*_arg0); end + end +end + +# Specialized version of Prism::Source for source code that includes ASCII +# characters only. This class is used to apply performance optimizations that +# cannot be applied to sources that include multibyte characters. Sources that +# include multibyte characters are represented by the Prism::Source class. +# +# source://prism//lib/prism/parse_result.rb#126 +class Prism::ASCIISource < ::Prism::Source + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#133 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#128 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Specialized version of `code_units_column` that does not depend on + # `code_units_offset`, which is a more expensive operation. This is + # essentialy the same as `Prism::Source#column`. + # + # source://prism//lib/prism/parse_result.rb#150 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # source://prism//lib/prism/parse_result.rb#143 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#188 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void + # + # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#190 + sig do + params( + source: Prism::Source, + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, new_name, old_name, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#294 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#200 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#205 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#215 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#210 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasGlobalVariableNode + # + # source://prism//lib/prism/node.rb#220 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#205 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#228 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#260 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#255 + sig { returns(String) } + def keyword; end + + # The location of the `alias` keyword. + # + # alias $foo $bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#248 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Represents the new name of the global variable that can be used after aliasing. This can be either a global variable, a back reference, or a numbered reference. + # + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#236 + sig { returns(Prism::Node) } + def new_name; end + + # Represents the old name of the global variable that could be used before aliasing. This can be either a global variable, a back reference, or a numbered reference. + # + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#242 + sig { returns(Prism::Node) } + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#278 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#288 + def type; end + end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#306 +class Prism::AliasMethodNode < ::Prism::Node + # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void + # + # @return [AliasMethodNode] a new instance of AliasMethodNode + # + # source://prism//lib/prism/node.rb#308 + sig do + params( + source: Prism::Source, + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, new_name, old_name, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#403 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#318 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#323 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#333 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#328 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasMethodNode + # + # source://prism//lib/prism/node.rb#338 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#323 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#346 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#369 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#364 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#357 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader new_name: Prism::node + # + # source://prism//lib/prism/node.rb#351 + sig { returns(Prism::Node) } + def new_name; end + + # attr_reader old_name: Prism::node + # + # source://prism//lib/prism/node.rb#354 + sig { returns(Prism::Node) } + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#387 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#397 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#415 +class Prism::AlternationPatternNode < ::Prism::Node + # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://prism//lib/prism/node.rb#417 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#512 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#427 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#442 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#437 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AlternationPatternNode + # + # source://prism//lib/prism/node.rb#447 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#455 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#478 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node + # + # source://prism//lib/prism/node.rb#460 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#473 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#466 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node + # + # source://prism//lib/prism/node.rb#463 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#496 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#506 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#524 +class Prism::AndNode < ::Prism::Node + # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # + # @return [AndNode] a new instance of AndNode + # + # source://prism//lib/prism/node.rb#526 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#636 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#536 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#541 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#551 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#546 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AndNode + # + # source://prism//lib/prism/node.rb#556 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AndNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#541 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#564 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#602 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left and right + # ^^^^ + # + # 1 && 2 + # ^ + # + # source://prism//lib/prism/node.rb#575 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#597 + sig { returns(String) } + def operator; end + + # The location of the `and` keyword or the `&&` operator. + # + # left and right + # ^^^ + # + # source://prism//lib/prism/node.rb#590 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left && right + # ^^^^^ + # + # 1 and 2 + # ^ + # + # source://prism//lib/prism/node.rb#584 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#620 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#630 + def type; end + end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#648 +class Prism::ArgumentsNode < ::Prism::Node + # def initialize: (Integer flags, Array[Prism::node] arguments, Location location) -> void + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://prism//lib/prism/node.rb#650 + sig do + params( + source: Prism::Source, + flags: Integer, + arguments: T::Array[Prism::Node], + location: Prism::Location + ).void + end + def initialize(source, flags, arguments, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#743 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#659 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#696 + sig { returns(T::Array[Prism::Node]) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#664 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#674 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#669 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_keyword_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#704 + sig { returns(T::Boolean) } + def contains_keyword_splat?; end + + # def contains_keywords?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#699 + sig { returns(T::Boolean) } + def contains_keywords?; end + + # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode + # + # source://prism//lib/prism/node.rb#679 + sig do + params( + flags: Integer, + arguments: T::Array[Prism::Node], + location: Prism::Location + ).returns(Prism::ArgumentsNode) + end + def copy(flags: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#664 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location } + # + # source://prism//lib/prism/node.rb#687 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#709 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#727 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#692 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#737 + def type; end + end +end + +# Flags for arguments nodes. +# +# source://prism//lib/prism/node.rb#19202 +module Prism::ArgumentsNodeFlags; end + +# if arguments contain keywords +# +# source://prism//lib/prism/node.rb#19204 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) + +# if arguments contain keyword splat +# +# source://prism//lib/prism/node.rb#19207 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. +# +# [1, 2, 3] +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#755 +class Prism::ArrayNode < ::Prism::Node + # def initialize: (Integer flags, Array[Prism::node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://prism//lib/prism/node.rb#757 + sig do + params( + source: Prism::Source, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, flags, elements, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#893 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#768 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#773 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#854 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the optional source location for the closing token. + # + # [1,2,3] # "]" + # %w[foo bar baz] # "]" + # %I(apple orange banana) # ")" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#831 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#783 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#778 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#844 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayNode + # + # source://prism//lib/prism/node.rb#788 + sig do + params( + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ArrayNode) + end + def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#773 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#796 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. + # + # source://prism//lib/prism/node.rb#805 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#859 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#849 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the optional source location for the opening token. + # + # [1,2,3] # "[" + # %w[foo bar baz] # "%w[" + # %I(apple orange banana) # "%I(" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#813 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#877 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#801 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#887 + def type; end + end +end + +# Flags for array nodes. +# +# source://prism//lib/prism/node.rb#19211 +module Prism::ArrayNodeFlags; end + +# if array contains splat nodes +# +# source://prism//lib/prism/node.rb#19213 +Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array pattern in pattern matching. +# +# foo in 1, 2 +# ^^^^^^^^^^^ +# +# foo in [1, 2] +# ^^^^^^^^^^^^^ +# +# foo in *1 +# ^^^^^^^^^ +# +# foo in Bar[] +# ^^^^^^^^^^^^ +# +# foo in Bar[1, 2, 3] +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#919 +class Prism::ArrayPatternNode < ::Prism::Node + # def initialize: (Prism::node? constant, Array[Prism::node] requireds, Prism::node? rest, Array[Prism::node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://prism//lib/prism/node.rb#921 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1054 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#934 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#939 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#1015 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#997 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#954 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#944 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: Prism::node? + # + # source://prism//lib/prism/node.rb#972 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (?constant: Prism::node?, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayPatternNode + # + # source://prism//lib/prism/node.rb#959 + sig do + params( + constant: T.nilable(Prism::Node), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ArrayPatternNode) + end + def copy(constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#939 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#967 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1020 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#1010 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#984 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader posts: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#981 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#975 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#978 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1038 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1048 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#1071 +class Prism::AssocNode < ::Prism::Node + # def initialize: (Prism::node key, Prism::node value, Location? operator_loc, Location location) -> void + # + # @return [AssocNode] a new instance of AssocNode + # + # source://prism//lib/prism/node.rb#1073 + sig do + params( + source: Prism::Source, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, key, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1192 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1083 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1088 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1098 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1093 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?, ?location: Location) -> AssocNode + # + # source://prism//lib/prism/node.rb#1103 + sig do + params( + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::AssocNode) + end + def copy(key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1088 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::node, operator_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#1111 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1158 + sig { override.returns(String) } + def inspect; end + + # The key of the association. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { a: b } + # ^ + # + # { foo => bar } + # ^^^ + # + # { def a; end => 1 } + # ^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#1125 + sig { returns(Prism::Node) } + def key; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#1153 + sig { returns(T.nilable(String)) } + def operator; end + + # The location of the `=>` operator, if present. + # + # { foo => bar } + # ^^ + # + # source://prism//lib/prism/node.rb#1140 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1176 + sig { override.returns(Symbol) } + def type; end + + # The value of the association, if present. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # { foo => bar } + # ^^^ + # + # { x: 1 } + # ^ + # + # source://prism//lib/prism/node.rb#1134 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1186 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1204 +class Prism::AssocSplatNode < ::Prism::Node + # def initialize: (Prism::node? value, Location operator_loc, Location location) -> void + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://prism//lib/prism/node.rb#1206 + sig do + params( + source: Prism::Source, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1305 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1215 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1220 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1232 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1225 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode + # + # source://prism//lib/prism/node.rb#1237 + sig do + params( + value: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def copy(value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1220 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1245 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1271 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1266 + sig { returns(String) } + def operator; end + + # The location of the `**` operator. + # + # { **x } + # ^^ + # + # source://prism//lib/prism/node.rb#1259 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1289 + sig { override.returns(Symbol) } + def type; end + + # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. + # + # { **foo } + # ^^^ + # + # source://prism//lib/prism/node.rb#1253 + sig { returns(T.nilable(Prism::Node)) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1299 + def type; end + end +end + +# The FFI backend is used on other Ruby implementations. +# +# source://prism//lib/prism.rb#85 +Prism::BACKEND = T.let(T.unsafe(nil), Symbol) + +# Represents reading a reference to a field in the previous match. +# +# $' +# ^^ +# +# source://prism//lib/prism/node.rb#1316 +class Prism::BackReferenceReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1318 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1400 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1326 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1331 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1341 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1336 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1346 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::BackReferenceReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1331 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#1354 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1366 + sig { override.returns(String) } + def inspect; end + + # The name of the back-reference variable, including the leading `$`. + # + # $& # name `:$&` + # + # $+ # name `:$+` + # + # source://prism//lib/prism/node.rb#1363 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1384 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1394 + def type; end + end +end + +# A class that knows how to walk down the tree. None of the individual visit +# methods are implemented on this visitor, so it forces the consumer to +# implement each one that they need. For a default implementation that +# continues walking the tree, see the Visitor class. +# +# source://prism//lib/prism/visitor.rb#14 +class Prism::BasicVisitor + # Calls `accept` on the given node if it is not `nil`, which in turn should + # call back into this visitor by calling the appropriate `visit_*` method. + # + # source://prism//lib/prism/visitor.rb#17 + sig { params(node: T.nilable(Prism::Node)).void } + def visit(node); end + + # Visits each node in `nodes` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#23 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } + def visit_all(nodes); end + + # Visits the child nodes of `node` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::Node).void } + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1412 +class Prism::BeginNode < ::Prism::Node + # def initialize: (Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, Location location) -> void + # + # @return [BeginNode] a new instance of BeginNode + # + # source://prism//lib/prism/node.rb#1414 + sig do + params( + source: Prism::Source, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1551 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1427 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1507 + sig { returns(T.nilable(String)) } + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1469 + sig { returns(T.nilable(Prism::Location)) } + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1451 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1441 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?, ?location: Location) -> BeginNode + # + # source://prism//lib/prism/node.rb#1456 + sig do + params( + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::BeginNode) + end + def copy(begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#1464 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#1488 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1512 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1494 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # source://prism//lib/prism/node.rb#1491 + sig { returns(T.nilable(Prism::EnsureNode)) } + def ensure_clause; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1517 + sig { override.returns(String) } + def inspect; end + + # attr_reader rescue_clause: RescueNode? + # + # source://prism//lib/prism/node.rb#1485 + sig { returns(T.nilable(Prism::RescueNode)) } + def rescue_clause; end + + # source://prism//lib/prism/node.rb#1431 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#1482 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1535 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1545 + def type; end + end +end + +# Represents block method arguments. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1566 +class Prism::BlockArgumentNode < ::Prism::Node + # def initialize: (Prism::node? expression, Location operator_loc, Location location) -> void + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1568 + sig do + params( + source: Prism::Source, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, expression, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1661 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1577 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1594 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1587 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1599 + sig do + params( + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1607 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node? + # + # source://prism//lib/prism/node.rb#1612 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1627 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1622 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1615 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1645 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1655 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://prism//lib/prism/node.rb#1672 +class Prism::BlockLocalVariableNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location location) -> void + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1674 + sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } + def initialize(source, flags, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1762 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1683 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1688 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1698 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1693 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1703 + sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::BlockLocalVariableNode) } + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1688 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#1711 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1728 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1720 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1723 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1746 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#1716 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1756 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1773 +class Prism::BlockNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Prism::node? parameters, Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [BlockNode] a new instance of BlockNode + # + # source://prism//lib/prism/node.rb#1775 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#1890 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1787 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#1829 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1792 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#1851 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#1839 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1805 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1797 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?parameters: Prism::node?, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> BlockNode + # + # source://prism//lib/prism/node.rb#1810 + sig do + params( + locals: T::Array[Symbol], + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockNode) + end + def copy(locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1792 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Prism::node?, body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1818 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1856 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#1823 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#1846 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#1832 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parameters: Prism::node? + # + # source://prism//lib/prism/node.rb#1826 + sig { returns(T.nilable(Prism::Node)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1874 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1884 + def type; end + end +end + +# Represents a block parameter to a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#1906 +class Prism::BlockParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://prism//lib/prism/node.rb#1908 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2023 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1919 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1924 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1934 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#1929 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> BlockParameterNode + # + # source://prism//lib/prism/node.rb#1939 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1924 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#1947 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1989 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#1956 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#1959 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1984 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1972 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1979 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2007 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#1952 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2017 + def type; end + end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#2040 +class Prism::BlockParametersNode < ::Prism::Node + # def initialize: (ParametersNode? parameters, Array[BlockLocalVariableNode] locals, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://prism//lib/prism/node.rb#2042 + sig do + params( + source: Prism::Source, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, parameters, locals, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2165 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2053 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2058 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2126 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2108 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2071 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2063 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> BlockParametersNode + # + # source://prism//lib/prism/node.rb#2076 + sig do + params( + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::BlockParametersNode) + end + def copy(parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2058 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#2084 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2131 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[BlockLocalVariableNode] + # + # source://prism//lib/prism/node.rb#2092 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } + def locals; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2121 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2095 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#2089 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2149 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2159 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2179 +class Prism::BreakNode < ::Prism::Node + # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # + # @return [BreakNode] a new instance of BreakNode + # + # source://prism//lib/prism/node.rb#2181 + sig do + params( + source: Prism::Source, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, arguments, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2280 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2190 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # break foo + # ^^^ + # + # source://prism//lib/prism/node.rb#2228 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2195 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2207 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2200 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode + # + # source://prism//lib/prism/node.rb#2212 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BreakNode) + end + def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2195 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#2220 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2246 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#2241 + sig { returns(String) } + def keyword; end + + # The location of the `break` keyword. + # + # break foo + # ^^^^^ + # + # source://prism//lib/prism/node.rb#2234 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2264 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2274 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2291 +class Prism::CallAndWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2293 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2462 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2308 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2403 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2413 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2351 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2313 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2326 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2318 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2331 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::CallAndWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2313 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#2339 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2408 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2428 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2418 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2364 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2423 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2383 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2377 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2348 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2393 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2446 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2390 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2398 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2380 + sig { returns(Symbol) } + def write_name; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2344 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2456 + def type; end + end +end + +# Represents a method call, in all of the various forms that can take. +# +# foo +# ^^^ +# +# foo() +# ^^^^^ +# +# +foo +# ^^^^ +# +# foo + bar +# ^^^^^^^^^ +# +# foo.bar +# ^^^^^^^ +# +# foo&.bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2494 +class Prism::CallNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Prism::node? block, Location location) -> void + # + # @return [CallNode] a new instance of CallNode + # + # source://prism//lib/prism/node.rb#2496 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2700 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2512 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#2607 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2636 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#2623 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2646 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2565 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2517 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2661 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2610 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2531 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2522 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: Prism::node?, ?location: Location) -> CallNode + # + # source://prism//lib/prism/node.rb#2536 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::CallNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2517 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#2544 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # When a call node has the attribute_write flag set, it means that the call + # is using the attribute write syntax. This is either a method call to []= + # or a method call to a method that ends with =. Either way, the = sign is + # present in the source. + # + # Prism returns the message_loc _without_ the = sign attached, because there + # can be any amount of space between the message and the = sign. However, + # sometimes you want the location of the full message including the inner + # space and the = sign. This method provides that. + # + # source://prism//lib/prism/node_ext.rb#299 + sig { returns(T.nilable(Prism::Location)) } + def full_message_loc; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2641 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2666 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2651 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2581 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2578 + sig { returns(Symbol) } + def name; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2656 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2594 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar + # ^^^ + # + # +foo + # ^^^ + # + # foo + bar + # ^^^ + # + # source://prism//lib/prism/node.rb#2562 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2626 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2684 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2631 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2549 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2694 + def type; end + end +end + +# Flags for call nodes. +# +# source://prism//lib/prism/node.rb#19217 +module Prism::CallNodeFlags; end + +# a call that is an attribute write, so the value being written should be returned +# +# source://prism//lib/prism/node.rb#19225 +Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) + +# a call that ignores method visibility +# +# source://prism//lib/prism/node.rb#19228 +Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) + +# &. operator +# +# source://prism//lib/prism/node.rb#19219 +Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) + +# a call that could have been a local variable +# +# source://prism//lib/prism/node.rb#19222 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2718 +class Prism::CallOperatorWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2720 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#2888 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2736 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2834 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#2811 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#2814 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2844 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2779 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2741 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2754 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2746 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2759 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::CallOperatorWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2741 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#2767 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2839 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2854 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2849 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2792 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#307 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#314 + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2805 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2776 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2824 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2872 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2821 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2829 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2808 + sig { returns(Symbol) } + def write_name; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2772 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2882 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2906 +class Prism::CallOrWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2908 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3077 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2923 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3018 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3028 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2966 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2928 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2941 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2933 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2946 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::CallOrWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), message_loc: T.unsafe(nil), read_name: T.unsafe(nil), write_name: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2928 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#2954 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3023 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3043 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#3033 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2979 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3038 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2998 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2992 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2963 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3008 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3061 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3005 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3013 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2995 + sig { returns(Symbol) } + def write_name; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2959 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3071 + def type; end + end +end + +# Represents assigning to a method call. +# +# foo.bar, = 1 +# ^^^^^^^ +# +# begin +# rescue => foo.bar +# ^^^^^^^ +# end +# +# for foo.bar in baz do end +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#3102 +class Prism::CallTargetNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void + # + # @return [CallTargetNode] a new instance of CallTargetNode + # + # source://prism//lib/prism/node.rb#3104 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3237 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3116 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3183 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String + # + # source://prism//lib/prism/node.rb#3193 + sig { returns(String) } + def call_operator; end + + # attr_reader call_operator_loc: Location + # + # source://prism//lib/prism/node.rb#3156 + sig { returns(Prism::Location) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3121 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3131 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3126 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location, ?location: Location) -> CallTargetNode + # + # source://prism//lib/prism/node.rb#3136 + sig do + params( + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CallTargetNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3121 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3144 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3188 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3203 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String + # + # source://prism//lib/prism/node.rb#3198 + sig { returns(String) } + def message; end + + # attr_reader message_loc: Location + # + # source://prism//lib/prism/node.rb#3166 + sig { returns(Prism::Location) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3163 + sig { returns(Symbol) } + def name; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#3153 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3173 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3221 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3178 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#3149 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3231 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3251 +class Prism::CapturePatternNode < ::Prism::Node + # def initialize: (Prism::node value, Prism::node target, Location operator_loc, Location location) -> void + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://prism//lib/prism/node.rb#3253 + sig do + params( + source: Prism::Source, + value: Prism::Node, + target: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, value, target, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3348 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3263 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3268 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3278 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3273 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?target: Prism::node, ?operator_loc: Location, ?location: Location) -> CapturePatternNode + # + # source://prism//lib/prism/node.rb#3283 + sig do + params( + value: Prism::Node, + target: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def copy(value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3268 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3291 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3314 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3309 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3302 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: Prism::node + # + # source://prism//lib/prism/node.rb#3299 + sig { returns(Prism::Node) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3332 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3296 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3342 + def type; end + end +end + +# Represents the use of a case statement for pattern matching. +# +# case true +# in false +# end +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3362 +class Prism::CaseMatchNode < ::Prism::Node + # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # + # @return [CaseMatchNode] a new instance of CaseMatchNode + # + # source://prism//lib/prism/node.rb#3364 + sig do + params( + source: Prism::Source, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3480 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3376 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3436 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3422 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3381 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3395 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3386 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#3416 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#3419 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseMatchNode + # + # source://prism//lib/prism/node.rb#3400 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3381 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3408 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3441 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3429 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3446 + sig { override.returns(String) } + def inspect; end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3413 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3464 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3474 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# when false +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3497 +class Prism::CaseNode < ::Prism::Node + # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # + # @return [CaseNode] a new instance of CaseNode + # + # source://prism//lib/prism/node.rb#3499 + sig do + params( + source: Prism::Source, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3615 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3511 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3571 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3557 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3516 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3530 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3521 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#3551 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#3554 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseNode + # + # source://prism//lib/prism/node.rb#3535 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CaseNode) + end + def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3516 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#3543 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3576 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3564 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3581 + sig { override.returns(String) } + def inspect; end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3548 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3599 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3609 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3630 +class Prism::ClassNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Prism::node constant_path, Location? inheritance_operator_loc, Prism::node? superclass, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # + # @return [ClassNode] a new instance of ClassNode + # + # source://prism//lib/prism/node.rb#3632 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: Prism::Node, + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end + def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3775 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3647 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#3713 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3652 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3726 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3687 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3666 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3657 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: Prism::node + # + # source://prism//lib/prism/node.rb#3694 + sig { returns(Prism::Node) } + def constant_path; end + + # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: Prism::node, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ClassNode + # + # source://prism//lib/prism/node.rb#3671 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: Prism::Node, + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).returns(Prism::ClassNode) + end + def copy(locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3652 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Prism::node, inheritance_operator_loc: Location?, superclass: Prism::node?, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#3679 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3736 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3716 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inheritance_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3731 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#3697 + sig { returns(T.nilable(Prism::Location)) } + def inheritance_operator_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3741 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#3684 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3723 + sig { returns(Symbol) } + def name; end + + # attr_reader superclass: Prism::node? + # + # source://prism//lib/prism/node.rb#3710 + sig { returns(T.nilable(Prism::Node)) } + def superclass; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3759 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3769 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3793 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3795 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#3898 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3806 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3811 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3821 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3816 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3826 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ClassVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3811 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#3834 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#127 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3864 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3839 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3842 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3859 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3849 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3882 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3856 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3892 + def type; end + end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3911 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3913 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4015 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3925 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#3978 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#3968 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3930 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3940 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#3935 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3945 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3930 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#3953 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#139 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3981 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3958 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3961 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#323 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#330 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3999 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3975 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4009 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4029 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#4031 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4134 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4042 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4047 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4057 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4052 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#4062 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ClassVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4047 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#4070 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#133 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4100 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4075 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4078 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4095 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4085 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4118 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4092 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4128 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://prism//lib/prism/node.rb#4147 +class Prism::ClassVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#4149 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4231 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4157 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4162 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4172 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4167 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#4177 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4162 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#4185 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4197 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc # name `:@@abc` + # + # @@_test # name `:@@_test` + # + # source://prism//lib/prism/node.rb#4194 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4215 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4225 + def type; end + end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# source://prism//lib/prism/node.rb#4241 +class Prism::ClassVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#4243 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4321 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4251 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4256 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4266 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4261 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#4271 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4256 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#4279 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4287 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4284 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4305 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4315 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4331 +class Prism::ClassVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#4333 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4452 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4344 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4349 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4359 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4354 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#4364 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4349 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#4372 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4418 + sig { override.returns(String) } + def inspect; end + + # The name of the class variable, which is a `@@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @@abc = 123 # name `@@abc` + # + # @@_test = :test # name `@@_test` + # + # source://prism//lib/prism/node.rb#4381 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @@foo = :bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#4387 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4413 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @@foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#4406 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4436 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the class variable. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @@foo = :bar + # ^^^^ + # + # @@_xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#4400 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4446 + def type; end + end +end + +# This represents a comment that was encountered during parsing. It is the +# base class for all comment types. +# +# source://prism//lib/prism/parse_result.rb#366 +class Prism::Comment + abstract! + + # Create a new comment object with the given location. + # + # @return [Comment] a new instance of Comment + # + # source://prism//lib/prism/parse_result.rb#371 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # Implement the hash pattern matching interface for Comment. + # + # source://prism//lib/prism/parse_result.rb#376 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The location of this comment in the source. + # + # source://prism//lib/prism/parse_result.rb#368 + sig { returns(Prism::Location) } + def location; end + + # Returns the content of the comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#381 + sig { returns(String) } + def slice; end + + sig { abstract.returns(T::Boolean) } + def trailing?; end +end + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# For example, to build a representation of the tree as s-expressions, you +# could write: +# +# class SExpressions < Prism::Compiler +# def visit_arguments_node(node) = [:arguments, super] +# def visit_call_node(node) = [:call, super] +# def visit_integer_node(node) = [:integer] +# def visit_program_node(node) = [:program, super] +# end +# +# Prism.parse("1 + 2").value.accept(SExpressions.new) +# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] +# +# source://prism//lib/prism/compiler.rb#27 +class Prism::Compiler < ::Prism::Visitor + # Visit an individual node. + # + # source://prism//lib/prism/compiler.rb#29 + sig { params(node: T.nilable(Prism::Node)).returns(T.untyped) } + def visit(node); end + + # Visit the child nodes of the given node. + # Compile a AliasGlobalVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alias_global_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a AliasMethodNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # source://prism//lib/prism/compiler.rb#34 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.untyped]) } + def visit_all(nodes); end + + # Visit the child nodes of the given node. + # Compile a AlternationPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alternation_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AndNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_and_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_array_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_array_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_assoc_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocSplatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_assoc_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a BackReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_back_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a BeginNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_begin_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockArgumentNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_argument_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockLocalVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_local_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a BreakNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_break_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a CapturePatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_capture_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseMatchNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_case_match_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # source://prism//lib/prism/compiler.rb#39 + sig { params(node: Prism::Node).returns(T::Array[T.untyped]) } + def visit_child_nodes(node); end + + # Visit the child nodes of the given node. + # Compile a ClassNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_def_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefinedNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_defined_node(node); end + + # Visit the child nodes of the given node. + # Compile a ElseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_else_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedStatementsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_embedded_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_embedded_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a EnsureNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_ensure_node(node); end + + # Visit the child nodes of the given node. + # Compile a FalseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_false_node(node); end + + # Visit the child nodes of the given node. + # Compile a FindPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_find_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a FlipFlopNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_flip_flop_node(node); end + + # Visit the child nodes of the given node. + # Compile a FloatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_float_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_for_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingSuperNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_hash_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a IfNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_if_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImaginaryNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_imaginary_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_implicit_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitRestNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_implicit_rest_node(node); end + + # Visit the child nodes of the given node. + # Compile a InNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_in_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IntegerNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_integer_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedSymbolNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedXStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a ItParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_it_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordHashNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_keyword_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordRestParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_keyword_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a LambdaNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_lambda_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchPredicateNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_predicate_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchRequiredNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_required_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MissingNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_missing_node(node); end + + # Visit the child nodes of the given node. + # Compile a ModuleNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_module_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_multi_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_multi_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a NextNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_next_node(node); end + + # Visit the child nodes of the given node. + # Compile a NilNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_nil_node(node); end + + # Visit the child nodes of the given node. + # Compile a NoKeywordsParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_no_keywords_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_numbered_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_numbered_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_optional_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_optional_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OrNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_or_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParenthesesNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_parentheses_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pinned_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pinned_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a PostExecutionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_post_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a PreExecutionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pre_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a ProgramNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_program_node(node); end + + # Visit the child nodes of the given node. + # Compile a RangeNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_range_node(node); end + + # Visit the child nodes of the given node. + # Compile a RationalNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rational_node(node); end + + # Visit the child nodes of the given node. + # Compile a RedoNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_redo_node(node); end + + # Visit the child nodes of the given node. + # Compile a RegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_required_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_required_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueModifierNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rescue_modifier_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rescue_node(node); end + + # Visit the child nodes of the given node. + # Compile a RestParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RetryNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_retry_node(node); end + + # Visit the child nodes of the given node. + # Compile a ReturnNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_return_node(node); end + + # Visit the child nodes of the given node. + # Compile a SelfNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_self_node(node); end + + # Visit the child nodes of the given node. + # Compile a ShareableConstantNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_shareable_constant_node(node); end + + # Visit the child nodes of the given node. + # Compile a SingletonClassNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_singleton_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceEncodingNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_encoding_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceFileNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_file_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a SplatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StatementsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a SuperNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a SymbolNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a TrueNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_true_node(node); end + + # Visit the child nodes of the given node. + # Compile a UndefNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_undef_node(node); end + + # Visit the child nodes of the given node. + # Compile a UnlessNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_unless_node(node); end + + # Visit the child nodes of the given node. + # Compile a UntilNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_until_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhenNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_when_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhileNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_while_node(node); end + + # Visit the child nodes of the given node. + # Compile a XStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a YieldNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_yield_node(node); end +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4465 +class Prism::ConstantAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#4467 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4570 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4478 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4483 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4493 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4488 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#4498 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4483 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#4506 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#145 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4536 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4511 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4514 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4531 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4521 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4554 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4528 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4564 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4583 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4585 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4687 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4597 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#4650 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#4640 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4602 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4612 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4607 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4617 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::ConstantOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4602 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#4625 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#157 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4653 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4630 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4633 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#339 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#346 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4671 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4647 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4681 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4701 +class Prism::ConstantOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4703 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4806 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4714 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4719 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4729 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4724 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4734 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4719 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#4742 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#151 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4772 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4747 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4750 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4767 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4757 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4790 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4764 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4800 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4819 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4821 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, target, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#4916 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4831 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4836 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4846 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4841 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4851 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathAndWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4836 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#4859 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4882 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4877 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4867 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4864 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4900 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4874 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4910 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4928 +class Prism::ConstantPathNode < ::Prism::Node + # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://prism//lib/prism/node.rb#4930 + sig do + params( + source: Prism::Source, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, parent, name, delimiter_loc, name_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5056 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4941 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#181 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4946 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#4958 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#4951 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathNode + # + # source://prism//lib/prism/node.rb#4963 + sig do + params( + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4946 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#4971 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#5017 + sig { returns(String) } + def delimiter; end + + # The location of the `::` delimiter. + # + # ::Foo + # ^^ + # + # One::Two + # ^^ + # + # source://prism//lib/prism/node.rb#4997 + sig { returns(Prism::Location) } + def delimiter_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#174 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#152 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5022 + sig { override.returns(String) } + def inspect; end + + # The name of the constant being accessed. This could be `nil` in the event of a syntax error. + # + # source://prism//lib/prism/node.rb#4988 + sig { returns(T.nilable(Symbol)) } + def name; end + + # The location of the name of the constant. + # + # ::Foo + # ^^^ + # + # One::Two + # ^^^ + # + # source://prism//lib/prism/node.rb#5010 + sig { returns(Prism::Location) } + def name_loc; end + + # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. + # + # Foo::Bar + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^^^ + # + # source://prism//lib/prism/node.rb#4985 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5040 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5050 + def type; end + end +end + +# An error class raised when dynamic parts are found while computing a +# constant path's full name. For example: +# Foo::Bar::Baz -> does not raise because all parts of the constant path are +# simple constants +# var::Bar::Baz -> raises because the first part of the constant path is a +# local variable +# +# source://prism//lib/prism/node_ext.rb#143 +class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end + +# An error class raised when missing nodes are found while computing a +# constant path's full name. For example: +# Foo:: -> raises because the constant path is missing the last part +# +# source://prism//lib/prism/node_ext.rb#148 +class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end + +# Represents assigning to a constant path using an operator that isn't `=`. +# +# Parent::Child += value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5069 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5071 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, target, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5165 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5082 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#5128 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#5118 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5087 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5097 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5092 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#5102 + sig do + params( + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def copy(target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5087 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#5110 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5131 + sig { override.returns(String) } + def inspect; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#355 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#362 + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5115 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5149 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5125 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5159 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5178 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#5180 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, target, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5275 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5190 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5195 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5205 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5200 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#5210 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathOrWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5195 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#5218 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5241 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5236 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5226 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5223 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5259 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5233 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5269 + def type; end + end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5287 +class Prism::ConstantPathTargetNode < ::Prism::Node + # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#5289 + sig do + params( + source: Prism::Source, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, parent, name, delimiter_loc, name_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5394 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5300 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#217 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5305 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5317 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5310 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#5322 + sig do + params( + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5305 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#5330 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#5355 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#5341 + sig { returns(Prism::Location) } + def delimiter_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#210 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant path. + # For example: [:Foo, :Bar] + # + # source://prism//lib/prism/node_ext.rb#190 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5360 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#5338 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5348 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader parent: Prism::node? + # + # source://prism//lib/prism/node.rb#5335 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5378 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5388 + def type; end + end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5413 +class Prism::ConstantPathWriteNode < ::Prism::Node + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#5415 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, target, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5522 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5425 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5430 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5440 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5435 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#5445 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5430 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#5453 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5488 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5483 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # ::ABC = 123 + # ^ + # + # source://prism//lib/prism/node.rb#5470 + sig { returns(Prism::Location) } + def operator_loc; end + + # A node representing the constant path being written to. + # + # Foo::Bar = 1 + # ^^^^^^^^ + # + # ::Foo = :abc + # ^^^^^ + # + # source://prism//lib/prism/node.rb#5464 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5506 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant path. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO::BAR = :abc + # ^^^^ + # + # source://prism//lib/prism/node.rb#5480 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5516 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://prism//lib/prism/node.rb#5534 +class Prism::ConstantReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://prism//lib/prism/node.rb#5536 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5618 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5544 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5549 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5559 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5554 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode + # + # source://prism//lib/prism/node.rb#5564 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5549 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#5572 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#118 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#113 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5584 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # X # name `:X` + # + # SOME_CONSTANT # name `:SOME_CONSTANT` + # + # source://prism//lib/prism/node.rb#5581 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5602 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5612 + def type; end + end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#5628 +class Prism::ConstantTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://prism//lib/prism/node.rb#5630 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5708 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5638 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5643 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5653 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5648 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode + # + # source://prism//lib/prism/node.rb#5658 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5643 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#5666 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#231 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#226 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5674 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5671 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5692 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5702 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#5718 +class Prism::ConstantWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5720 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#5839 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5731 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5736 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5746 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5741 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5751 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5736 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#5759 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#131 + sig { returns(String) } + def full_name; end + + # Returns the list of parts for the full name of this constant. + # For example: [:Foo] + # + # source://prism//lib/prism/node_ext.rb#126 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5805 + sig { override.returns(String) } + def inspect; end + + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). + # + # Foo = :bar # name `:Foo` + # + # XYZ = 1 # name `:XYZ` + # + # source://prism//lib/prism/node.rb#5768 + sig { returns(Symbol) } + def name; end + + # The location of the constant name. + # + # FOO = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#5774 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5800 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # FOO = :bar + # ^ + # + # source://prism//lib/prism/node.rb#5793 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5823 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO = :bar + # ^^^^ + # + # MyClass = Class.new + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#5787 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5833 + def type; end + 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.for("[1]") +# +# Prism::ArrayNode.new( +# [ +# Prism::IntegerNode.new( +# Prism::IntegerBaseFlags::DECIMAL, +# 1, +# Prism::Location.new(source, 1, 1), +# source +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1), +# source +# ) +# +# you could instead write: +# +# source = Prism::Source.for("[1]") +# +# ArrayNode( +# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, 1, Location(source, 1, 1)), source), +# Location(source, 0, 1), +# Location(source, 2, 1), +# source +# ) +# +# This is mostly helpful in the context of writing tests, but can also be used +# to generate trees programmatically. +# +# source://prism//lib/prism/dsl.rb#42 +module Prism::DSL + private + + # Create a new AliasGlobalVariableNode node + # + # source://prism//lib/prism/dsl.rb#51 + def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AliasMethodNode node + # + # source://prism//lib/prism/dsl.rb#56 + def AliasMethodNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AlternationPatternNode node + # + # source://prism//lib/prism/dsl.rb#61 + def AlternationPatternNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AndNode node + # + # source://prism//lib/prism/dsl.rb#66 + def AndNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#71 + def ArgumentsNode(flags, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ArrayNode node + # + # source://prism//lib/prism/dsl.rb#76 + def ArrayNode(flags, elements, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ArrayPatternNode node + # + # source://prism//lib/prism/dsl.rb#81 + def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AssocNode node + # + # source://prism//lib/prism/dsl.rb#86 + def AssocNode(key, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new AssocSplatNode node + # + # source://prism//lib/prism/dsl.rb#91 + def AssocSplatNode(value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BackReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#96 + def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BeginNode node + # + # source://prism//lib/prism/dsl.rb#101 + def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockArgumentNode node + # + # source://prism//lib/prism/dsl.rb#106 + def BlockArgumentNode(expression, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockLocalVariableNode node + # + # source://prism//lib/prism/dsl.rb#111 + def BlockLocalVariableNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockNode node + # + # source://prism//lib/prism/dsl.rb#116 + def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockParameterNode node + # + # source://prism//lib/prism/dsl.rb#121 + def BlockParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BlockParametersNode node + # + # source://prism//lib/prism/dsl.rb#126 + def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BreakNode node + # + # source://prism//lib/prism/dsl.rb#131 + def BreakNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#136 + def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallNode node + # + # source://prism//lib/prism/dsl.rb#141 + def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#146 + def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#151 + def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CallTargetNode node + # + # source://prism//lib/prism/dsl.rb#156 + def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CapturePatternNode node + # + # source://prism//lib/prism/dsl.rb#161 + def CapturePatternNode(value, target, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CaseMatchNode node + # + # source://prism//lib/prism/dsl.rb#166 + def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new CaseNode node + # + # source://prism//lib/prism/dsl.rb#171 + def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassNode node + # + # source://prism//lib/prism/dsl.rb#176 + def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#181 + def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#186 + def ClassVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#191 + def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#196 + def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#201 + def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#206 + def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#211 + def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#216 + def ConstantOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#221 + def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#226 + def ConstantPathAndWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathNode node + # + # source://prism//lib/prism/dsl.rb#231 + def ConstantPathNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#236 + def ConstantPathOperatorWriteNode(target, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#241 + def ConstantPathOrWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathTargetNode node + # + # source://prism//lib/prism/dsl.rb#246 + def ConstantPathTargetNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantPathWriteNode node + # + # source://prism//lib/prism/dsl.rb#251 + def ConstantPathWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantReadNode node + # + # source://prism//lib/prism/dsl.rb#256 + def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantTargetNode node + # + # source://prism//lib/prism/dsl.rb#261 + def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantWriteNode node + # + # source://prism//lib/prism/dsl.rb#266 + def ConstantWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new DefNode node + # + # source://prism//lib/prism/dsl.rb#271 + def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new DefinedNode node + # + # source://prism//lib/prism/dsl.rb#276 + def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ElseNode node + # + # source://prism//lib/prism/dsl.rb#281 + def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new EmbeddedStatementsNode node + # + # source://prism//lib/prism/dsl.rb#286 + def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new EmbeddedVariableNode node + # + # source://prism//lib/prism/dsl.rb#291 + def EmbeddedVariableNode(operator_loc, variable, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new EnsureNode node + # + # source://prism//lib/prism/dsl.rb#296 + def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FalseNode node + # + # source://prism//lib/prism/dsl.rb#301 + def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FindPatternNode node + # + # source://prism//lib/prism/dsl.rb#306 + def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FlipFlopNode node + # + # source://prism//lib/prism/dsl.rb#311 + def FlipFlopNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FloatNode node + # + # source://prism//lib/prism/dsl.rb#316 + def FloatNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForNode node + # + # source://prism//lib/prism/dsl.rb#321 + def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForwardingArgumentsNode node + # + # source://prism//lib/prism/dsl.rb#326 + def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node + # + # source://prism//lib/prism/dsl.rb#331 + def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForwardingSuperNode node + # + # source://prism//lib/prism/dsl.rb#336 + def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#341 + def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#346 + def GlobalVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#351 + def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#356 + def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#361 + def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#366 + def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new HashNode node + # + # source://prism//lib/prism/dsl.rb#371 + def HashNode(opening_loc, elements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new HashPatternNode node + # + # source://prism//lib/prism/dsl.rb#376 + def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IfNode node + # + # source://prism//lib/prism/dsl.rb#381 + def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImaginaryNode node + # + # source://prism//lib/prism/dsl.rb#386 + def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImplicitNode node + # + # source://prism//lib/prism/dsl.rb#391 + def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImplicitRestNode node + # + # source://prism//lib/prism/dsl.rb#396 + def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InNode node + # + # source://prism//lib/prism/dsl.rb#401 + def InNode(pattern, statements, in_loc, then_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#406 + def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#411 + def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#416 + def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IndexTargetNode node + # + # source://prism//lib/prism/dsl.rb#421 + def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#426 + def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#431 + def InstanceVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#436 + def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#441 + def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#446 + def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#451 + def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new IntegerNode node + # + # source://prism//lib/prism/dsl.rb#456 + def IntegerNode(flags, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/dsl.rb#461 + def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#466 + def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedStringNode node + # + # source://prism//lib/prism/dsl.rb#471 + def InterpolatedStringNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedSymbolNode node + # + # source://prism//lib/prism/dsl.rb#476 + def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InterpolatedXStringNode node + # + # source://prism//lib/prism/dsl.rb#481 + def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ItParametersNode node + # + # source://prism//lib/prism/dsl.rb#486 + def ItParametersNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new KeywordHashNode node + # + # source://prism//lib/prism/dsl.rb#491 + def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new KeywordRestParameterNode node + # + # source://prism//lib/prism/dsl.rb#496 + def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LambdaNode node + # + # source://prism//lib/prism/dsl.rb#501 + def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#506 + def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#511 + def LocalVariableOperatorWriteNode(name_loc, binary_operator_loc, value, name, binary_operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#516 + def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableReadNode node + # + # source://prism//lib/prism/dsl.rb#521 + def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableTargetNode node + # + # source://prism//lib/prism/dsl.rb#526 + def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new LocalVariableWriteNode node + # + # source://prism//lib/prism/dsl.rb#531 + def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new Location object + # + # source://prism//lib/prism/dsl.rb#46 + def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end + + # Create a new MatchLastLineNode node + # + # source://prism//lib/prism/dsl.rb#536 + def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MatchPredicateNode node + # + # source://prism//lib/prism/dsl.rb#541 + def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MatchRequiredNode node + # + # source://prism//lib/prism/dsl.rb#546 + def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MatchWriteNode node + # + # source://prism//lib/prism/dsl.rb#551 + def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MissingNode node + # + # source://prism//lib/prism/dsl.rb#556 + def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ModuleNode node + # + # source://prism//lib/prism/dsl.rb#561 + def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MultiTargetNode node + # + # source://prism//lib/prism/dsl.rb#566 + def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new MultiWriteNode node + # + # source://prism//lib/prism/dsl.rb#571 + def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NextNode node + # + # source://prism//lib/prism/dsl.rb#576 + def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NilNode node + # + # source://prism//lib/prism/dsl.rb#581 + def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node + # + # source://prism//lib/prism/dsl.rb#586 + def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NumberedParametersNode node + # + # source://prism//lib/prism/dsl.rb#591 + def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node + # + # source://prism//lib/prism/dsl.rb#596 + def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new OptionalKeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#601 + def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new OptionalParameterNode node + # + # source://prism//lib/prism/dsl.rb#606 + def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new OrNode node + # + # source://prism//lib/prism/dsl.rb#611 + def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ParametersNode node + # + # source://prism//lib/prism/dsl.rb#616 + def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ParenthesesNode node + # + # source://prism//lib/prism/dsl.rb#621 + def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PinnedExpressionNode node + # + # source://prism//lib/prism/dsl.rb#626 + def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PinnedVariableNode node + # + # source://prism//lib/prism/dsl.rb#631 + def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PostExecutionNode node + # + # source://prism//lib/prism/dsl.rb#636 + def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new PreExecutionNode node + # + # source://prism//lib/prism/dsl.rb#641 + def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ProgramNode node + # + # source://prism//lib/prism/dsl.rb#646 + def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RangeNode node + # + # source://prism//lib/prism/dsl.rb#651 + def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RationalNode node + # + # source://prism//lib/prism/dsl.rb#656 + def RationalNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RedoNode node + # + # source://prism//lib/prism/dsl.rb#661 + def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RegularExpressionNode node + # + # source://prism//lib/prism/dsl.rb#666 + def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RequiredKeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#671 + def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RequiredParameterNode node + # + # source://prism//lib/prism/dsl.rb#676 + def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RescueModifierNode node + # + # source://prism//lib/prism/dsl.rb#681 + def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RescueNode node + # + # source://prism//lib/prism/dsl.rb#686 + def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RestParameterNode node + # + # source://prism//lib/prism/dsl.rb#691 + def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RetryNode node + # + # source://prism//lib/prism/dsl.rb#696 + def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ReturnNode node + # + # source://prism//lib/prism/dsl.rb#701 + def ReturnNode(flags, keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SelfNode node + # + # source://prism//lib/prism/dsl.rb#706 + def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ShareableConstantNode node + # + # source://prism//lib/prism/dsl.rb#711 + def ShareableConstantNode(flags, write, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SingletonClassNode node + # + # source://prism//lib/prism/dsl.rb#716 + def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceEncodingNode node + # + # source://prism//lib/prism/dsl.rb#721 + def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceFileNode node + # + # source://prism//lib/prism/dsl.rb#726 + def SourceFileNode(flags, filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceLineNode node + # + # source://prism//lib/prism/dsl.rb#731 + def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SplatNode node + # + # source://prism//lib/prism/dsl.rb#736 + def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new StatementsNode node + # + # source://prism//lib/prism/dsl.rb#741 + def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new StringNode node + # + # source://prism//lib/prism/dsl.rb#746 + def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SuperNode node + # + # source://prism//lib/prism/dsl.rb#751 + def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SymbolNode node + # + # source://prism//lib/prism/dsl.rb#756 + def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new TrueNode node + # + # source://prism//lib/prism/dsl.rb#761 + def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UndefNode node + # + # source://prism//lib/prism/dsl.rb#766 + def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UnlessNode node + # + # source://prism//lib/prism/dsl.rb#771 + def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UntilNode node + # + # source://prism//lib/prism/dsl.rb#776 + def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new WhenNode node + # + # source://prism//lib/prism/dsl.rb#781 + def WhenNode(keyword_loc, conditions, then_keyword_loc, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new WhileNode node + # + # source://prism//lib/prism/dsl.rb#786 + def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new XStringNode node + # + # source://prism//lib/prism/dsl.rb#791 + def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new YieldNode node + # + # source://prism//lib/prism/dsl.rb#796 + def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end +end + +# This module is used for testing and debugging and is not meant to be used by +# consumers of this library. +# +# source://prism//lib/prism/debug.rb#6 +module Prism::Debug + class << self + # :call-seq: + # Debug::cruby_locals(source) -> Array + # + # For the given source, compiles with CRuby and returns a list of all of the + # sets of local variables that were encountered. + # + # source://prism//lib/prism/debug.rb#54 + def cruby_locals(source); end + + def format_errors(_arg0, _arg1); end + def inspect_node(_arg0); end + def integer_parse(_arg0); end + def memsize(_arg0); end + def named_captures(_arg0); end + + # :call-seq: + # Debug::newlines(source) -> Array + # + # For the given source string, return the byte offsets of every newline in + # the source. + # + # source://prism//lib/prism/debug.rb#202 + def newlines(source); end + + # :call-seq: + # Debug::prism_locals(source) -> Array + # + # For the given source, parses with prism and returns a list of all of the + # sets of local variables that were encountered. + # + # source://prism//lib/prism/debug.rb#98 + def prism_locals(source); end + + def profile_file(_arg0); end + def static_inspect(*_arg0); end + end +end + +# Used to hold the place of a local that will be in the local table but +# cannot be accessed directly from the source code. For example, the +# iteration variable in a for loop or the positional parameter on a method +# definition that is destructured. +# +# source://prism//lib/prism/debug.rb#90 +Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) + +# A wrapping around prism's internal encoding data structures. This is used +# for reflection and debugging purposes. +# +# source://prism//lib/prism/debug.rb#208 +class Prism::Debug::Encoding + # Initialize a new encoding with the given name and whether or not it is + # a multibyte encoding. + # + # @return [Encoding] a new instance of Encoding + # + # source://prism//lib/prism/debug.rb#214 + def initialize(name, multibyte); end + + # Returns true if the first character in the source string is a valid + # alphanumeric character for the encoding. + # + # @return [Boolean] + # + # source://prism//lib/prism/debug.rb#232 + def alnum?(source); end + + # Returns true if the first character in the source string is a valid + # alphabetic character for the encoding. + # + # @return [Boolean] + # + # source://prism//lib/prism/debug.rb#238 + def alpha?(source); end + + # Whether or not the encoding is a multibyte encoding. + # + # @return [Boolean] + # + # source://prism//lib/prism/debug.rb#220 + def multibyte?; end + + # The name of the encoding, that can be passed to Encoding.find. + # + # source://prism//lib/prism/debug.rb#210 + def name; end + + # Returns true if the first character in the source string is a valid + # uppercase character for the encoding. + # + # @return [Boolean] + # + # source://prism//lib/prism/debug.rb#244 + def upper?(source); end + + # Returns the number of bytes of the first character in the source string, + # if it is valid for the encoding. Otherwise, returns 0. + # + # source://prism//lib/prism/debug.rb#226 + def width(source); end + + class << self + def _alnum?(_arg0, _arg1); end + def _alpha?(_arg0, _arg1); end + def _upper?(_arg0, _arg1); end + def _width(_arg0, _arg1); end + def all; end + end +end + +# A wrapper around a RubyVM::InstructionSequence that provides a more +# convenient interface for accessing parts of the iseq. +# +# source://prism//lib/prism/debug.rb#9 +class Prism::Debug::ISeq + # @return [ISeq] a new instance of ISeq + # + # source://prism//lib/prism/debug.rb#12 + def initialize(parts); end + + # source://prism//lib/prism/debug.rb#28 + def each_child; end + + # source://prism//lib/prism/debug.rb#24 + def instructions; end + + # source://prism//lib/prism/debug.rb#20 + def local_table; end + + # source://prism//lib/prism/debug.rb#10 + def parts; end + + # source://prism//lib/prism/debug.rb#16 + def type; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5853 +class Prism::DefNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters, Prism::node? body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc, Location location) -> void + # + # @return [DefNode] a new instance of DefNode + # + # source://prism//lib/prism/node.rb#5855 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(Prism::Node), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6069 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5874 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#5927 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5879 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5893 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5884 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: Prism::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) -> DefNode + # + # source://prism//lib/prism/node.rb#5898 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(Prism::Node), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::DefNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5879 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: Prism::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 } + # + # source://prism//lib/prism/node.rb#5906 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6005 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5933 + sig { returns(Prism::Location) } + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6030 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5992 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://prism//lib/prism/node.rb#6025 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # source://prism//lib/prism/node.rb#5979 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6035 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#5930 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#6015 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5953 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5911 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5914 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#6010 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#5940 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#5924 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#5921 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#6020 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5966 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6053 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6063 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6091 +class Prism::DefinedNode < ::Prism::Node + # def initialize: (Location? lparen_loc, Prism::node value, Location? rparen_loc, Location keyword_loc, Location location) -> void + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://prism//lib/prism/node.rb#6093 + sig do + params( + source: Prism::Source, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6222 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6104 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6109 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6119 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6114 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location, ?location: Location) -> DefinedNode + # + # source://prism//lib/prism/node.rb#6124 + sig do + params( + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::DefinedNode) + end + def copy(lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6109 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#6132 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6188 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#6183 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6166 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#6173 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6137 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#6178 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6153 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6206 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6150 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6216 + def type; end + end +end + +# source://prism//lib/prism/desugar_compiler.rb#4 +class Prism::DesugarAndWriteNode + # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def arguments; end + + # Desugar `x &&= y` to `x && x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#16 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def write_class; end +end + +# DesugarCompiler is a compiler that desugars Ruby code into a more primitive +# form. This is useful for consumers that want to deal with fewer node types. +# +# source://prism//lib/prism/desugar_compiler.rb#218 +class Prism::DesugarCompiler < ::Prism::MutationCompiler + # @@foo &&= bar + # + # becomes + # + # @@foo && @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#224 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#242 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#233 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#251 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#269 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#260 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#278 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#296 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#287 + def visit_global_variable_or_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#305 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#323 + def visit_instance_variable_operator_write_node(node); end + + # becomes + # + # source://prism//lib/prism/desugar_compiler.rb#314 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#332 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#350 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#341 + def visit_local_variable_or_write_node(node); end +end + +# source://prism//lib/prism/desugar_compiler.rb#63 +class Prism::DesugarOperatorWriteNode + # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#66 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def arguments; end + + # Desugar `x += y` to `x = x + y` + # + # source://prism//lib/prism/desugar_compiler.rb#75 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#27 +class Prism::DesugarOrWriteDefinedNode + # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode + # + # source://prism//lib/prism/desugar_compiler.rb#30 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def arguments; end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#101 +class Prism::DesugarOrWriteNode + # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#104 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def arguments; end + + # Desugar `x ||= y` to `x || x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#113 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#102 + def write_class; end +end + +# The dispatcher class fires events for nodes that are found while walking an +# AST to all registered listeners. It's useful for performing different types +# of analysis on the AST while only having to walk the tree once. +# +# To use the dispatcher, you would first instantiate it and register listeners +# for the events you're interested in: +# +# class OctalListener +# def on_integer_node_enter(node) +# if node.octal? && !node.slice.start_with?("0o") +# warn("Octal integers should be written with the 0o prefix") +# end +# end +# end +# +# dispatcher = Dispatcher.new +# dispatcher.register(listener, :on_integer_node_enter) +# +# Then, you can walk any number of trees and dispatch events to the listeners: +# +# result = Prism.parse("001 + 002 + 003") +# dispatcher.dispatch(result.value) +# +# Optionally, you can also use `#dispatch_once` to dispatch enter and leave +# events for a single node without recursing further down the tree. This can +# be useful in circumstances where you want to reuse the listeners you already +# have registers but want to stop walking the tree at a certain point. +# +# integer = result.value.statements.body.first.receiver.receiver +# dispatcher.dispatch_once(integer) +# +# source://prism//lib/prism/dispatcher.rb#41 +class Prism::Dispatcher < ::Prism::Visitor + # Initialize a new dispatcher. + # + # @return [Dispatcher] a new instance of Dispatcher + # + # source://prism//lib/prism/dispatcher.rb#46 + def initialize; end + + # Walks `root` dispatching events to all registered listeners. + # + # def dispatch: (Node) -> void + # + # source://prism//lib/prism/visitor.rb#17 + def dispatch(node); end + + # Dispatches a single event for `node` to all registered listeners. + # + # def dispatch_once: (Node) -> void + # + # source://prism//lib/prism/dispatcher.rb#65 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # source://prism//lib/prism/dispatcher.rb#43 + def listeners; end + + # Register a listener for one or more events. + # + # def register: (Listener, *Symbol) -> void + # + # source://prism//lib/prism/dispatcher.rb#53 + def register(listener, *events); end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#71 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#79 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#87 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#95 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#103 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#111 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#119 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#127 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#135 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#143 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#151 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#159 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#167 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#175 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#183 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#191 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#199 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#207 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#215 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#223 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#231 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#239 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#247 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#255 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#263 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#271 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#279 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#287 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#295 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#303 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#311 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#319 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#327 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#335 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#343 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#351 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#359 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#367 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#375 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#383 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#391 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#399 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#407 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#415 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#423 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#431 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#439 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#447 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#455 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#463 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#471 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#479 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#487 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#495 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#503 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#511 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#519 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#527 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#535 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#543 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#551 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#559 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#567 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#575 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#583 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#591 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#599 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#607 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#615 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#623 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#631 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#639 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#647 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#655 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#663 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#671 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#679 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#687 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#695 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#703 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#711 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#719 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#727 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#735 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#743 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#751 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#759 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#767 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#775 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#783 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#791 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#799 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#807 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#815 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#823 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#831 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#839 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#847 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#855 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#863 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#871 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#879 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#887 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#895 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#903 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#911 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#919 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#927 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#935 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#943 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#951 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#959 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#967 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#975 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#983 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#991 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#999 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1007 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1015 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1023 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1031 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1039 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1047 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1055 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1063 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1071 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1079 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1087 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1095 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1103 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1111 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1119 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1127 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1135 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1143 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1151 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1159 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1167 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1175 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1183 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1191 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1199 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1207 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1215 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1223 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1231 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1239 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1247 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1255 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#1263 + def visit_yield_node(node); end +end + +# source://prism//lib/prism/dispatcher.rb#1269 +class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor + # @return [DispatchOnce] a new instance of DispatchOnce + # + # source://prism//lib/prism/dispatcher.rb#1272 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://prism//lib/prism/dispatcher.rb#1270 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1277 + def visit_alias_global_variable_node(node); end + + # Dispatch enter and leave events for AliasMethodNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1283 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1289 + def visit_alternation_pattern_node(node); end + + # Dispatch enter and leave events for AndNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1295 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1301 + def visit_arguments_node(node); end + + # Dispatch enter and leave events for ArrayNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1307 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1313 + def visit_array_pattern_node(node); end + + # Dispatch enter and leave events for AssocNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1319 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1325 + def visit_assoc_splat_node(node); end + + # Dispatch enter and leave events for BackReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1331 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1337 + def visit_begin_node(node); end + + # Dispatch enter and leave events for BlockArgumentNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1343 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1349 + def visit_block_local_variable_node(node); end + + # Dispatch enter and leave events for BlockNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1355 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1361 + def visit_block_parameter_node(node); end + + # Dispatch enter and leave events for BlockParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1367 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1373 + def visit_break_node(node); end + + # Dispatch enter and leave events for CallAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1379 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1385 + def visit_call_node(node); end + + # Dispatch enter and leave events for CallOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1391 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1397 + def visit_call_or_write_node(node); end + + # Dispatch enter and leave events for CallTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1403 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1409 + def visit_capture_pattern_node(node); end + + # Dispatch enter and leave events for CaseMatchNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1415 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1421 + def visit_case_node(node); end + + # Dispatch enter and leave events for ClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1427 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1433 + def visit_class_variable_and_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1439 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1445 + def visit_class_variable_or_write_node(node); end + + # Dispatch enter and leave events for ClassVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1451 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1457 + def visit_class_variable_target_node(node); end + + # Dispatch enter and leave events for ClassVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1463 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1469 + def visit_constant_and_write_node(node); end + + # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1475 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1481 + def visit_constant_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1487 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1493 + def visit_constant_path_node(node); end + + # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1499 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1505 + def visit_constant_path_or_write_node(node); end + + # Dispatch enter and leave events for ConstantPathTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1511 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1517 + def visit_constant_path_write_node(node); end + + # Dispatch enter and leave events for ConstantReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1523 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1529 + def visit_constant_target_node(node); end + + # Dispatch enter and leave events for ConstantWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1535 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1541 + def visit_def_node(node); end + + # Dispatch enter and leave events for DefinedNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1547 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1553 + def visit_else_node(node); end + + # Dispatch enter and leave events for EmbeddedStatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1559 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1565 + def visit_embedded_variable_node(node); end + + # Dispatch enter and leave events for EnsureNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1571 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1577 + def visit_false_node(node); end + + # Dispatch enter and leave events for FindPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1583 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1589 + def visit_flip_flop_node(node); end + + # Dispatch enter and leave events for FloatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1595 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1601 + def visit_for_node(node); end + + # Dispatch enter and leave events for ForwardingArgumentsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1607 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1613 + def visit_forwarding_parameter_node(node); end + + # Dispatch enter and leave events for ForwardingSuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1619 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1625 + def visit_global_variable_and_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1631 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1637 + def visit_global_variable_or_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1643 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1649 + def visit_global_variable_target_node(node); end + + # Dispatch enter and leave events for GlobalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1655 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1661 + def visit_hash_node(node); end + + # Dispatch enter and leave events for HashPatternNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1667 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1673 + def visit_if_node(node); end + + # Dispatch enter and leave events for ImaginaryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1679 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1685 + def visit_implicit_node(node); end + + # Dispatch enter and leave events for ImplicitRestNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1691 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1697 + def visit_in_node(node); end + + # Dispatch enter and leave events for IndexAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1703 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1709 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1715 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1721 + def visit_index_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1727 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1733 + def visit_instance_variable_operator_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1739 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1745 + def visit_instance_variable_read_node(node); end + + # Dispatch enter and leave events for InstanceVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1751 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1757 + def visit_instance_variable_write_node(node); end + + # Dispatch enter and leave events for IntegerNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1763 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1769 + def visit_interpolated_match_last_line_node(node); end + + # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1775 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1781 + def visit_interpolated_string_node(node); end + + # Dispatch enter and leave events for InterpolatedSymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1787 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1793 + def visit_interpolated_x_string_node(node); end + + # Dispatch enter and leave events for ItParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1799 + def visit_it_parameters_node(node); end + + # Dispatch enter and leave events for KeywordHashNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1805 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1811 + def visit_keyword_rest_parameter_node(node); end + + # Dispatch enter and leave events for LambdaNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1817 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1823 + def visit_local_variable_and_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1829 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1835 + def visit_local_variable_or_write_node(node); end + + # Dispatch enter and leave events for LocalVariableReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1841 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1847 + def visit_local_variable_target_node(node); end + + # Dispatch enter and leave events for LocalVariableWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1853 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1859 + def visit_match_last_line_node(node); end + + # Dispatch enter and leave events for MatchPredicateNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1865 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1871 + def visit_match_required_node(node); end + + # Dispatch enter and leave events for MatchWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1877 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1883 + def visit_missing_node(node); end + + # Dispatch enter and leave events for ModuleNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1889 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1895 + def visit_multi_target_node(node); end + + # Dispatch enter and leave events for MultiWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1901 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1907 + def visit_next_node(node); end + + # Dispatch enter and leave events for NilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1913 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1919 + def visit_no_keywords_parameter_node(node); end + + # Dispatch enter and leave events for NumberedParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1925 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1931 + def visit_numbered_reference_read_node(node); end + + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1937 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1943 + def visit_optional_parameter_node(node); end + + # Dispatch enter and leave events for OrNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1949 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1955 + def visit_parameters_node(node); end + + # Dispatch enter and leave events for ParenthesesNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1961 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1967 + def visit_pinned_expression_node(node); end + + # Dispatch enter and leave events for PinnedVariableNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1973 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1979 + def visit_post_execution_node(node); end + + # Dispatch enter and leave events for PreExecutionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1985 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1991 + def visit_program_node(node); end + + # Dispatch enter and leave events for RangeNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1997 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2003 + def visit_rational_node(node); end + + # Dispatch enter and leave events for RedoNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2009 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2015 + def visit_regular_expression_node(node); end + + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2021 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2027 + def visit_required_parameter_node(node); end + + # Dispatch enter and leave events for RescueModifierNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2033 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2039 + def visit_rescue_node(node); end + + # Dispatch enter and leave events for RestParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2045 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2051 + def visit_retry_node(node); end + + # Dispatch enter and leave events for ReturnNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2057 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2063 + def visit_self_node(node); end + + # Dispatch enter and leave events for ShareableConstantNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2069 + def visit_shareable_constant_node(node); end + + # Dispatch enter and leave events for SingletonClassNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2075 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2081 + def visit_source_encoding_node(node); end + + # Dispatch enter and leave events for SourceFileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2087 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2093 + def visit_source_line_node(node); end + + # Dispatch enter and leave events for SplatNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2099 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2105 + def visit_statements_node(node); end + + # Dispatch enter and leave events for StringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2111 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2117 + def visit_super_node(node); end + + # Dispatch enter and leave events for SymbolNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2123 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2129 + def visit_true_node(node); end + + # Dispatch enter and leave events for UndefNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2135 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2141 + def visit_unless_node(node); end + + # Dispatch enter and leave events for UntilNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2147 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2153 + def visit_when_node(node); end + + # Dispatch enter and leave events for WhileNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2159 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2165 + def visit_x_string_node(node); end + + # Dispatch enter and leave events for YieldNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2171 + def visit_yield_node(node); end +end + +# This visitor provides the ability to call Node#to_dot, which converts a +# subtree into a graphviz dot graph. +# +# source://prism//lib/prism/dot_visitor.rb#14 +class Prism::DotVisitor < ::Prism::Visitor + # Initialize a new dot visitor. + # + # @return [DotVisitor] a new instance of DotVisitor + # + # source://prism//lib/prism/dot_visitor.rb#106 + def initialize; end + + # The digraph that is being built. + # + # source://prism//lib/prism/dot_visitor.rb#103 + def digraph; end + + # Convert this visitor into a graphviz dot graph string. + # + # source://prism//lib/prism/dot_visitor.rb#111 + def to_dot; end + + # Visit a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#116 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node. + # + # source://prism//lib/prism/dot_visitor.rb#141 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#166 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node. + # + # source://prism//lib/prism/dot_visitor.rb#191 + def visit_and_node(node); end + + # Visit a ArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#216 + def visit_arguments_node(node); end + + # Visit a ArrayNode node. + # + # source://prism//lib/prism/dot_visitor.rb#246 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#286 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node. + # + # source://prism//lib/prism/dot_visitor.rb#348 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#375 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#398 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node. + # + # source://prism//lib/prism/dot_visitor.rb#415 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node. + # + # source://prism//lib/prism/dot_visitor.rb#463 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#486 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node. + # + # source://prism//lib/prism/dot_visitor.rb#506 + def visit_block_node(node); end + + # Visit a BlockParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#541 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#569 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node. + # + # source://prism//lib/prism/dot_visitor.rb#612 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#635 + def visit_call_and_write_node(node); end + + # Visit a CallNode node. + # + # source://prism//lib/prism/dot_visitor.rb#681 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#739 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#788 + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#834 + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#864 + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node. + # + # source://prism//lib/prism/dot_visitor.rb#889 + def visit_case_match_node(node); end + + # Visit a CaseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#934 + def visit_case_node(node); end + + # Visit a ClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#979 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1026 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1053 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1083 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1110 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1127 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1144 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1171 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1198 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1228 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1255 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1280 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1309 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1337 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1362 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1391 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1416 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1433 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1450 + def visit_constant_write_node(node); end + + # Visit a DefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1477 + def visit_def_node(node); end + + # Visit a DefinedNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1546 + def visit_defined_node(node); end + + # Visit a ElseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1577 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1605 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1631 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1652 + def visit_ensure_node(node); end + + # Visit a FalseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1678 + def visit_false_node(node); end + + # Visit a FindPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1692 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1743 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1775 + def visit_float_node(node); end + + # Visit a ForNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1792 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1834 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1848 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1862 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1882 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1909 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1939 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1966 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1983 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2000 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2027 + def visit_hash_node(node); end + + # Visit a HashPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2060 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2109 + def visit_if_node(node); end + + # Visit a ImaginaryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2154 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2172 + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2190 + def visit_implicit_rest_node(node); end + + # Visit a InNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2204 + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2236 + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2289 + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2345 + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2398 + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2437 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2464 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2494 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2521 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2538 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2555 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2582 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2602 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2638 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2674 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2714 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2751 + def visit_interpolated_x_string_node(node); end + + # Visit a ItParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2784 + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2798 + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2828 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2856 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2894 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2924 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2957 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2987 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3007 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3027 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3057 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3086 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3111 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3136 + def visit_match_write_node(node); end + + # Visit a MissingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3167 + def visit_missing_node(node); end + + # Visit a ModuleNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3181 + def visit_module_node(node); end + + # Visit a MultiTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3217 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3273 + def visit_multi_write_node(node); end + + # Visit a NextNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3336 + def visit_next_node(node); end + + # Visit a NilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3359 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3373 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3393 + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3410 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3427 + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3454 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3484 + def visit_or_node(node); end + + # Visit a ParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3509 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3593 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3619 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3646 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3667 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3696 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3725 + def visit_program_node(node); end + + # Visit a RangeNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3746 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3778 + def visit_rational_node(node); end + + # Visit a RedoNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3796 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3810 + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3839 + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3862 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3882 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3907 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3960 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3988 + def visit_retry_node(node); end + + # Visit a ReturnNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4002 + def visit_return_node(node); end + + # Visit a SelfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4028 + def visit_self_node(node); end + + # Visit a ShareableConstantNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4042 + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4063 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4099 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4113 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4133 + def visit_source_line_node(node); end + + # Visit a SplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4147 + def visit_splat_node(node); end + + # Visit a StatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4170 + def visit_statements_node(node); end + + # Visit a StringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4197 + def visit_string_node(node); end + + # Visit a SuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4230 + def visit_super_node(node); end + + # Visit a SymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4269 + def visit_symbol_node(node); end + + # Visit a TrueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4304 + def visit_true_node(node); end + + # Visit a UndefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4318 + def visit_undef_node(node); end + + # Visit a UnlessNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4348 + def visit_unless_node(node); end + + # Visit a UntilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4391 + def visit_until_node(node); end + + # Visit a WhenNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4426 + def visit_when_node(node); end + + # Visit a WhileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4467 + def visit_while_node(node); end + + # Visit a XStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4502 + def visit_x_string_node(node); end + + # Visit a YieldNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4531 + def visit_yield_node(node); end + + private + + # Inspect a node that has arguments_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4577 + def arguments_node_flags_inspect(node); end + + # Inspect a node that has array_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4586 + def array_node_flags_inspect(node); end + + # Inspect a node that has call_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4594 + def call_node_flags_inspect(node); end + + # Inspect a node that has encoding_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4605 + def encoding_flags_inspect(node); end + + # Inspect a node that has integer_base_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4614 + def integer_base_flags_inspect(node); end + + # Inspect a node that has interpolated_string_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4625 + def interpolated_string_node_flags_inspect(node); end + + # Inspect a node that has keyword_hash_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4634 + def keyword_hash_node_flags_inspect(node); end + + # Inspect a location to display the start and end line and column numbers. + # + # source://prism//lib/prism/dot_visitor.rb#4571 + def location_inspect(location); end + + # Inspect a node that has loop_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4642 + def loop_flags_inspect(node); end + + # Generate a unique node ID for a node throughout the digraph. + # + # source://prism//lib/prism/dot_visitor.rb#4566 + def node_id(node); end + + # Inspect a node that has parameter_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4650 + def parameter_flags_inspect(node); end + + # Inspect a node that has range_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4658 + def range_flags_inspect(node); end + + # Inspect a node that has regular_expression_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4666 + def regular_expression_flags_inspect(node); end + + # Inspect a node that has return_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4684 + def return_node_flags_inspect(node); end + + # Inspect a node that has shareable_constant_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4692 + def shareable_constant_node_flags_inspect(node); end + + # Inspect a node that has string_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4702 + def string_flags_inspect(node); end + + # Inspect a node that has symbol_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#4713 + def symbol_flags_inspect(node); end +end + +# source://prism//lib/prism/dot_visitor.rb#59 +class Prism::DotVisitor::Digraph + # @return [Digraph] a new instance of Digraph + # + # source://prism//lib/prism/dot_visitor.rb#62 + def initialize; end + + # source://prism//lib/prism/dot_visitor.rb#76 + def edge(value); end + + # Returns the value of attribute edges. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def edges; end + + # source://prism//lib/prism/dot_visitor.rb#68 + def node(value); end + + # Returns the value of attribute nodes. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def nodes; end + + # source://prism//lib/prism/dot_visitor.rb#80 + def to_dot; end + + # source://prism//lib/prism/dot_visitor.rb#72 + def waypoint(value); end + + # Returns the value of attribute waypoints. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def waypoints; end +end + +# source://prism//lib/prism/dot_visitor.rb#15 +class Prism::DotVisitor::Field + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/dot_visitor.rb#18 + def initialize(name, value, port); end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def name; end + + # Returns the value of attribute port. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def port; end + + # source://prism//lib/prism/dot_visitor.rb#24 + def to_dot; end + + # Returns the value of attribute value. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def value; end +end + +# source://prism//lib/prism/dot_visitor.rb#33 +class Prism::DotVisitor::Table + # @return [Table] a new instance of Table + # + # source://prism//lib/prism/dot_visitor.rb#36 + def initialize(name); end + + # source://prism//lib/prism/dot_visitor.rb#41 + def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end + + # Returns the value of attribute fields. + # + # source://prism//lib/prism/dot_visitor.rb#34 + def fields; end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#34 + def name; end + + # source://prism//lib/prism/dot_visitor.rb#45 + def to_dot; end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6235 +class Prism::ElseNode < ::Prism::Node + # def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void + # + # @return [ElseNode] a new instance of ElseNode + # + # source://prism//lib/prism/node.rb#6237 + sig do + params( + source: Prism::Source, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6349 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6247 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6252 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6264 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6257 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?, ?location: Location) -> ElseNode + # + # source://prism//lib/prism/node.rb#6269 + sig do + params( + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ElseNode) + end + def copy(else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6252 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#6277 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6305 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6282 + sig { returns(Prism::Location) } + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6310 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#6292 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6315 + sig { override.returns(String) } + def inspect; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6289 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6333 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6343 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# source://prism//lib/prism/parse_result.rb#403 +class Prism::EmbDocComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#410 + sig { returns(String) } + def inspect; end + + # This can only be true for inline comments. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#405 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#6361 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#6363 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, opening_loc, statements, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6469 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6373 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6378 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#6430 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#6418 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6390 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6383 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location, ?location: Location) -> EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#6395 + sig do + params( + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def copy(opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6378 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#6403 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6435 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#6425 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#6408 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6415 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6453 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6463 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6481 +class Prism::EmbeddedVariableNode < ::Prism::Node + # def initialize: (Location operator_loc, Prism::node variable, Location location) -> void + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#6483 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + variable: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, operator_loc, variable, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6574 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6492 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6497 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6507 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6502 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#6512 + sig do + params( + operator_loc: Prism::Location, + variable: Prism::Node, + location: Prism::Location + ).returns(Prism::EmbeddedVariableNode) + end + def copy(operator_loc: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6497 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#6520 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6540 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6535 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6525 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6558 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: Prism::node + # + # source://prism//lib/prism/node.rb#6532 + sig { returns(Prism::Node) } + def variable; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6568 + def type; end + end +end + +# Flags for nodes that have unescaped content. +# +# source://prism//lib/prism/node.rb#19232 +module Prism::EncodingFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19237 +Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19234 +Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://prism//lib/prism/node.rb#6589 +class Prism::EnsureNode < ::Prism::Node + # def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://prism//lib/prism/node.rb#6591 + sig do + params( + source: Prism::Source, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6697 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6601 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6606 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6618 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6611 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location, ?location: Location) -> EnsureNode + # + # source://prism//lib/prism/node.rb#6623 + sig do + params( + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::EnsureNode) + end + def copy(ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6606 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#6631 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6658 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6646 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6653 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6636 + sig { returns(Prism::Location) } + def ensure_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6663 + sig { override.returns(String) } + def inspect; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#6643 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6681 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6691 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6709 +class Prism::FalseNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [FalseNode] a new instance of FalseNode + # + # source://prism//lib/prism/node.rb#6711 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6785 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6718 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6723 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6733 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6728 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> FalseNode + # + # source://prism//lib/prism/node.rb#6738 + sig { params(location: Prism::Location).returns(Prism::FalseNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6723 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#6746 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6751 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6769 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6779 + def type; end + end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6800 +class Prism::FindPatternNode < ::Prism::Node + # def initialize: (Prism::node? constant, Prism::node left, Array[Prism::node] requireds, Prism::node right, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://prism//lib/prism/node.rb#6802 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + left: Prism::Node, + requireds: T::Array[Prism::Node], + right: Prism::Node, + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#6935 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6815 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6820 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#6896 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#6878 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6835 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6825 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: Prism::node? + # + # source://prism//lib/prism/node.rb#6853 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (?constant: Prism::node?, ?left: Prism::node, ?requireds: Array[Prism::node], ?right: Prism::node, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> FindPatternNode + # + # source://prism//lib/prism/node.rb#6840 + sig do + params( + constant: T.nilable(Prism::Node), + left: Prism::Node, + requireds: T::Array[Prism::Node], + right: Prism::Node, + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::FindPatternNode) + end + def copy(constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6820 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::node, opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#6848 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6901 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node + # + # source://prism//lib/prism/node.rb#6856 + sig { returns(Prism::Node) } + def left; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#6891 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#6865 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#6859 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader right: Prism::node + # + # source://prism//lib/prism/node.rb#6862 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6919 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6929 + def type; end + end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6951 +class Prism::FlipFlopNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://prism//lib/prism/node.rb#6953 + sig do + params( + source: Prism::Source, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7061 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6964 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6969 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6982 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6974 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> FlipFlopNode + # + # source://prism//lib/prism/node.rb#6987 + sig do + params( + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6969 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#6995 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#7017 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7027 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node? + # + # source://prism//lib/prism/node.rb#7004 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7022 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7010 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node? + # + # source://prism//lib/prism/node.rb#7007 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7045 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#7000 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7055 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://prism//lib/prism/node.rb#7074 +class Prism::FloatNode < ::Prism::Node + # def initialize: (Float value, Location location) -> void + # + # @return [FloatNode] a new instance of FloatNode + # + # source://prism//lib/prism/node.rb#7076 + sig { params(source: Prism::Source, value: Float, location: Prism::Location).void } + def initialize(source, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7154 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7084 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7089 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7099 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7094 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Float, ?location: Location) -> FloatNode + # + # source://prism//lib/prism/node.rb#7104 + sig { params(value: Float, location: Prism::Location).returns(Prism::FloatNode) } + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7089 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, location: Location } + # + # source://prism//lib/prism/node.rb#7112 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7120 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7138 + sig { override.returns(Symbol) } + def type; end + + # The value of the floating point number as a Float. + # + # source://prism//lib/prism/node.rb#7117 + sig { returns(Float) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7148 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7164 +class Prism::ForNode < ::Prism::Node + # def initialize: (Prism::node index, Prism::node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void + # + # @return [ForNode] a new instance of ForNode + # + # source://prism//lib/prism/node.rb#7166 + sig do + params( + source: Prism::Source, + index: Prism::Node, + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7314 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7180 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7185 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # attr_reader collection: Prism::node + # + # source://prism//lib/prism/node.rb#7220 + sig { returns(Prism::Node) } + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7199 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7190 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?index: Prism::node, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location, ?location: Location) -> ForNode + # + # source://prism//lib/prism/node.rb#7204 + sig do + params( + index: Prism::Node, + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ForNode) + end + def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7185 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { index: Prism::node, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#7212 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7270 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#7240 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7275 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#7253 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def for_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7260 + sig { returns(String) } + def for_keyword; end + + # attr_reader for_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#7226 + sig { returns(Prism::Location) } + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://prism//lib/prism/node.rb#7265 + sig { returns(String) } + def in_keyword; end + + # attr_reader in_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#7233 + sig { returns(Prism::Location) } + def in_keyword_loc; end + + # attr_reader index: Prism::node + # + # source://prism//lib/prism/node.rb#7217 + sig { returns(Prism::Node) } + def index; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7280 + sig { override.returns(String) } + def inspect; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#7223 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7298 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7308 + def type; end + end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7332 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#7334 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7408 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7341 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7346 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7356 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7351 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#7361 + sig { params(location: Prism::Location).returns(Prism::ForwardingArgumentsNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7346 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#7369 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7374 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7392 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7402 + def type; end + end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7418 +class Prism::ForwardingParameterNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#7420 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7494 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7427 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7442 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7437 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#7447 + sig { params(location: Prism::Location).returns(Prism::ForwardingParameterNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#7455 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7460 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7478 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7488 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://prism//lib/prism/node.rb#7503 +class Prism::ForwardingSuperNode < ::Prism::Node + # def initialize: (BlockNode? block, Location location) -> void + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#7505 + sig { params(source: Prism::Source, block: T.nilable(Prism::BlockNode), location: Prism::Location).void } + def initialize(source, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7585 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7513 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://prism//lib/prism/node.rb#7548 + sig { returns(T.nilable(Prism::BlockNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7518 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7530 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7523 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#7535 + sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).returns(Prism::ForwardingSuperNode) } + def copy(block: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7518 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } + # + # source://prism//lib/prism/node.rb#7543 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7551 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7569 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7579 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7595 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#7597 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7700 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7608 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7613 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7623 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7618 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#7628 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::GlobalVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7613 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#7636 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#163 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7666 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7641 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7644 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7661 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7651 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7684 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#7658 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7694 + def type; end + end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7713 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#7715 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7817 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7727 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#7780 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#7770 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7732 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7742 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7737 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#7747 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7732 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#7755 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#175 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7783 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7760 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7763 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#371 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#378 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7801 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#7777 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7811 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7831 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#7833 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#7936 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7844 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7859 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7854 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#7864 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::GlobalVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#7872 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#169 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7902 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7877 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#7880 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7897 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7887 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7920 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#7894 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7930 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#7949 +class Prism::GlobalVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#7951 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8033 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7959 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7964 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7974 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7969 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#7979 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7964 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#7987 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7999 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo # name `:$foo` + # + # $_Test # name `:$_Test` + # + # source://prism//lib/prism/node.rb#7996 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8017 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8027 + def type; end + end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#8043 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#8045 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8123 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8053 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8058 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8068 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8063 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#8073 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8058 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#8081 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8089 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8086 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8107 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8117 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8133 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#8135 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8254 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8146 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8161 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8156 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#8166 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#8174 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8220 + sig { override.returns(String) } + def inspect; end + + # The name of the global variable, which is a `$` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifier). Alternatively, it can be one of the special global variables designated by a symbol. + # + # $foo = :bar # name `:$foo` + # + # $_Test = 123 # name `:$_Test` + # + # source://prism//lib/prism/node.rb#8183 + sig { returns(Symbol) } + def name; end + + # The location of the global variable's name. + # + # $foo = :bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#8189 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8215 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # $foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#8208 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8238 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the global variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # $foo = :bar + # ^^^^ + # + # $-xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#8202 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8248 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8267 +class Prism::HashNode < ::Prism::Node + # def initialize: (Location opening_loc, Array[AssocNode | AssocSplatNode] elements, Location closing_loc, Location location) -> void + # + # @return [HashNode] a new instance of HashNode + # + # source://prism//lib/prism/node.rb#8269 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, opening_loc, elements, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8385 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8279 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8284 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8346 + sig { returns(String) } + def closing; end + + # The location of the closing brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#8334 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8294 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8289 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location, ?location: Location) -> HashNode + # + # source://prism//lib/prism/node.rb#8299 + sig do + params( + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::HashNode) + end + def copy(opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8284 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#8307 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. + # + # { a: b } + # ^^^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/node.rb#8328 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8351 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8341 + sig { returns(String) } + def opening; end + + # The location of the opening brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#8315 + sig { returns(Prism::Location) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8369 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8379 + def type; end + end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8401 +class Prism::HashPatternNode < ::Prism::Node + # def initialize: (Prism::node? constant, Array[AssocNode] elements, AssocSplatNode | NoKeywordsParameterNode | nil rest, Location? opening_loc, Location? closing_loc, Location location) -> void + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://prism//lib/prism/node.rb#8403 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8531 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8415 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8420 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#8492 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#8474 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8434 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8425 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: Prism::node? + # + # source://prism//lib/prism/node.rb#8452 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # def copy: (?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> HashPatternNode + # + # source://prism//lib/prism/node.rb#8439 + sig do + params( + constant: T.nilable(Prism::Node), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::HashPatternNode) + end + def copy(constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8420 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#8447 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader elements: Array[AssocNode] + # + # source://prism//lib/prism/node.rb#8455 + sig { returns(T::Array[Prism::AssocNode]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8497 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#8487 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#8461 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil + # + # source://prism//lib/prism/node.rb#8458 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } + def rest; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8515 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8525 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#46 +module Prism::HeredocQuery + # Returns true if this node was represented as a heredoc in the source code. + # + # @return [Boolean] + # + # source://prism//lib/prism/node_ext.rb#48 + def heredoc?; end +end + +# Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression. +# +# bar if foo +# ^^^^^^^^^^ +# +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# foo ? bar : baz +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8552 +class Prism::IfNode < ::Prism::Node + # def initialize: (Location? if_keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, Prism::node? consequent, Location? end_keyword_loc, Location location) -> void + # + # @return [IfNode] a new instance of IfNode + # + # source://prism//lib/prism/node.rb#8554 + sig do + params( + source: Prism::Source, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::Node), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8751 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8567 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8576 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8590 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8581 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. + # + # if foo + # bar + # elsif baz + # ^^^^^^^^^ + # qux + # ^^^ + # end + # ^^^ + # + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#8681 + sig { returns(T.nilable(Prism::Node)) } + def consequent; end + + # def copy: (?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: Prism::node?, ?end_keyword_loc: Location?, ?location: Location) -> IfNode + # + # source://prism//lib/prism/node.rb#8595 + sig do + params( + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::Node), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::IfNode) + end + def copy(if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8576 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Prism::node?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#8603 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#8712 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword if present, `nil` otherwise. + # + # if foo + # bar + # end + # ^^^ + # + # source://prism//lib/prism/node.rb#8689 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def if_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#8702 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # The location of the `if` keyword if present. + # + # bar if foo + # ^^ + # + # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. + # + # source://prism//lib/prism/node.rb#8613 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8717 + sig { override.returns(String) } + def inspect; end + + # The node for the condition the `IfNode` is testing. + # + # if foo + # ^^^ + # bar + # end + # + # bar if foo + # ^^^ + # + # foo ? bar : baz + # ^^^ + # + # source://prism//lib/prism/node.rb#8637 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#8571 + def set_newline_flag(newline_marked); end + + # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. + # + # if foo + # bar + # ^^^ + # baz + # ^^^ + # end + # + # source://prism//lib/prism/node.rb#8666 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#8707 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. + # + # if foo then bar end + # ^^^^ + # + # a ? b : c + # ^ + # + # source://prism//lib/prism/node.rb#8646 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8735 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8745 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://prism//lib/prism/node.rb#8766 +class Prism::ImaginaryNode < ::Prism::Node + # def initialize: (FloatNode | IntegerNode | RationalNode numeric, Location location) -> void + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://prism//lib/prism/node.rb#8768 + sig do + params( + source: Prism::Source, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), + location: Prism::Location + ).void + end + def initialize(source, numeric, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8846 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8776 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8781 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8791 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8786 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode + # + # source://prism//lib/prism/node.rb#8796 + sig do + params( + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), + location: Prism::Location + ).returns(Prism::ImaginaryNode) + end + def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8781 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, location: Location } + # + # source://prism//lib/prism/node.rb#8804 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8812 + sig { override.returns(String) } + def inspect; end + + # attr_reader numeric: FloatNode | IntegerNode | RationalNode + # + # source://prism//lib/prism/node.rb#8809 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } + def numeric; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8830 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://prism//lib/prism/node_ext.rb#98 + sig { returns(Complex) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8840 + def type; end + end +end + +# Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source. +# +# { foo: } +# ^^^^ +# +# { Foo: } +# ^^^^ +# +# foo in { bar: } +# ^^^^ +# +# source://prism//lib/prism/node.rb#8862 +class Prism::ImplicitNode < ::Prism::Node + # def initialize: (Prism::node value, Location location) -> void + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://prism//lib/prism/node.rb#8864 + sig { params(source: Prism::Source, value: Prism::Node, location: Prism::Location).void } + def initialize(source, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#8942 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8872 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8877 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8887 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8882 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode + # + # source://prism//lib/prism/node.rb#8892 + sig { params(value: Prism::Node, location: Prism::Location).returns(Prism::ImplicitNode) } + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8877 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#8900 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8908 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8926 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8905 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8936 + def type; end + end +end + +# Represents using a trailing comma to indicate an implicit rest parameter. +# +# foo { |bar,| } +# ^ +# +# foo in [bar,] +# ^ +# +# for foo, in bar do end +# ^ +# +# foo, = bar +# ^ +# +# source://prism//lib/prism/node.rb#8961 +class Prism::ImplicitRestNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ImplicitRestNode] a new instance of ImplicitRestNode + # + # source://prism//lib/prism/node.rb#8963 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9037 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8970 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8975 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8985 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#8980 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ImplicitRestNode + # + # source://prism//lib/prism/node.rb#8990 + sig { params(location: Prism::Location).returns(Prism::ImplicitRestNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8975 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#8998 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9003 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9021 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9031 + def type; end + end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9046 +class Prism::InNode < ::Prism::Node + # def initialize: (Prism::node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void + # + # @return [InNode] a new instance of InNode + # + # source://prism//lib/prism/node.rb#9048 + sig do + params( + source: Prism::Source, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, pattern, statements, in_loc, then_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9165 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9059 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9064 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9077 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9069 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?, ?location: Location) -> InNode + # + # source://prism//lib/prism/node.rb#9082 + sig do + params( + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InNode) + end + def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9064 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#9090 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def in: () -> String + # + # source://prism//lib/prism/node.rb#9121 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # source://prism//lib/prism/node.rb#9101 + sig { returns(Prism::Location) } + def in_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9131 + sig { override.returns(String) } + def inspect; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#9095 + sig { returns(Prism::Node) } + def pattern; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#9098 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then: () -> String? + # + # source://prism//lib/prism/node.rb#9126 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#9108 + sig { returns(T.nilable(Prism::Location)) } + def then_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9149 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9159 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call to the `[]` method. +# +# foo.bar[baz] &&= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9178 +class Prism::IndexAndWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#9180 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9358 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9196 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9261 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9294 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#9271 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9304 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9241 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9201 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9314 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9264 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9216 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9206 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#9221 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexAndWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9201 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#9229 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9299 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9324 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9309 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9254 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9319 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9274 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9238 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9284 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9342 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9281 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9289 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9234 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9352 + def type; end + end +end + +# Represents the use of an assignment operator on a call to `[]`. +# +# foo.bar[baz] += value +# ^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9376 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void + # + # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9378 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9555 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9395 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9460 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9496 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#9473 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#9476 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#9470 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9506 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9440 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9400 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9516 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9463 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9415 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9405 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#9420 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexOperatorWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), binary_operator: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9400 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#9428 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9501 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9521 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9511 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9453 + sig { returns(Prism::Location) } + def opening_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#387 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#394 + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9437 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9486 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9539 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9483 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9491 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9433 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9549 + def type; end + end +end + +# Represents the use of the `||=` operator on a call to `[]`. +# +# foo.bar[baz] ||= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9574 +class Prism::IndexOrWriteNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#9576 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9754 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9592 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9657 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9690 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#9667 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#9700 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#9637 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9597 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9710 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9660 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9612 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9602 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#9617 + sig do + params( + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexOrWriteNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9597 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#9625 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9695 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9720 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9705 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9650 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9715 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9670 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9634 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9680 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9738 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9677 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9685 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9630 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9748 + def type; end + end +end + +# Represents assigning to an index. +# +# foo[bar], = 1 +# ^^^^^^^^ +# +# begin +# rescue => foo[bar] +# ^^^^^^^^ +# end +# +# for foo[bar] in baz do end +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9780 +class Prism::IndexTargetNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location location) -> void + # + # @return [IndexTargetNode] a new instance of IndexTargetNode + # + # source://prism//lib/prism/node.rb#9782 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#9923 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9795 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9846 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9869 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#9856 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9800 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9884 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9849 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9814 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9805 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?location: Location) -> IndexTargetNode + # + # source://prism//lib/prism/node.rb#9819 + sig do + params( + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::IndexTargetNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9800 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#9827 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def ignore_visibility?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9874 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9889 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9879 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9839 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#9836 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9859 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9907 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9864 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9832 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9917 + def type; end + end +end + +# InlineComment objects are the most common. They correspond to comments in +# the source file like this one that start with #. +# +# source://prism//lib/prism/parse_result.rb#388 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#396 + sig { returns(String) } + def inspect; end + + # Returns true if this comment happens on the same line as other code and + # false if the comment is by itself. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#391 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# This visitor is responsible for composing the strings that get returned by +# the various #inspect methods defined on each of the nodes. +# +# source://prism//lib/prism/inspect_visitor.rb#12 +class Prism::InspectVisitor < ::Prism::Visitor + # Initializes a new instance of the InspectVisitor. + # + # @return [InspectVisitor] a new instance of InspectVisitor + # + # source://prism//lib/prism/inspect_visitor.rb#35 + sig { params(indent: String).void } + def initialize(indent = T.unsafe(nil)); end + + # The list of commands that we need to execute in order to compose the + # final string. + # + # source://prism//lib/prism/inspect_visitor.rb#32 + def commands; end + + # Compose the final string. + # + # source://prism//lib/prism/inspect_visitor.rb#48 + sig { returns(String) } + def compose; end + + # The current prefix string. + # + # source://prism//lib/prism/inspect_visitor.rb#28 + def indent; end + + # Inspect a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#77 + def visit_alias_global_variable_node(node); end + + # Inspect a AliasMethodNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#87 + def visit_alias_method_node(node); end + + # Inspect a AlternationPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#97 + def visit_alternation_pattern_node(node); end + + # Inspect a AndNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#107 + def visit_and_node(node); end + + # Inspect a ArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#117 + def visit_arguments_node(node); end + + # Inspect a ArrayNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#133 + def visit_array_node(node); end + + # Inspect a ArrayPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#151 + def visit_array_pattern_node(node); end + + # Inspect a AssocNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#188 + def visit_assoc_node(node); end + + # Inspect a AssocSplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#198 + def visit_assoc_splat_node(node); end + + # Inspect a BackReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#210 + def visit_back_reference_read_node(node); end + + # Inspect a BeginNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#216 + def visit_begin_node(node); end + + # Inspect a BlockArgumentNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#247 + def visit_block_argument_node(node); end + + # Inspect a BlockLocalVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#259 + def visit_block_local_variable_node(node); end + + # Inspect a BlockNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#267 + def visit_block_node(node); end + + # Inspect a BlockParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#287 + def visit_block_parameter_node(node); end + + # Inspect a BlockParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#301 + def visit_block_parameters_node(node); end + + # Inspect a BreakNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#323 + def visit_break_node(node); end + + # Inspect a CallAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#335 + def visit_call_and_write_node(node); end + + # Inspect a CallNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#355 + def visit_call_node(node); end + + # Inspect a CallOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#385 + def visit_call_operator_write_node(node); end + + # Inspect a CallOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#406 + def visit_call_or_write_node(node); end + + # Inspect a CallTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#426 + def visit_call_target_node(node); end + + # Inspect a CapturePatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#438 + def visit_capture_pattern_node(node); end + + # Inspect a CaseMatchNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#448 + def visit_case_match_node(node); end + + # Inspect a CaseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#476 + def visit_case_node(node); end + + # Inspect a ClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#504 + def visit_class_node(node); end + + # Inspect a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#528 + def visit_class_variable_and_write_node(node); end + + # Inspect a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#538 + def visit_class_variable_operator_write_node(node); end + + # Inspect a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#549 + def visit_class_variable_or_write_node(node); end + + # Inspect a ClassVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#559 + def visit_class_variable_read_node(node); end + + # Inspect a ClassVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#565 + def visit_class_variable_target_node(node); end + + # Inspect a ClassVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#571 + def visit_class_variable_write_node(node); end + + # Inspect a ConstantAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#581 + def visit_constant_and_write_node(node); end + + # Inspect a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#591 + def visit_constant_operator_write_node(node); end + + # Inspect a ConstantOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#602 + def visit_constant_or_write_node(node); end + + # Inspect a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#612 + def visit_constant_path_and_write_node(node); end + + # Inspect a ConstantPathNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#622 + def visit_constant_path_node(node); end + + # Inspect a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#640 + def visit_constant_path_operator_write_node(node); end + + # Inspect a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#651 + def visit_constant_path_or_write_node(node); end + + # Inspect a ConstantPathTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#661 + def visit_constant_path_target_node(node); end + + # Inspect a ConstantPathWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#679 + def visit_constant_path_write_node(node); end + + # Inspect a ConstantReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#689 + def visit_constant_read_node(node); end + + # Inspect a ConstantTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#695 + def visit_constant_target_node(node); end + + # Inspect a ConstantWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#701 + def visit_constant_write_node(node); end + + # Inspect a DefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#711 + def visit_def_node(node); end + + # Inspect a DefinedNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#743 + def visit_defined_node(node); end + + # Inspect a ElseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#753 + def visit_else_node(node); end + + # Inspect a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#766 + def visit_embedded_statements_node(node); end + + # Inspect a EmbeddedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#779 + def visit_embedded_variable_node(node); end + + # Inspect a EnsureNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#787 + def visit_ensure_node(node); end + + # Inspect a FalseNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#800 + def visit_false_node(node); end + + # Inspect a FindPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#805 + def visit_find_pattern_node(node); end + + # Inspect a FlipFlopNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#831 + def visit_flip_flop_node(node); end + + # Inspect a FloatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#851 + def visit_float_node(node); end + + # Inspect a ForNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#857 + def visit_for_node(node); end + + # Inspect a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#876 + def visit_forwarding_arguments_node(node); end + + # Inspect a ForwardingParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#881 + def visit_forwarding_parameter_node(node); end + + # Inspect a ForwardingSuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#886 + def visit_forwarding_super_node(node); end + + # Inspect a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#897 + def visit_global_variable_and_write_node(node); end + + # Inspect a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#907 + def visit_global_variable_operator_write_node(node); end + + # Inspect a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#918 + def visit_global_variable_or_write_node(node); end + + # Inspect a GlobalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#928 + def visit_global_variable_read_node(node); end + + # Inspect a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#934 + def visit_global_variable_target_node(node); end + + # Inspect a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#940 + def visit_global_variable_write_node(node); end + + # Inspect a HashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#950 + def visit_hash_node(node); end + + # Inspect a HashPatternNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#966 + def visit_hash_pattern_node(node); end + + # Inspect a IfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#994 + def visit_if_node(node); end + + # Inspect a ImaginaryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1016 + def visit_imaginary_node(node); end + + # Inspect a ImplicitNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1023 + def visit_implicit_node(node); end + + # Inspect a ImplicitRestNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1030 + def visit_implicit_rest_node(node); end + + # Inspect a InNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1035 + def visit_in_node(node); end + + # Inspect a IndexAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1050 + def visit_index_and_write_node(node); end + + # Inspect a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1081 + def visit_index_operator_write_node(node); end + + # Inspect a IndexOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1113 + def visit_index_or_write_node(node); end + + # Inspect a IndexTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1144 + def visit_index_target_node(node); end + + # Inspect a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1167 + def visit_instance_variable_and_write_node(node); end + + # Inspect a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1177 + def visit_instance_variable_operator_write_node(node); end + + # Inspect a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1188 + def visit_instance_variable_or_write_node(node); end + + # Inspect a InstanceVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1198 + def visit_instance_variable_read_node(node); end + + # Inspect a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1204 + def visit_instance_variable_target_node(node); end + + # Inspect a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1210 + def visit_instance_variable_write_node(node); end + + # Inspect a IntegerNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1220 + def visit_integer_node(node); end + + # Inspect a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1228 + def visit_interpolated_match_last_line_node(node); end + + # Inspect a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1246 + def visit_interpolated_regular_expression_node(node); end + + # Inspect a InterpolatedStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1264 + def visit_interpolated_string_node(node); end + + # Inspect a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1282 + def visit_interpolated_symbol_node(node); end + + # Inspect a InterpolatedXStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1298 + def visit_interpolated_x_string_node(node); end + + # Inspect a ItParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1314 + def visit_it_parameters_node(node); end + + # Inspect a KeywordHashNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1319 + def visit_keyword_hash_node(node); end + + # Inspect a KeywordRestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1335 + def visit_keyword_rest_parameter_node(node); end + + # Inspect a LambdaNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1349 + def visit_lambda_node(node); end + + # Inspect a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1370 + def visit_local_variable_and_write_node(node); end + + # Inspect a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1381 + def visit_local_variable_operator_write_node(node); end + + # Inspect a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1393 + def visit_local_variable_or_write_node(node); end + + # Inspect a LocalVariableReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1404 + def visit_local_variable_read_node(node); end + + # Inspect a LocalVariableTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1411 + def visit_local_variable_target_node(node); end + + # Inspect a LocalVariableWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1418 + def visit_local_variable_write_node(node); end + + # Inspect a MatchLastLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1429 + def visit_match_last_line_node(node); end + + # Inspect a MatchPredicateNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1440 + def visit_match_predicate_node(node); end + + # Inspect a MatchRequiredNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1450 + def visit_match_required_node(node); end + + # Inspect a MatchWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1460 + def visit_match_write_node(node); end + + # Inspect a MissingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1476 + def visit_missing_node(node); end + + # Inspect a ModuleNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1481 + def visit_module_node(node); end + + # Inspect a MultiTargetNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1498 + def visit_multi_target_node(node); end + + # Inspect a MultiWriteNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1529 + def visit_multi_write_node(node); end + + # Inspect a NextNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1563 + def visit_next_node(node); end + + # Inspect a NilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1575 + def visit_nil_node(node); end + + # Inspect a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1580 + def visit_no_keywords_parameter_node(node); end + + # Inspect a NumberedParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1587 + def visit_numbered_parameters_node(node); end + + # Inspect a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1593 + def visit_numbered_reference_read_node(node); end + + # Inspect a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1599 + def visit_optional_keyword_parameter_node(node); end + + # Inspect a OptionalParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1610 + def visit_optional_parameter_node(node); end + + # Inspect a OrNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1622 + def visit_or_node(node); end + + # Inspect a ParametersNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1632 + def visit_parameters_node(node); end + + # Inspect a ParenthesesNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1691 + def visit_parentheses_node(node); end + + # Inspect a PinnedExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1704 + def visit_pinned_expression_node(node); end + + # Inspect a PinnedVariableNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1714 + def visit_pinned_variable_node(node); end + + # Inspect a PostExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1722 + def visit_post_execution_node(node); end + + # Inspect a PreExecutionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1736 + def visit_pre_execution_node(node); end + + # Inspect a ProgramNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1750 + def visit_program_node(node); end + + # Inspect a RangeNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1758 + def visit_range_node(node); end + + # Inspect a RationalNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1778 + def visit_rational_node(node); end + + # Inspect a RedoNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1785 + def visit_redo_node(node); end + + # Inspect a RegularExpressionNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1790 + def visit_regular_expression_node(node); end + + # Inspect a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1801 + def visit_required_keyword_parameter_node(node); end + + # Inspect a RequiredParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1810 + def visit_required_parameter_node(node); end + + # Inspect a RescueModifierNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1818 + def visit_rescue_modifier_node(node); end + + # Inspect a RescueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1828 + def visit_rescue_node(node); end + + # Inspect a RestParameterNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1862 + def visit_rest_parameter_node(node); end + + # Inspect a RetryNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1876 + def visit_retry_node(node); end + + # Inspect a ReturnNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1881 + def visit_return_node(node); end + + # Inspect a SelfNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1895 + def visit_self_node(node); end + + # Inspect a ShareableConstantNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1900 + def visit_shareable_constant_node(node); end + + # Inspect a SingletonClassNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1909 + def visit_singleton_class_node(node); end + + # Inspect a SourceEncodingNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1926 + def visit_source_encoding_node(node); end + + # Inspect a SourceFileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1931 + def visit_source_file_node(node); end + + # Inspect a SourceLineNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1939 + def visit_source_line_node(node); end + + # Inspect a SplatNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1944 + def visit_splat_node(node); end + + # Inspect a StatementsNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1956 + def visit_statements_node(node); end + + # Inspect a StringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1970 + def visit_string_node(node); end + + # Inspect a SuperNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#1981 + def visit_super_node(node); end + + # Inspect a SymbolNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2001 + def visit_symbol_node(node); end + + # Inspect a TrueNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2012 + def visit_true_node(node); end + + # Inspect a UndefNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2017 + def visit_undef_node(node); end + + # Inspect a UnlessNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2032 + def visit_unless_node(node); end + + # Inspect a UntilNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2054 + def visit_until_node(node); end + + # Inspect a WhenNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2071 + def visit_when_node(node); end + + # Inspect a WhileNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2093 + def visit_while_node(node); end + + # Inspect a XStringNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2110 + def visit_x_string_node(node); end + + # Inspect a YieldNode node. + # + # source://prism//lib/prism/inspect_visitor.rb#2121 + def visit_yield_node(node); end + + private + + # Compose a string representing the given inner location field. + # + # source://prism//lib/prism/inspect_visitor.rb#2148 + def inspect_location(location); end + + # Compose a header for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#2137 + def inspect_node(name, node); end + + class << self + # Compose an inspect string for the given node. + # + # source://prism//lib/prism/inspect_visitor.rb#41 + sig { params(node: Prism::Node).returns(String) } + def compose(node); end + end +end + +# Most of the time, we can simply pass down the indent to the next node. +# However, when we are inside a list we want some extra special formatting +# when we hit an element in that list. In this case, we have a special +# command that replaces the subsequent indent with the given value. +# +# source://prism//lib/prism/inspect_visitor.rb#17 +class Prism::InspectVisitor::Replace + # @return [Replace] a new instance of Replace + # + # source://prism//lib/prism/inspect_visitor.rb#20 + def initialize(value); end + + # source://prism//lib/prism/inspect_visitor.rb#18 + def value; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9938 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#9940 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10043 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9951 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9956 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9966 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#9961 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#9971 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::InstanceVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9956 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#9979 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#181 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10009 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#9984 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#9987 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10004 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9994 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10027 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10001 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10037 + def type; end + end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10056 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10058 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10160 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10070 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#10123 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#10113 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10075 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10085 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10080 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10090 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol, + location: Prism::Location + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10075 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#10098 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#193 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10126 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10103 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10106 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#403 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#410 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10144 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10120 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10154 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10174 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10176 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10279 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10187 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10202 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10197 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10207 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::InstanceVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#10215 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#187 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10245 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10220 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10223 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10240 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10230 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10263 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10237 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10273 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#10292 +class Prism::InstanceVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10294 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10376 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10302 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10307 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10317 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10312 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#10322 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10307 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#10330 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10342 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x # name `:@x` + # + # @_test # name `:@_test` + # + # source://prism//lib/prism/node.rb#10339 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10360 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10370 + def type; end + end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#10386 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Location location) -> void + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10388 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } + def initialize(source, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10466 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10396 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10401 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10411 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10406 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#10416 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10401 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#10424 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10432 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10429 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10450 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10460 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10476 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#10478 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10597 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10489 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10494 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10504 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10499 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#10509 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10494 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#10517 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10563 + sig { override.returns(String) } + def inspect; end + + # The name of the instance variable, which is a `@` followed by an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # @x = :y # name `:@x` + # + # @_foo = "bar" # name `@_foo` + # + # source://prism//lib/prism/node.rb#10526 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @_x = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#10532 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10558 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @x = y + # ^ + # + # source://prism//lib/prism/node.rb#10551 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10581 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the instance variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @foo = :bar + # ^^^^ + # + # @_x = 1234 + # ^^^^ + # + # source://prism//lib/prism/node.rb#10545 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10591 + def type; end + end +end + +# Flags for integer nodes that correspond to the base of the integer. +# +# source://prism//lib/prism/node.rb#19241 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://prism//lib/prism/node.rb#19243 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://prism//lib/prism/node.rb#19246 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://prism//lib/prism/node.rb#19252 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://prism//lib/prism/node.rb#19249 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://prism//lib/prism/node.rb#10610 +class Prism::IntegerNode < ::Prism::Node + # def initialize: (Integer flags, Integer value, Location location) -> void + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://prism//lib/prism/node.rb#10612 + sig { params(source: Prism::Source, flags: Integer, value: Integer, location: Prism::Location).void } + def initialize(source, flags, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10715 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10621 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10661 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10626 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10636 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10631 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode + # + # source://prism//lib/prism/node.rb#10641 + sig { params(flags: Integer, value: Integer, location: Prism::Location).returns(Prism::IntegerNode) } + def copy(flags: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def decimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10666 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10626 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#10649 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def hexadecimal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10676 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10681 + sig { override.returns(String) } + def inspect; end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10671 + sig { returns(T::Boolean) } + def octal?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10699 + sig { override.returns(Symbol) } + def type; end + + # The value of the integer literal as a number. + # + # source://prism//lib/prism/node.rb#10658 + sig { returns(Integer) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10654 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10709 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo #{bar} baz/ then end +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10726 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # + # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#10728 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#10897 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10739 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10823 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10749 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10858 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10791 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10759 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10754 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedMatchLastLineNode + # + # source://prism//lib/prism/node.rb#10764 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10749 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#10772 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10818 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10803 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10843 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10848 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10838 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10798 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10863 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10808 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10813 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10853 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10781 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#10788 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # source://prism//lib/prism/node.rb#10743 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10881 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10833 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10828 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10777 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10891 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10911 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # + # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#10913 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11082 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10924 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11008 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10934 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11043 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10976 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10944 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#10939 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedRegularExpressionNode + # + # source://prism//lib/prism/node.rb#10949 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10934 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#10957 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11003 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10988 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11028 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11033 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11023 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10983 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11048 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10993 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10998 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11038 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10966 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#10973 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # source://prism//lib/prism/node.rb#10928 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11066 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11018 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11013 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10962 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11076 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11096 +class Prism::InterpolatedStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Integer flags, Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] parts, Location? closing_loc, Location location) -> void + # + # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#11098 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11234 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11109 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11119 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#11195 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#11167 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11129 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11124 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedStringNode + # + # source://prism//lib/prism/node.rb#11134 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InterpolatedStringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11119 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#11142 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11180 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11200 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11185 + sig { returns(T::Boolean) } + def mutable?; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#11190 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#11151 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] + # + # source://prism//lib/prism/node.rb#11164 + sig do + returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) + end + def parts; end + + # source://prism//lib/prism/node.rb#11113 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11218 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11147 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11228 + def type; end + end +end + +# Flags for interpolated string nodes that indicated mutability if they are also marked as literals. +# +# source://prism//lib/prism/node.rb#19256 +module Prism::InterpolatedStringNodeFlags; end + +# source://prism//lib/prism/node.rb#19258 +Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#19261 +Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal that contains interpolation. +# +# :"foo #{bar} baz" +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11248 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # def initialize: (Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location? closing_loc, Location location) -> void + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#11250 + sig do + params( + source: Prism::Source, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11371 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11260 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11270 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#11332 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#11314 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11280 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11275 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#11285 + sig do + params( + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InterpolatedSymbolNode) + end + def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11270 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#11293 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11337 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#11327 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#11298 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11311 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # source://prism//lib/prism/node.rb#11264 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11355 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11365 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11384 +class Prism::InterpolatedXStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # + # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#11386 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, opening_loc, parts, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11495 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11396 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11406 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11456 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11444 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11416 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11411 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#11421 + sig do + params( + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11406 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#11429 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11461 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11451 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11434 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11441 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # source://prism//lib/prism/node.rb#11400 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11479 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11489 + def type; end + end +end + +# Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda. +# +# -> { it + it } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11508 +class Prism::ItParametersNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ItParametersNode] a new instance of ItParametersNode + # + # source://prism//lib/prism/node.rb#11510 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11584 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11517 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11522 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11532 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11527 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ItParametersNode + # + # source://prism//lib/prism/node.rb#11537 + sig { params(location: Prism::Location).returns(Prism::ItParametersNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11522 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#11545 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11550 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11568 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11578 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://prism//lib/prism/node.rb#11593 +class Prism::KeywordHashNode < ::Prism::Node + # def initialize: (Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://prism//lib/prism/node.rb#11595 + sig do + params( + source: Prism::Source, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + location: Prism::Location + ).void + end + def initialize(source, flags, elements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11683 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11604 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11609 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11619 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11614 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode + # + # source://prism//lib/prism/node.rb#11624 + sig do + params( + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + location: Prism::Location + ).returns(Prism::KeywordHashNode) + end + def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11609 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location } + # + # source://prism//lib/prism/node.rb#11632 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader elements: Array[AssocNode | AssocSplatNode] + # + # source://prism//lib/prism/node.rb#11641 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11649 + sig { override.returns(String) } + def inspect; end + + # def symbol_keys?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11644 + sig { returns(T::Boolean) } + def symbol_keys?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11667 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11637 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11677 + def type; end + end +end + +# Flags for keyword hash nodes. +# +# source://prism//lib/prism/node.rb#19265 +module Prism::KeywordHashNodeFlags; end + +# a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments +# +# source://prism//lib/prism/node.rb#19267 +Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) + +# Represents a keyword rest parameter to a method, block, or lambda definition. +# +# def a(**b) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#11696 +class Prism::KeywordRestParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#11698 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11813 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11709 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11724 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11719 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#11729 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::KeywordRestParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#11737 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11779 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#11746 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#11749 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11774 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11762 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11769 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11797 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11742 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11807 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11826 +class Prism::LambdaNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Prism::node? parameters, Prism::node? body, Location location) -> void + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://prism//lib/prism/node.rb#11828 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#11956 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11841 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#11904 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11846 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11917 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11894 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11859 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11851 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: Prism::node?, ?body: Prism::node?, ?location: Location) -> LambdaNode + # + # source://prism//lib/prism/node.rb#11864 + sig do + params( + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::LambdaNode) + end + def copy(locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11846 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#11872 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11922 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#11877 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11912 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11887 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11907 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11880 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader parameters: Prism::node? + # + # source://prism//lib/prism/node.rb#11901 + sig { returns(T.nilable(Prism::Node)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11940 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11950 + def type; end + end +end + +# This class is responsible for lexing the source using prism and then +# converting those tokens to be compatible with Ripper. In the vast majority +# of cases, this is a one-to-one mapping of the token type. Everything else +# generally lines up. However, there are a few cases that require special +# handling. +# +# source://prism//lib/prism/lex_compat.rb#12 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://prism//lib/prism/lex_compat.rb#619 + def initialize(source, **options); end + + # Returns the value of attribute options. + # + # source://prism//lib/prism/lex_compat.rb#617 + def options; end + + # source://prism//lib/prism/lex_compat.rb#624 + def result; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/lex_compat.rb#617 + def source; end +end + +# Ripper doesn't include the rest of the token in the event, so we need to +# trim it down to just the content on the first line when comparing. +# +# source://prism//lib/prism/lex_compat.rb#230 +class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#231 + def ==(other); end +end + +# A heredoc in this case is a list of tokens that belong to the body of the +# heredoc that should be appended onto the list of tokens when the heredoc +# closes. +# +# source://prism//lib/prism/lex_compat.rb#291 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # source://prism//lib/prism/lex_compat.rb#603 + def build(opening); end + end +end + +# Dash heredocs are a little more complicated. They are a list of tokens +# that need to be split on "\\\n" to mimic Ripper's behavior. We also need +# to keep track of the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#315 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://prism//lib/prism/lex_compat.rb#318 + def initialize(split); end + + # source://prism//lib/prism/lex_compat.rb#323 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#316 + def split; end + + # source://prism//lib/prism/lex_compat.rb#327 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#316 + def tokens; end +end + +# Heredocs that are dedenting heredocs are a little more complicated. +# Ripper outputs on_ignored_sp tokens for the whitespace that is being +# removed from the output. prism only modifies the node itself and keeps +# the token the same. This simplifies prism, but makes comparing against +# Ripper much harder because there is a length mismatch. +# +# Fortunately, we already have to pull out the heredoc tokens in order to +# insert them into the stream in the correct order. As such, we can do +# some extra manipulation on the tokens to make them match Ripper's +# output by mirroring the dedent logic that Ripper uses. +# +# source://prism//lib/prism/lex_compat.rb#374 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://prism//lib/prism/lex_compat.rb#379 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # source://prism//lib/prism/lex_compat.rb#390 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://prism//lib/prism/lex_compat.rb#377 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://prism//lib/prism/lex_compat.rb#377 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://prism//lib/prism/lex_compat.rb#377 + def embexpr_balance; end + + # source://prism//lib/prism/lex_compat.rb#427 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#377 + def tokens; end +end + +# source://prism//lib/prism/lex_compat.rb#375 +Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# Heredocs that are no dash or tilde heredocs are just a list of tokens. +# We need to keep them around so that we can insert them in the correct +# order back into the token stream and set the state of the last token to +# the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#296 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://prism//lib/prism/lex_compat.rb#299 + def initialize; end + + # source://prism//lib/prism/lex_compat.rb#303 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#307 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#297 + def tokens; end +end + +# Ident tokens for the most part are exactly the same, except sometimes we +# know an ident is a local when ripper doesn't (when they are introduced +# through named captures in regular expressions). In that case we don't +# compare the state. +# +# source://prism//lib/prism/lex_compat.rb#248 +class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#249 + def ==(other); end +end + +# Tokens where state should be ignored +# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# +# source://prism//lib/prism/lex_compat.rb#238 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#239 + def ==(other); end +end + +# Ignored newlines can occasionally have a LABEL state attached to them, so +# we compare the state differently here. +# +# source://prism//lib/prism/lex_compat.rb#259 +class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#260 + def ==(other); end +end + +# If we have an identifier that follows a method name like: +# +# def foo bar +# +# then Ripper will mark bar as END|LABEL if there is a local in a parent +# scope named bar because it hasn't pushed the local table yet. We do this +# more accurately, so we need to allow comparing against both END and +# END|LABEL. +# +# source://prism//lib/prism/lex_compat.rb#279 +class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#280 + def ==(other); end +end + +# This is a mapping of prism token types to Ripper token types. This is a +# many-to-one mapping because we split up our token types, whereas Ripper +# tends to group them. +# +# source://prism//lib/prism/lex_compat.rb#33 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# A result class specialized for holding tokens produced by the lexer. +# +# source://prism//lib/prism/lex_compat.rb#14 +class Prism::LexCompat::Result < ::Prism::Result + # Create a new lex compat result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/lex_compat.rb#19 + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/lex_compat.rb#25 + def deconstruct_keys(keys); end + + # The list of tokens that were produced by the lexer. + # + # source://prism//lib/prism/lex_compat.rb#16 + def value; end +end + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# source://prism//lib/prism/lex_compat.rb#204 +class Prism::LexCompat::Token < ::SimpleDelegator + # The type of the token. + # + # source://prism//lib/prism/lex_compat.rb#213 + def event; end + + # The location of the token in the source. + # + # source://prism//lib/prism/lex_compat.rb#208 + def location; end + + # The state of the lexer when this token was produced. + # + # source://prism//lib/prism/lex_compat.rb#223 + def state; end + + # The slice of the source that this token represents. + # + # source://prism//lib/prism/lex_compat.rb#218 + def value; end +end + +# This is a result specific to the `lex` and `lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#593 +class Prism::LexResult < ::Prism::Result + # Create a new lex result object with the given values. + # + # @return [LexResult] a new instance of LexResult + # + # source://prism//lib/prism/parse_result.rb#598 + sig do + params( + value: T::Array[T.untyped], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for LexResult. + # + # source://prism//lib/prism/parse_result.rb#604 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The list of tokens that were parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#595 + sig { returns(T::Array[T.untyped]) } + def value; end +end + +# This is a class that wraps the Ripper lexer to produce almost exactly the +# same tokens. +# +# source://prism//lib/prism/lex_compat.rb#872 +class Prism::LexRipper + # @return [LexRipper] a new instance of LexRipper + # + # source://prism//lib/prism/lex_compat.rb#875 + def initialize(source); end + + # source://prism//lib/prism/lex_compat.rb#879 + def result; end + + # source://prism//lib/prism/lex_compat.rb#873 + def source; end + + private + + # source://prism//lib/prism/lex_compat.rb#913 + def lex(source); end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11972 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#11974 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(source, name_loc, operator_loc, value, name, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12081 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11986 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11991 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12001 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#11996 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#12006 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableAndWriteNode) + end + def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11991 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12014 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12039 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#199 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12047 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12036 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12019 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12042 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12026 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12065 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12033 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12075 + def type; end + end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12095 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location binary_operator_loc, Prism::node value, Symbol name, Symbol binary_operator, Integer depth, Location location) -> void + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#12097 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(source, name_loc, binary_operator_loc, value, name, binary_operator, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12203 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12110 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#12163 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#12150 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12115 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12125 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12120 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#12130 + sig do + params( + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def copy(name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12115 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12138 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12166 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#211 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12169 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12160 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12143 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#419 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#426 + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12187 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12157 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12197 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12218 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#12220 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).void + end + def initialize(source, name_loc, operator_loc, value, name, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12327 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12232 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12237 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12247 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12242 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#12252 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableOrWriteNode) + end + def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12237 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12260 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12285 + sig { returns(Integer) } + def depth; end + + # source://prism//lib/prism/desugar_compiler.rb#205 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12293 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12282 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12265 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12288 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12272 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12311 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12279 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12321 + def type; end + end +end + +# Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call. +# +# foo +# ^^^ +# +# source://prism//lib/prism/node.rb#12341 +class Prism::LocalVariableReadNode < ::Prism::Node + # def initialize: (Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#12343 + sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } + def initialize(source, name, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12443 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12352 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12357 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12367 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12362 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#12372 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableReadNode) } + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12357 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12380 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of visible scopes that should be searched to find the origin of this local variable. + # + # foo = 1; foo # depth 0 + # + # bar = 2; tap { bar } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#12406 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12409 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # x # name `:x` + # + # _Test # name `:_Test` + # + # Note that this can also be an underscore followed by a number for the default block parameters. + # + # _1 # name `:_1` + # + # Finally, for the default `it` block parameter, the name is `0it`. This is to distinguish it from an `it` local variable that is explicitly declared. + # + # it # name `:0it` + # + # source://prism//lib/prism/node.rb#12397 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12427 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12437 + def type; end + end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#12454 +class Prism::LocalVariableTargetNode < ::Prism::Node + # def initialize: (Symbol name, Integer depth, Location location) -> void + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#12456 + sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } + def initialize(source, name, depth, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12538 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12465 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12470 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12480 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12475 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#12485 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableTargetNode) } + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12470 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12493 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#12501 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12504 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12498 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12522 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12532 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#12549 +class Prism::LocalVariableWriteNode < ::Prism::Node + # def initialize: (Symbol name, Integer depth, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#12551 + sig do + params( + source: Prism::Source, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, name, depth, name_loc, value, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12684 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12563 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12568 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12578 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12573 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#12583 + sig do + params( + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12568 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#12591 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of semantic scopes we have to traverse to find the declaration of this variable. + # + # foo = 1 # depth 0 + # + # tap { foo = 1 } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#12609 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12650 + sig { override.returns(String) } + def inspect; end + + # The name of the local variable, which is an [identifier](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#identifiers). + # + # foo = :bar # name `:foo` + # + # abc = 123 # name `:abc` + # + # source://prism//lib/prism/node.rb#12600 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # foo = :bar + # ^^^ + # + # source://prism//lib/prism/node.rb#12615 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12645 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # x = :y + # ^ + # + # source://prism//lib/prism/node.rb#12638 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12668 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the local variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo = :bar + # ^^^^ + # + # abc = 1234 + # ^^^^ + # + # Note that since the name of a local variable is known before the value is parsed, it is valid for a local variable to appear within the value of its own write. + # + # foo = foo + # + # source://prism//lib/prism/node.rb#12632 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12678 + def type; end + end +end + +# This represents a location in the source. +# +# source://prism//lib/prism/parse_result.rb#156 +class Prism::Location + # Create a new location object with the given source, start byte offset, and + # byte length. + # + # @return [Location] a new instance of Location + # + # source://prism//lib/prism/parse_result.rb#171 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } + def initialize(source, start_offset, length); end + + # Returns true if the given other location is equal to this location. + # + # source://prism//lib/prism/parse_result.rb#335 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Join this location with the first occurrence of the string in the source + # that occurs after this location on the same line, and return the new + # location. This will raise an error if the string does not exist. + # + # source://prism//lib/prism/parse_result.rb#354 + sig { params(string: String).returns(Prism::Location) } + def adjoin(string); end + + # Returns a new location that is the result of chopping off the last byte. + # + # source://prism//lib/prism/parse_result.rb#217 + sig { returns(Prism::Location) } + def chop; end + + # Returns all comments that are associated with this location (both leading + # and trailing comments). + # + # source://prism//lib/prism/parse_result.rb#207 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # Create a new location object with the given options. + # + # source://prism//lib/prism/parse_result.rb#212 + sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } + def copy(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end + + # Implement the hash pattern matching interface for Location. + # + # source://prism//lib/prism/parse_result.rb#325 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#314 + sig { returns(Integer) } + def end_character_column; end + + # The character offset from the beginning of the source where this location + # ends. + # + # source://prism//lib/prism/parse_result.rb#263 + sig { returns(Integer) } + def end_character_offset; end + + # The column number in code units of the given encoding where this location + # ends from the start of the line. + # + # source://prism//lib/prism/parse_result.rb#320 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_column(encoding = T.unsafe(nil)); end + + # The offset from the start of the file in code units of the given encoding. + # + # source://prism//lib/prism/parse_result.rb#268 + sig { params(encoding: Encoding).returns(Integer) } + def end_code_units_offset(encoding = T.unsafe(nil)); end + + # The column number in bytes where this location ends from the start of the + # line. + # + # source://prism//lib/prism/parse_result.rb#308 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # source://prism//lib/prism/parse_result.rb#284 + sig { returns(Integer) } + def end_line; end + + # The byte offset from the beginning of the source where this location ends. + # + # source://prism//lib/prism/parse_result.rb#257 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # source://prism//lib/prism/parse_result.rb#222 + sig { returns(String) } + def inspect; end + + # Returns a new location that stretches from this location to the given + # other location. Raises an error if this location is not before the other + # location or if they don't share the same source. + # + # source://prism//lib/prism/parse_result.rb#344 + sig { params(other: Prism::Location).returns(Prism::Location) } + def join(other); end + + # Attach a comment to the leading comments of this location. + # + # source://prism//lib/prism/parse_result.rb#190 + sig { params(comment: Prism::Comment).void } + def leading_comment(comment); end + + # These are the comments that are associated with this location that exist + # before the start of this location. + # + # source://prism//lib/prism/parse_result.rb#185 + sig { returns(T::Array[Prism::Comment]) } + def leading_comments; end + + # The length of this location in bytes. + # + # source://prism//lib/prism/parse_result.rb#167 + sig { returns(Integer) } + def length; end + + # Implement the pretty print interface for Location. + # + # source://prism//lib/prism/parse_result.rb#330 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The source code that this location represents. + # + # source://prism//lib/prism/parse_result.rb#232 + sig { returns(String) } + def slice; end + + # The source code that this location represents starting from the beginning + # of the line that this location starts on to the end of the line that this + # location ends on. + # + # source://prism//lib/prism/parse_result.rb#239 + def slice_lines; end + + # Returns all of the lines of the source code associated with this location. + # + # source://prism//lib/prism/parse_result.rb#227 + sig { returns(T::Array[String]) } + def source_lines; end + + # The column number in characters where this location ends from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#296 + sig { returns(Integer) } + def start_character_column; end + + # The character offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#247 + sig { returns(Integer) } + def start_character_offset; end + + # The column number in code units of the given encoding where this location + # starts from the start of the line. + # + # source://prism//lib/prism/parse_result.rb#302 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_column(encoding = T.unsafe(nil)); end + + # The offset from the start of the file in code units of the given encoding. + # + # source://prism//lib/prism/parse_result.rb#252 + sig { params(encoding: Encoding).returns(Integer) } + def start_code_units_offset(encoding = T.unsafe(nil)); end + + # The column number in bytes where this location starts from the start of + # the line. + # + # source://prism//lib/prism/parse_result.rb#290 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # source://prism//lib/prism/parse_result.rb#273 + sig { returns(Integer) } + def start_line; end + + # The content of the line where this location starts before this location. + # + # source://prism//lib/prism/parse_result.rb#278 + sig { returns(String) } + def start_line_slice; end + + # The byte offset from the beginning of the source where this location + # starts. + # + # source://prism//lib/prism/parse_result.rb#164 + sig { returns(Integer) } + def start_offset; end + + # Attach a comment to the trailing comments of this location. + # + # source://prism//lib/prism/parse_result.rb#201 + sig { params(comment: Prism::Comment).void } + def trailing_comment(comment); end + + # These are the comments that are associated with this location that exist + # after the end of this location. + # + # source://prism//lib/prism/parse_result.rb#196 + sig { returns(T::Array[Prism::Comment]) } + def trailing_comments; end + + protected + + # A Source object that is used to determine more information from the given + # offset and length. + # + # source://prism//lib/prism/parse_result.rb#159 + sig { returns(Prism::Source) } + def source; end +end + +# Flags for while and until loop nodes. +# +# source://prism//lib/prism/node.rb#19271 +module Prism::LoopFlags; end + +# a loop after a begin statement, so the body is executed first before the condition +# +# source://prism//lib/prism/node.rb#19273 +Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) + +# This represents a magic comment that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#416 +class Prism::MagicComment + # Create a new magic comment object with the given key and value locations. + # + # @return [MagicComment] a new instance of MagicComment + # + # source://prism//lib/prism/parse_result.rb#424 + sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } + def initialize(key_loc, value_loc); end + + # Implement the hash pattern matching interface for MagicComment. + # + # source://prism//lib/prism/parse_result.rb#440 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this magic comment. + # + # source://prism//lib/prism/parse_result.rb#445 + sig { returns(String) } + def inspect; end + + # Returns the key of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#430 + sig { returns(String) } + def key; end + + # A Location object representing the location of the key in the source. + # + # source://prism//lib/prism/parse_result.rb#418 + sig { returns(Prism::Location) } + def key_loc; end + + # Returns the value of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#435 + sig { returns(String) } + def value; end + + # A Location object representing the location of the value in the source. + # + # source://prism//lib/prism/parse_result.rb#421 + sig { returns(Prism::Location) } + def value_loc; end +end + +# Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo/i then end +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#12698 +class Prism::MatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://prism//lib/prism/node.rb#12700 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12877 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12712 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12798 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12717 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12838 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12763 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12727 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12722 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#12833 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#12756 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> MatchLastLineNode + # + # source://prism//lib/prism/node.rb#12732 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::MatchLastLineNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12717 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#12740 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12793 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12778 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12818 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12823 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12813 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12773 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12843 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12783 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12788 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12828 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12749 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + 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://prism//lib/prism/node.rb#12861 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#12770 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12808 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12803 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#12745 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12871 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12891 +class Prism::MatchPredicateNode < ::Prism::Node + # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://prism//lib/prism/node.rb#12893 + sig do + params( + source: Prism::Source, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, value, pattern, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#12988 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12903 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12908 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12918 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12913 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchPredicateNode + # + # source://prism//lib/prism/node.rb#12923 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12908 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#12931 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#12954 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12949 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12942 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#12939 + sig { returns(Prism::Node) } + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12972 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12936 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12982 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13000 +class Prism::MatchRequiredNode < ::Prism::Node + # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://prism//lib/prism/node.rb#13002 + sig do + params( + source: Prism::Source, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, value, pattern, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13097 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13012 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13017 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13027 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13022 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchRequiredNode + # + # source://prism//lib/prism/node.rb#13032 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13017 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#13040 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13063 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13058 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13051 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#13048 + sig { returns(Prism::Node) } + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13081 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#13045 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13091 + def type; end + end +end + +# Represents writing local variables using a regular expression match with named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13109 +class Prism::MatchWriteNode < ::Prism::Node + # def initialize: (CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://prism//lib/prism/node.rb#13111 + sig do + params( + source: Prism::Source, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode], + location: Prism::Location + ).void + end + def initialize(source, call, targets, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13193 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13120 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://prism//lib/prism/node.rb#13153 + sig { returns(Prism::CallNode) } + def call; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13125 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13135 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13130 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode + # + # source://prism//lib/prism/node.rb#13140 + sig do + params( + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode], + location: Prism::Location + ).returns(Prism::MatchWriteNode) + end + def copy(call: T.unsafe(nil), targets: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13125 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], location: Location } + # + # source://prism//lib/prism/node.rb#13148 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13159 + sig { override.returns(String) } + def inspect; end + + # attr_reader targets: Array[LocalVariableTargetNode] + # + # source://prism//lib/prism/node.rb#13156 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } + def targets; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13177 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13187 + def type; end + end +end + +# Represents a node that is missing from the source and results in a syntax error. +# +# source://prism//lib/prism/node.rb#13202 +class Prism::MissingNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [MissingNode] a new instance of MissingNode + # + # source://prism//lib/prism/node.rb#13204 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13278 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13211 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13216 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13226 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13221 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> MissingNode + # + # source://prism//lib/prism/node.rb#13231 + sig { params(location: Prism::Location).returns(Prism::MissingNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13216 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#13239 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13244 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13262 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13272 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13287 +class Prism::ModuleNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Prism::node constant_path, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://prism//lib/prism/node.rb#13289 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end + def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13408 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13302 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#13351 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13307 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13320 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13312 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: Prism::node + # + # source://prism//lib/prism/node.rb#13348 + sig { returns(Prism::Node) } + def constant_path; end + + # def copy: (?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ModuleNode + # + # source://prism//lib/prism/node.rb#13325 + sig do + params( + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).returns(Prism::ModuleNode) + end + def copy(locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13307 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#13333 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#13369 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13354 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13374 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#13338 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def module_keyword: () -> String + # + # source://prism//lib/prism/node.rb#13364 + sig { returns(String) } + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13341 + sig { returns(Prism::Location) } + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#13361 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13392 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13402 + def type; end + end +end + +# Represents a multi-target expression. +# +# a, (b, c) = 1, 2, 3 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13424 +class Prism::MultiTargetNode < ::Prism::Node + # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://prism//lib/prism/node.rb#13426 + sig do + params( + source: Prism::Source, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13554 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13438 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13443 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13457 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13448 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?location: Location) -> MultiTargetNode + # + # source://prism//lib/prism/node.rb#13462 + sig do + params( + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::MultiTargetNode) + end + def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13443 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#13470 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13520 + sig { override.returns(String) } + def inspect; end + + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] + # + # source://prism//lib/prism/node.rb#13475 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#13510 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13484 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#13478 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] + # + # source://prism//lib/prism/node.rb#13481 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#13515 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13497 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13538 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13548 + def type; end + end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13570 +class Prism::MultiWriteNode < ::Prism::Node + # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://prism//lib/prism/node.rb#13572 + sig do + params( + source: Prism::Source, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13718 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13586 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13591 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13606 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13596 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> MultiWriteNode + # + # source://prism//lib/prism/node.rb#13611 + sig do + params( + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::MultiWriteNode) + end + def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13591 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#13619 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13684 + sig { override.returns(String) } + def inspect; end + + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#13624 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#13669 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13633 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13679 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13659 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#13627 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#13630 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#13674 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#13646 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13702 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#13666 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13712 + def type; end + end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# source://prism//lib/prism/mutation_compiler.rb#13 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#15 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # source://prism//lib/prism/mutation_compiler.rb#20 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#25 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # source://prism//lib/prism/mutation_compiler.rb#30 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#35 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # source://prism//lib/prism/mutation_compiler.rb#40 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#45 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # source://prism//lib/prism/mutation_compiler.rb#50 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#55 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#60 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # source://prism//lib/prism/mutation_compiler.rb#65 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # source://prism//lib/prism/mutation_compiler.rb#70 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#75 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # source://prism//lib/prism/mutation_compiler.rb#80 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#85 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#90 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # source://prism//lib/prism/mutation_compiler.rb#95 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#100 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # source://prism//lib/prism/mutation_compiler.rb#105 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#110 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#115 + def visit_call_or_write_node(node); end + + # Copy a CallTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#120 + def visit_call_target_node(node); end + + # Copy a CapturePatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#125 + def visit_capture_pattern_node(node); end + + # Copy a CaseMatchNode node + # + # source://prism//lib/prism/mutation_compiler.rb#130 + def visit_case_match_node(node); end + + # Copy a CaseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#135 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#140 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#145 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#150 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#155 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#160 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#165 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#170 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#175 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#180 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#185 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#190 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://prism//lib/prism/mutation_compiler.rb#195 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#200 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#205 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#210 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#215 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#220 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#225 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#230 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#235 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://prism//lib/prism/mutation_compiler.rb#240 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#245 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#250 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#255 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://prism//lib/prism/mutation_compiler.rb#260 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#265 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#270 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://prism//lib/prism/mutation_compiler.rb#275 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#280 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://prism//lib/prism/mutation_compiler.rb#285 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#290 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#295 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#300 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#305 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#310 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#315 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#320 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#325 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#330 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#335 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#340 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#345 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#350 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://prism//lib/prism/mutation_compiler.rb#355 + def visit_implicit_node(node); end + + # Copy a ImplicitRestNode node + # + # source://prism//lib/prism/mutation_compiler.rb#360 + def visit_implicit_rest_node(node); end + + # Copy a InNode node + # + # source://prism//lib/prism/mutation_compiler.rb#365 + def visit_in_node(node); end + + # Copy a IndexAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#370 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#375 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#380 + def visit_index_or_write_node(node); end + + # Copy a IndexTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#385 + def visit_index_target_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#390 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#395 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#400 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#405 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#410 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#415 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://prism//lib/prism/mutation_compiler.rb#420 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#425 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#430 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#435 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#440 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#445 + def visit_interpolated_x_string_node(node); end + + # Copy a ItParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#450 + def visit_it_parameters_node(node); end + + # Copy a KeywordHashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#455 + def visit_keyword_hash_node(node); end + + # Copy a KeywordRestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#460 + def visit_keyword_rest_parameter_node(node); end + + # Copy a LambdaNode node + # + # source://prism//lib/prism/mutation_compiler.rb#465 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#470 + def visit_local_variable_and_write_node(node); end + + # Copy a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#475 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#480 + def visit_local_variable_or_write_node(node); end + + # Copy a LocalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#485 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#490 + def visit_local_variable_target_node(node); end + + # Copy a LocalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#495 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#500 + def visit_match_last_line_node(node); end + + # Copy a MatchPredicateNode node + # + # source://prism//lib/prism/mutation_compiler.rb#505 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # source://prism//lib/prism/mutation_compiler.rb#510 + def visit_match_required_node(node); end + + # Copy a MatchWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#515 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#520 + def visit_missing_node(node); end + + # Copy a ModuleNode node + # + # source://prism//lib/prism/mutation_compiler.rb#525 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#530 + def visit_multi_target_node(node); end + + # Copy a MultiWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#535 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # source://prism//lib/prism/mutation_compiler.rb#540 + def visit_next_node(node); end + + # Copy a NilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#545 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#550 + def visit_no_keywords_parameter_node(node); end + + # Copy a NumberedParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#555 + def visit_numbered_parameters_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#560 + def visit_numbered_reference_read_node(node); end + + # Copy a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#565 + def visit_optional_keyword_parameter_node(node); end + + # Copy a OptionalParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#570 + def visit_optional_parameter_node(node); end + + # Copy a OrNode node + # + # source://prism//lib/prism/mutation_compiler.rb#575 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#580 + def visit_parameters_node(node); end + + # Copy a ParenthesesNode node + # + # source://prism//lib/prism/mutation_compiler.rb#585 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#590 + def visit_pinned_expression_node(node); end + + # Copy a PinnedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#595 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#600 + def visit_post_execution_node(node); end + + # Copy a PreExecutionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#605 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # source://prism//lib/prism/mutation_compiler.rb#610 + def visit_program_node(node); end + + # Copy a RangeNode node + # + # source://prism//lib/prism/mutation_compiler.rb#615 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # source://prism//lib/prism/mutation_compiler.rb#620 + def visit_rational_node(node); end + + # Copy a RedoNode node + # + # source://prism//lib/prism/mutation_compiler.rb#625 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#630 + def visit_regular_expression_node(node); end + + # Copy a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#635 + def visit_required_keyword_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#640 + def visit_required_parameter_node(node); end + + # Copy a RescueModifierNode node + # + # source://prism//lib/prism/mutation_compiler.rb#645 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#650 + def visit_rescue_node(node); end + + # Copy a RestParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#655 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#660 + def visit_retry_node(node); end + + # Copy a ReturnNode node + # + # source://prism//lib/prism/mutation_compiler.rb#665 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#670 + def visit_self_node(node); end + + # Copy a ShareableConstantNode node + # + # source://prism//lib/prism/mutation_compiler.rb#675 + def visit_shareable_constant_node(node); end + + # Copy a SingletonClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#680 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # source://prism//lib/prism/mutation_compiler.rb#685 + def visit_source_encoding_node(node); end + + # Copy a SourceFileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#690 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#695 + def visit_source_line_node(node); end + + # Copy a SplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#700 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#705 + def visit_statements_node(node); end + + # Copy a StringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#710 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#715 + def visit_super_node(node); end + + # Copy a SymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#720 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # source://prism//lib/prism/mutation_compiler.rb#725 + def visit_true_node(node); end + + # Copy a UndefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#730 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # source://prism//lib/prism/mutation_compiler.rb#735 + def visit_unless_node(node); end + + # Copy a UntilNode node + # + # source://prism//lib/prism/mutation_compiler.rb#740 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # source://prism//lib/prism/mutation_compiler.rb#745 + def visit_when_node(node); end + + # Copy a WhileNode node + # + # source://prism//lib/prism/mutation_compiler.rb#750 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#755 + def visit_x_string_node(node); end + + # Copy a YieldNode node + # + # source://prism//lib/prism/mutation_compiler.rb#760 + def visit_yield_node(node); end +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13736 +class Prism::NextNode < ::Prism::Node + # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # + # @return [NextNode] a new instance of NextNode + # + # source://prism//lib/prism/node.rb#13738 + sig do + params( + source: Prism::Source, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, arguments, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13831 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13747 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#13782 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13752 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13764 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13757 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode + # + # source://prism//lib/prism/node.rb#13769 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::NextNode) + end + def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13752 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#13777 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13797 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13792 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13785 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13815 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13825 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://prism//lib/prism/node.rb#13842 +class Prism::NilNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [NilNode] a new instance of NilNode + # + # source://prism//lib/prism/node.rb#13844 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#13918 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13851 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13856 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13866 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13861 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> NilNode + # + # source://prism//lib/prism/node.rb#13871 + sig { params(location: Prism::Location).returns(Prism::NilNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13856 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#13879 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13884 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13902 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13912 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#13928 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#13930 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, operator_loc, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14030 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13939 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13944 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13954 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#13949 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#13959 + sig do + params( + operator_loc: Prism::Location, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def copy(operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13944 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#13967 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13996 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13991 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13979 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13986 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13972 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14014 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14024 + def type; end + end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# source://prism//lib/prism/node.rb#12 +class Prism::Node + abstract! + + # Accepts a visitor and calls back into the specialized visit function. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#143 + sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#149 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # Returns an array of child nodes and locations that could potentially have + # comments attached to them. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#163 + sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # Returns an array of child nodes, excluding any `nil`s in the place of + # optional nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#157 + sig { abstract.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Returns an array of child nodes, including `nil`s in the place of optional + # nodes that were not present. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#149 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # source://prism//lib/prism/node_ext.rb#7 + def deprecated(*replacements); end + + # The end offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#34 + sig { returns(Integer) } + def end_offset; end + + sig { abstract.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns a string representation of the node. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#174 + sig { abstract.returns(String) } + def inspect; end + + # A Location instance that represents the location of this node in the + # source. + # + # source://prism//lib/prism/node.rb#19 + sig { returns(Prism::Location) } + def location; end + + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#39 + def newline?; end + + # Similar to inspect, but respects the current level of indentation given by + # the pretty print object. + # + # source://prism//lib/prism/node.rb#74 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # Returns all of the lines of the source code associated with this node. + # An alias for source_lines, used to mimic the API from + # RubyVM::AbstractSyntaxTree to make it easier to migrate. + # + # source://prism//lib/prism/node.rb#52 + sig { returns(T::Array[String]) } + def script_lines; end + + # source://prism//lib/prism/node.rb#43 + def set_newline_flag(newline_marked); end + + # Slice the location of the node from the source. + # + # source://prism//lib/prism/node.rb#61 + sig { returns(String) } + def slice; end + + # Slice the location of the node from the source, starting at the beginning + # of the line that the location starts on, ending at the end of the line + # that the location ends on. + # + # source://prism//lib/prism/node.rb#68 + sig { returns(String) } + def slice_lines; end + + # Returns all of the lines of the source code associated with this node. + # + # source://prism//lib/prism/node.rb#52 + sig { returns(T::Array[String]) } + def source_lines; end + + # The start offset of the node in the source. This method is effectively a + # delegate method to the location object. + # + # source://prism//lib/prism/node.rb#27 + sig { returns(Integer) } + def start_offset; end + + # Convert this node into a graphviz dot graph string. + # + # source://prism//lib/prism/node.rb#82 + sig { returns(String) } + def to_dot; end + + # Returns a list of nodes that are descendants of this node that contain the + # given line and column. This is useful for locating a node that is selected + # based on the line and column of the source code. + # + # Important to note is that the column given to this method should be in + # bytes, as opposed to characters or code units. + # + # source://prism//lib/prism/node.rb#93 + sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } + def tunnel(line, column); end + + # Returns a symbol symbolizing the type of node that this represents. This + # is particularly useful for case statements and array comparisons. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#169 + sig { abstract.returns(Symbol) } + def type; end + + private + + # A pointer to the source that this node was created from. + # + # source://prism//lib/prism/node.rb#14 + sig { returns(Prism::Source) } + def source; end + + class << self + # Returns a list of the fields that exist for this node class. Fields + # describe the structure of the node. This kind of reflection is useful for + # things like recursively visiting each node _and_ field in the tree. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#127 + def fields; end + + # Returns the type of the node as a symbol. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#179 + def type; end + end +end + +# Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. +# +# -> { _1 + _2 } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14041 +class Prism::NumberedParametersNode < ::Prism::Node + # def initialize: (Integer maximum, Location location) -> void + # + # @return [NumberedParametersNode] a new instance of NumberedParametersNode + # + # source://prism//lib/prism/node.rb#14043 + sig { params(source: Prism::Source, maximum: Integer, location: Prism::Location).void } + def initialize(source, maximum, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14121 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14051 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14056 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14066 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14061 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode + # + # source://prism//lib/prism/node.rb#14071 + sig { params(maximum: Integer, location: Prism::Location).returns(Prism::NumberedParametersNode) } + def copy(maximum: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14056 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14079 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14087 + sig { override.returns(String) } + def inspect; end + + # attr_reader maximum: Integer + # + # source://prism//lib/prism/node.rb#14084 + sig { returns(Integer) } + def maximum; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14105 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14115 + def type; end + end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://prism//lib/prism/node.rb#14131 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # def initialize: (Integer number, Location location) -> void + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#14133 + sig { params(source: Prism::Source, number: Integer, location: Prism::Location).void } + def initialize(source, number, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14217 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14141 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14146 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14156 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14151 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#14161 + sig { params(number: Integer, location: Prism::Location).returns(Prism::NumberedReferenceReadNode) } + def copy(number: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14146 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14169 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14183 + sig { override.returns(String) } + def inspect; end + + # The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being `0`. + # + # $1 # number `1` + # + # $5432 # number `5432` + # + # $4294967296 # number `0` + # + # source://prism//lib/prism/node.rb#14180 + sig { returns(Integer) } + def number; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14201 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14211 + def type; end + end +end + +# Represents an optional keyword parameter to a method, block, or lambda definition. +# +# def a(b: 1) +# ^^^^ +# end +# +# source://prism//lib/prism/node.rb#14228 +class Prism::OptionalKeywordParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location name_loc, Prism::node value, Location location) -> void + # + # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#14230 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14330 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14241 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14246 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14256 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14251 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#14261 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::OptionalKeywordParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14246 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#14269 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14296 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14278 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#14281 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14291 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14314 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#14288 + sig { returns(Prism::Node) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#14274 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14324 + def type; end + end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#14344 +class Prism::OptionalParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://prism//lib/prism/node.rb#14346 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, operator_loc, value, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14459 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14358 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14363 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14373 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14368 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalParameterNode + # + # source://prism//lib/prism/node.rb#14378 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::OptionalParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14363 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#14386 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14425 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14395 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#14398 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14420 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14405 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14415 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14443 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#14412 + sig { returns(Prism::Node) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#14391 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14453 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14473 +class Prism::OrNode < ::Prism::Node + # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # + # @return [OrNode] a new instance of OrNode + # + # source://prism//lib/prism/node.rb#14475 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14585 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14485 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14490 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14500 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14495 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> OrNode + # + # source://prism//lib/prism/node.rb#14505 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::OrNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14490 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14513 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14551 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left or right + # ^^^^ + # + # 1 || 2 + # ^ + # + # source://prism//lib/prism/node.rb#14524 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14546 + sig { returns(String) } + def operator; end + + # The location of the `or` keyword or the `||` operator. + # + # left or right + # ^^ + # + # source://prism//lib/prism/node.rb#14539 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left || right + # ^^^^^ + # + # 1 or 2 + # ^ + # + # source://prism//lib/prism/node.rb#14533 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14569 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14579 + def type; end + end +end + +# A parser for the pack template language. +# +# source://prism//lib/prism/pack.rb#6 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# A directive in the pack template language. +# +# source://prism//lib/prism/pack.rb#60 +class Prism::Pack::Directive + # Initialize a new directive with the given values. + # + # @return [Directive] a new instance of Directive + # + # source://prism//lib/prism/pack.rb#89 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # Provide a human-readable description of the directive. + # + # source://prism//lib/prism/pack.rb#131 + def describe; end + + # The type of endianness of the directive. + # + # source://prism//lib/prism/pack.rb#77 + def endian; end + + # The length of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#86 + def length; end + + # The length type of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#83 + def length_type; end + + # The type of signedness of the directive. + # + # source://prism//lib/prism/pack.rb#74 + def signed; end + + # The size of the directive. + # + # source://prism//lib/prism/pack.rb#80 + def size; end + + # A byteslice of the source string that this directive represents. + # + # source://prism//lib/prism/pack.rb#68 + def source; end + + # The type of the directive. + # + # source://prism//lib/prism/pack.rb#71 + def type; end + + # A symbol representing whether or not we are packing or unpacking. + # + # source://prism//lib/prism/pack.rb#65 + def variant; end + + # A symbol representing the version of Ruby. + # + # source://prism//lib/prism/pack.rb#62 + def version; end +end + +# The descriptions of the various types of endianness. +# +# source://prism//lib/prism/pack.rb#102 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of signedness. +# +# source://prism//lib/prism/pack.rb#111 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of sizes. +# +# source://prism//lib/prism/pack.rb#118 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# The result of parsing a pack template. +# +# source://prism//lib/prism/pack.rb#198 +class Prism::Pack::Format + # Create a new Format with the given directives and encoding. + # + # @return [Format] a new instance of Format + # + # source://prism//lib/prism/pack.rb#206 + def initialize(directives, encoding); end + + # Provide a human-readable description of the format. + # + # source://prism//lib/prism/pack.rb#212 + def describe; end + + # A list of the directives in the template. + # + # source://prism//lib/prism/pack.rb#200 + def directives; end + + # The encoding of the template. + # + # source://prism//lib/prism/pack.rb#203 + def encoding; end +end + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Flags for parameter nodes. +# +# source://prism//lib/prism/node.rb#19277 +module Prism::ParameterFlags; end + +# a parameter name that has been repeated in the method signature +# +# source://prism//lib/prism/node.rb#19279 +Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) + +# Represents the list of parameters on a method, block, or lambda definition. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#14598 +class Prism::ParametersNode < ::Prism::Node + # def initialize: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, Location location) -> void + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://prism//lib/prism/node.rb#14600 + sig do + params( + source: Prism::Source, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode), + location: Prism::Location + ).void + end + def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14710 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14614 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://prism//lib/prism/node.rb#14673 + sig { returns(T.nilable(Prism::BlockParameterNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14619 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14637 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14624 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?, ?location: Location) -> ParametersNode + # + # source://prism//lib/prism/node.rb#14642 + sig do + params( + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode), + location: Prism::Location + ).returns(Prism::ParametersNode) + end + def copy(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), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14619 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode?, location: Location } + # + # source://prism//lib/prism/node.rb#14650 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14676 + sig { override.returns(String) } + def inspect; end + + # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil + # + # source://prism//lib/prism/node.rb#14670 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end + def keyword_rest; end + + # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] + # + # source://prism//lib/prism/node.rb#14667 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } + def keywords; end + + # attr_reader optionals: Array[OptionalParameterNode] + # + # source://prism//lib/prism/node.rb#14658 + sig { returns(T::Array[Prism::OptionalParameterNode]) } + def optionals; end + + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] + # + # source://prism//lib/prism/node.rb#14664 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) + end + def posts; end + + # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#14655 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } + def requireds; end + + # attr_reader rest: RestParameterNode | ImplicitRestNode | nil + # + # source://prism//lib/prism/node.rb#14661 + sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } + def rest; end + + # Mirrors the Method#parameters method. + # + # source://prism//lib/prism/node_ext.rb#238 + sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } + def signature; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14694 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14704 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14730 +class Prism::ParenthesesNode < ::Prism::Node + # def initialize: (Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://prism//lib/prism/node.rb#14732 + sig do + params( + source: Prism::Source, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, body, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14842 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14742 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#14781 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14751 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#14803 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#14791 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14763 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14756 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> ParenthesesNode + # + # source://prism//lib/prism/node.rb#14768 + sig do + params( + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def copy(body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14751 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14776 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14808 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#14798 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#14784 + sig { returns(Prism::Location) } + def opening_loc; end + + # source://prism//lib/prism/node.rb#14746 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14826 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14836 + def type; end + end +end + +# This represents an error that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#451 +class Prism::ParseError + # Create a new error object with the given message and location. + # + # @return [ParseError] a new instance of ParseError + # + # source://prism//lib/prism/parse_result.rb#466 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseError. + # + # source://prism//lib/prism/parse_result.rb#474 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this error. + # + # source://prism//lib/prism/parse_result.rb#479 + sig { returns(String) } + def inspect; end + + # The level of this error. + # + # source://prism//lib/prism/parse_result.rb#463 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this error in the source. + # + # source://prism//lib/prism/parse_result.rb#460 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this error. + # + # source://prism//lib/prism/parse_result.rb#457 + sig { returns(String) } + def message; end + + # The type of error. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # source://prism//lib/prism/parse_result.rb#454 + sig { returns(Symbol) } + def type; end +end + +# This is a result specific to the `parse_lex` and `parse_lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#610 +class Prism::ParseLexResult < ::Prism::Result + # Create a new parse lex result object with the given values. + # + # @return [ParseLexResult] a new instance of ParseLexResult + # + # source://prism//lib/prism/parse_result.rb#616 + sig do + params( + value: [Prism::ProgramNode, T::Array[T.untyped]], + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for ParseLexResult. + # + # source://prism//lib/prism/parse_result.rb#622 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # A tuple of the syntax tree and the list of tokens that were parsed from + # the source code. + # + # source://prism//lib/prism/parse_result.rb#613 + sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } + def value; end +end + +# This is a result specific to the `parse` and `parse_file` methods. +# +# source://prism//lib/prism/parse_result.rb#576 +class Prism::ParseResult < ::Prism::Result + # Create a new parse result object with the given values. + # + # @return [ParseResult] a new instance of ParseResult + # + # source://prism//lib/prism/parse_result.rb#581 + sig do + params( + value: Prism::ProgramNode, + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Attach the list of comments to their respective locations in the tree. + # + # source://prism//lib/prism/parse_result/comments.rb#190 + def attach_comments!; end + + # Implement the hash pattern matching interface for ParseResult. + # + # source://prism//lib/prism/parse_result.rb#587 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Walk the tree and mark nodes that are on a new line. + # + # source://prism//lib/prism/parse_result/newlines.rb#60 + def mark_newlines!; end + + # The syntax tree that was parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#578 + sig { returns(Prism::ProgramNode) } + def value; end +end + +# When we've parsed the source, we have both the syntax tree and the list of +# comments that we found in the source. This class is responsible for +# walking the tree and finding the nearest location to attach each comment. +# +# It does this by first finding the nearest locations to each comment. +# Locations can either come from nodes directly or from location fields on +# nodes. For example, a `ClassNode` has an overall location encompassing the +# entire class, but it also has a location for the `class` keyword. +# +# Once the nearest locations are found, it determines which one to attach +# to. If it's a trailing comment (a comment on the same line as other source +# code), it will favor attaching to the nearest location that occurs before +# the comment. Otherwise it will favor attaching to the nearest location +# that is after the comment. +# +# source://prism//lib/prism/parse_result/comments.rb#19 +class Prism::ParseResult::Comments + # Create a new Comments object that will attach comments to the given + # parse result. + # + # @return [Comments] a new instance of Comments + # + # source://prism//lib/prism/parse_result/comments.rb#86 + def initialize(parse_result); end + + # Attach the comments to their respective locations in the tree by + # mutating the parse result. + # + # source://prism//lib/prism/parse_result/comments.rb#92 + def attach!; end + + # The parse result that we are attaching comments to. + # + # source://prism//lib/prism/parse_result/comments.rb#82 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # source://prism//lib/prism/parse_result/comments.rb#119 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# source://prism//lib/prism/parse_result/comments.rb#53 +class Prism::ParseResult::Comments::LocationTarget + # @return [LocationTarget] a new instance of LocationTarget + # + # source://prism//lib/prism/parse_result/comments.rb#56 + def initialize(location); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#68 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#64 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#72 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#54 + def location; end + + # source://prism//lib/prism/parse_result/comments.rb#60 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#76 + def trailing_comment(comment); end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# source://prism//lib/prism/parse_result/comments.rb#22 +class Prism::ParseResult::Comments::NodeTarget + # @return [NodeTarget] a new instance of NodeTarget + # + # source://prism//lib/prism/parse_result/comments.rb#25 + def initialize(node); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#37 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#33 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#42 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#23 + def node; end + + # source://prism//lib/prism/parse_result/comments.rb#29 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#46 + def trailing_comment(comment); end +end + +# The :line tracepoint event gets fired whenever the Ruby VM encounters an +# expression on a new line. The types of expressions that can trigger this +# event are: +# +# * if statements +# * unless statements +# * nodes that are children of statements lists +# +# In order to keep track of the newlines, we have a list of offsets that +# come back from the parser. We assign these offsets to the first nodes that +# we find in the tree that are on those lines. +# +# Note that the logic in this file should be kept in sync with the Java +# MarkNewlinesVisitor, since that visitor is responsible for marking the +# newlines for JRuby/TruffleRuby. +# +# source://prism//lib/prism/parse_result/newlines.rb#20 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # Create a new Newlines visitor with the given newline offsets. + # + # @return [Newlines] a new instance of Newlines + # + # source://prism//lib/prism/parse_result/newlines.rb#22 + def initialize(newline_marked); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def visit_block_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#41 + def visit_if_node(node); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def visit_lambda_node(node); end + + # Permit statements lists to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#49 + def visit_statements_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#41 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#485 +class Prism::ParseWarning + # Create a new warning object with the given message and location. + # + # @return [ParseWarning] a new instance of ParseWarning + # + # source://prism//lib/prism/parse_result.rb#500 + sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } + def initialize(type, message, location, level); end + + # Implement the hash pattern matching interface for ParseWarning. + # + # source://prism//lib/prism/parse_result.rb#508 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns a string representation of this warning. + # + # source://prism//lib/prism/parse_result.rb#513 + sig { returns(String) } + def inspect; end + + # The level of this warning. + # + # source://prism//lib/prism/parse_result.rb#497 + sig { returns(Symbol) } + def level; end + + # A Location object representing the location of this warning in the source. + # + # source://prism//lib/prism/parse_result.rb#494 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this warning. + # + # source://prism//lib/prism/parse_result.rb#491 + sig { returns(String) } + def message; end + + # The type of warning. This is an _internal_ symbol that is used for + # communicating with translation layers. It is not meant to be public API. + # + # source://prism//lib/prism/parse_result.rb#488 + sig { returns(Symbol) } + def type; end +end + +# A pattern is an object that wraps a Ruby pattern matching expression. The +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the ConstantPathNode[...] expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a Prism::Pattern::CompilationError will be +# raised. +# +# source://prism//lib/prism/pattern.rb#37 +class Prism::Pattern + # Create a new pattern with the given query. The query should be a string + # containing a Ruby pattern matching expression. + # + # @return [Pattern] a new instance of Pattern + # + # source://prism//lib/prism/pattern.rb#63 + def initialize(query); end + + # Compile the query into a callable object that can be used to match against + # nodes. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#70 + def compile; end + + # The query that this pattern was initialized with. + # + # source://prism//lib/prism/pattern.rb#59 + def query; end + + # Scan the given node and all of its children for nodes that match the + # pattern. If a block is given, it will be called with each node that + # matches the pattern. If no block is given, an enumerator will be returned + # that will yield each node that matches the pattern. + # + # source://prism//lib/prism/pattern.rb#86 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://prism//lib/prism/pattern.rb#102 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://prism//lib/prism/pattern.rb#108 + def combine_or(left, right); end + + # in foo | bar + # + # source://prism//lib/prism/pattern.rb#143 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://prism//lib/prism/pattern.rb#118 + def compile_array_pattern_node(node); end + + # Compile a name associated with a constant. + # + # source://prism//lib/prism/pattern.rb#168 + def compile_constant_name(node, name); end + + # in Prism::ConstantReadNode + # + # source://prism//lib/prism/pattern.rb#148 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://prism//lib/prism/pattern.rb#163 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#113 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://prism//lib/prism/pattern.rb#184 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://prism//lib/prism/pattern.rb#214 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://prism//lib/prism/pattern.rb#243 + def compile_node(node); end + + # in /foo/ + # + # source://prism//lib/prism/pattern.rb#219 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://prism//lib/prism/pattern.rb#227 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://prism//lib/prism/pattern.rb#235 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://prism//lib/prism/pattern.rb#40 +class Prism::Pattern::CompilationError < ::StandardError + # Create a new CompilationError with the given representation of the node + # that caused the error. + # + # @return [CompilationError] a new instance of CompilationError + # + # source://prism//lib/prism/pattern.rb#43 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#14854 +class Prism::PinnedExpressionNode < ::Prism::Node + # def initialize: (Prism::node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#14856 + sig do + params( + source: Prism::Source, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#14973 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14867 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14872 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14882 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#14877 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location, ?location: Location) -> PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#14887 + sig do + params( + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14872 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#14895 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#14900 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14939 + sig { override.returns(String) } + def inspect; end + + # def lparen: () -> String + # + # source://prism//lib/prism/node.rb#14929 + sig { returns(String) } + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://prism//lib/prism/node.rb#14910 + sig { returns(Prism::Location) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14924 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14903 + sig { returns(Prism::Location) } + def operator_loc; end + + # def rparen: () -> String + # + # source://prism//lib/prism/node.rb#14934 + sig { returns(String) } + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://prism//lib/prism/node.rb#14917 + sig { returns(Prism::Location) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14957 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14967 + def type; end + end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern matching expression. +# +# foo in ^bar +# ^^^^ +# +# source://prism//lib/prism/node.rb#14986 +class Prism::PinnedVariableNode < ::Prism::Node + # def initialize: (Prism::node variable, Location operator_loc, Location location) -> void + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://prism//lib/prism/node.rb#14988 + sig do + params( + source: Prism::Source, + variable: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, variable, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15079 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14997 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15012 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15007 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode + # + # source://prism//lib/prism/node.rb#15017 + sig do + params( + variable: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def copy(variable: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15002 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::node, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15025 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15045 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15040 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15033 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15063 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: Prism::node + # + # source://prism//lib/prism/node.rb#15030 + sig { returns(Prism::Node) } + def variable; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15073 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15090 +class Prism::PostExecutionNode < ::Prism::Node + # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://prism//lib/prism/node.rb#15092 + sig do + params( + source: Prism::Source, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15211 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15103 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15108 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15172 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15155 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15120 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15113 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PostExecutionNode + # + # source://prism//lib/prism/node.rb#15125 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15108 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15133 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15177 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15162 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15141 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15167 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15148 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15138 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15195 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15205 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15224 +class Prism::PreExecutionNode < ::Prism::Node + # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://prism//lib/prism/node.rb#15226 + sig do + params( + source: Prism::Source, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15345 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15237 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15242 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15306 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15289 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15254 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15247 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PreExecutionNode + # + # source://prism//lib/prism/node.rb#15259 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15242 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15267 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15311 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15296 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15275 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15301 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15282 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#15272 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15329 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15339 + def type; end + end +end + +# The top level node of any parse tree. +# +# source://prism//lib/prism/node.rb#15355 +class Prism::ProgramNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://prism//lib/prism/node.rb#15357 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + statements: Prism::StatementsNode, + location: Prism::Location + ).void + end + def initialize(source, locals, statements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15439 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15366 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15371 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15381 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15376 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode + # + # source://prism//lib/prism/node.rb#15386 + sig do + params( + locals: T::Array[Symbol], + statements: Prism::StatementsNode, + location: Prism::Location + ).returns(Prism::ProgramNode) + end + def copy(locals: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15371 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } + # + # source://prism//lib/prism/node.rb#15394 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15405 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#15399 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader statements: StatementsNode + # + # source://prism//lib/prism/node.rb#15402 + sig { returns(Prism::StatementsNode) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15423 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15433 + def type; end + end +end + +# Flags for range and flip-flop nodes. +# +# source://prism//lib/prism/node.rb#19283 +module Prism::RangeFlags; end + +# ... operator +# +# source://prism//lib/prism/node.rb#19285 +Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15454 +class Prism::RangeNode < ::Prism::Node + # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void + # + # @return [RangeNode] a new instance of RangeNode + # + # source://prism//lib/prism/node.rb#15456 + sig do + params( + source: Prism::Source, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, left, right, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15577 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15467 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15472 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15485 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15477 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> RangeNode + # + # source://prism//lib/prism/node.rb#15490 + sig do + params( + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RangeNode) + end + def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15472 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15498 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def exclude_end?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15533 + sig { returns(T::Boolean) } + def exclude_end?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15543 + sig { override.returns(String) } + def inspect; end + + # The left-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # 1... + # ^ + # + # hello...goodbye + # ^^^^^ + # + # source://prism//lib/prism/node.rb#15513 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15538 + sig { returns(String) } + def operator; end + + # The location of the `..` or `...` operator. + # + # source://prism//lib/prism/node.rb#15526 + sig { returns(Prism::Location) } + def operator_loc; end + + # The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # ..5 + # ^ + # + # 1...foo + # ^^^ + # If neither right-hand or left-hand side was included, this will be a MissingNode. + # + # source://prism//lib/prism/node.rb#15523 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15561 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15503 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15571 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://prism//lib/prism/node.rb#15590 +class Prism::RationalNode < ::Prism::Node + # def initialize: (Prism::node numeric, Location location) -> void + # + # @return [RationalNode] a new instance of RationalNode + # + # source://prism//lib/prism/node.rb#15592 + sig { params(source: Prism::Source, numeric: Prism::Node, location: Prism::Location).void } + def initialize(source, numeric, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15670 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15600 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15605 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15615 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15610 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?numeric: Prism::node, ?location: Location) -> RationalNode + # + # source://prism//lib/prism/node.rb#15620 + sig { params(numeric: Prism::Node, location: Prism::Location).returns(Prism::RationalNode) } + def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15605 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#15628 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15636 + sig { override.returns(String) } + def inspect; end + + # attr_reader numeric: Prism::node + # + # source://prism//lib/prism/node.rb#15633 + sig { returns(Prism::Node) } + def numeric; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15654 + sig { override.returns(Symbol) } + def type; end + + # Returns the value of the node as a Ruby Rational. + # + # source://prism//lib/prism/node_ext.rb#105 + sig { returns(Rational) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15664 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://prism//lib/prism/node.rb#15680 +class Prism::RedoNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [RedoNode] a new instance of RedoNode + # + # source://prism//lib/prism/node.rb#15682 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15756 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15689 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15694 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15704 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15699 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> RedoNode + # + # source://prism//lib/prism/node.rb#15709 + sig { params(location: Prism::Location).returns(Prism::RedoNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15694 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#15717 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15722 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15740 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15750 + def type; end + end +end + +# The Reflection module provides the ability to reflect on the structure of +# the syntax tree itself, as opposed to looking at a single syntax tree. This +# is useful in metaprogramming contexts. +# +# source://prism//lib/prism/reflection.rb#13 +module Prism::Reflection + class << self + # Returns the fields for the given node. + # + # source://prism//lib/prism/reflection.rb#104 + sig { params(node: T.class_of(Prism::Node)).returns(T::Array[Prism::Reflection::Field]) } + def fields_for(node); end + end +end + +# A constant field represents a constant value on a node. Effectively, it +# represents an identifier found within the source. It resolves to a symbol +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#45 +class Prism::Reflection::ConstantField < ::Prism::Reflection::Field; end + +# A constant list field represents a list of constant values on a node. It +# resolves to an array of symbols in Ruby. +# +# source://prism//lib/prism/reflection.rb#55 +class Prism::Reflection::ConstantListField < ::Prism::Reflection::Field; end + +# A field represents a single piece of data on a node. It is the base class +# for all other field types. +# +# source://prism//lib/prism/reflection.rb#16 +class Prism::Reflection::Field + # Initializes the field with the given name. + # + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/reflection.rb#21 + sig { params(name: Symbol).void } + def initialize(name); end + + # The name of the field. + # + # source://prism//lib/prism/reflection.rb#18 + sig { returns(Symbol) } + def name; end +end + +# A flags field represents a bitset of flags on a node. It resolves to an +# integer in Ruby. Note that the flags cannot be accessed directly on the +# node because the integer is kept private. Instead, the various flags in +# the bitset should be accessed through their query methods. +# +# source://prism//lib/prism/reflection.rb#92 +class Prism::Reflection::FlagsField < ::Prism::Reflection::Field + # Initializes the flags field with the given name and flags. + # + # @return [FlagsField] a new instance of FlagsField + # + # source://prism//lib/prism/reflection.rb#97 + sig { params(name: Symbol, flags: T::Array[Symbol]).void } + def initialize(name, flags); end + + # The names of the flags in the bitset. + # + # source://prism//lib/prism/reflection.rb#94 + sig { returns(T::Array[Symbol]) } + def flags; end +end + +# A float field represents a double-precision floating point value. It is +# used exclusively to represent the value of a floating point literal. It +# resolves to a Float in Ruby. +# +# source://prism//lib/prism/reflection.rb#85 +class Prism::Reflection::FloatField < ::Prism::Reflection::Field; end + +# An integer field represents an integer value. It is used to represent the +# value of an integer literal, the depth of local variables, and the number +# of a numbered reference. It resolves to an Integer in Ruby. +# +# source://prism//lib/prism/reflection.rb#79 +class Prism::Reflection::IntegerField < ::Prism::Reflection::Field; end + +# A location field represents the location of some part of the node in the +# source code. For example, the location of a keyword or an operator. It +# resolves to a Prism::Location in Ruby. +# +# source://prism//lib/prism/reflection.rb#67 +class Prism::Reflection::LocationField < ::Prism::Reflection::Field; end + +# A node field represents a single child node in the syntax tree. It +# resolves to a Prism::Node in Ruby. +# +# source://prism//lib/prism/reflection.rb#28 +class Prism::Reflection::NodeField < ::Prism::Reflection::Field; end + +# A node list field represents a list of child nodes in the syntax tree. It +# resolves to an array of Prism::Node instances in Ruby. +# +# source://prism//lib/prism/reflection.rb#39 +class Prism::Reflection::NodeListField < ::Prism::Reflection::Field; end + +# An optional constant field represents a constant value on a node that may +# or may not be present. It resolves to either a symbol or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#50 +class Prism::Reflection::OptionalConstantField < ::Prism::Reflection::Field; end + +# An optional location field represents the location of some part of the +# node in the source code that may or may not be present. It resolves to +# either a Prism::Location or nil in Ruby. +# +# source://prism//lib/prism/reflection.rb#73 +class Prism::Reflection::OptionalLocationField < ::Prism::Reflection::Field; end + +# An optional node field represents a single child node in the syntax tree +# that may or may not be present. It resolves to either a Prism::Node or nil +# in Ruby. +# +# source://prism//lib/prism/reflection.rb#34 +class Prism::Reflection::OptionalNodeField < ::Prism::Reflection::Field; end + +# A string field represents a string value on a node. It almost always +# represents the unescaped value of a string-like literal. It resolves to a +# string in Ruby. +# +# source://prism//lib/prism/reflection.rb#61 +class Prism::Reflection::StringField < ::Prism::Reflection::Field; end + +# Flags for regular expression and match last line nodes. +# +# source://prism//lib/prism/node.rb#19289 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://prism//lib/prism/node.rb#19306 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://prism//lib/prism/node.rb#19303 +Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) + +# x - ignores whitespace and allows comments in regular expressions +# +# source://prism//lib/prism/node.rb#19294 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19318 +Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# source://prism//lib/prism/node.rb#19321 +Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19315 +Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# i - ignores the case of characters when matching +# +# source://prism//lib/prism/node.rb#19291 +Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) + +# m - allows $ to match the end of lines within strings +# +# source://prism//lib/prism/node.rb#19297 +Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) + +# o - only interpolates values into the regular expression once +# +# source://prism//lib/prism/node.rb#19300 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://prism//lib/prism/node.rb#19312 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://prism//lib/prism/node.rb#19309 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#15765 +class Prism::RegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://prism//lib/prism/node.rb#15767 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#15944 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15779 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def ascii_8bit?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15865 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15784 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15905 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#15830 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15794 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15789 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#15900 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#15823 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> RegularExpressionNode + # + # source://prism//lib/prism/node.rb#15799 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::RegularExpressionNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15784 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#15807 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def euc_jp?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15860 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15845 + sig { returns(T::Boolean) } + def extended?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15885 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15890 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15880 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15840 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15910 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15850 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15855 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15895 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15816 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + 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://prism//lib/prism/node.rb#15928 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15837 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15875 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15870 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15812 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15938 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#17 +module Prism::RegularExpressionOptions + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://prism//lib/prism/node_ext.rb#20 + def options; end +end + +# Represents a required keyword parameter to a method, block, or lambda definition. +# +# def a(b: ) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#15959 +class Prism::RequiredKeywordParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void + # + # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#15961 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16057 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15971 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15976 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15986 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#15981 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#15991 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15976 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#15999 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16023 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#16008 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#16011 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16018 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16041 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16004 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16051 + def type; end + end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://prism//lib/prism/node.rb#16070 +class Prism::RequiredParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol name, Location location) -> void + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://prism//lib/prism/node.rb#16072 + sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } + def initialize(source, flags, name, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16160 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16081 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16086 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16096 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16091 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode + # + # source://prism//lib/prism/node.rb#16101 + sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::RequiredParameterNode) } + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16086 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # + # source://prism//lib/prism/node.rb#16109 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16126 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#16118 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16121 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16144 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16114 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16154 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16171 +class Prism::RescueModifierNode < ::Prism::Node + # def initialize: (Prism::node expression, Location keyword_loc, Prism::node rescue_expression, Location location) -> void + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://prism//lib/prism/node.rb#16173 + sig do + params( + source: Prism::Source, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, expression, keyword_loc, rescue_expression, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16272 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16183 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16202 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16197 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node, ?location: Location) -> RescueModifierNode + # + # source://prism//lib/prism/node.rb#16207 + sig do + params( + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node, + location: Prism::Location + ).returns(Prism::RescueModifierNode) + end + def copy(expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16192 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node, location: Location } + # + # source://prism//lib/prism/node.rb#16215 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#16220 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16238 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16233 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16223 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader rescue_expression: Prism::node + # + # source://prism//lib/prism/node.rb#16230 + sig { returns(Prism::Node) } + def rescue_expression; end + + # source://prism//lib/prism/node.rb#16187 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16256 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16266 + def type; end + end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# foo +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. +# +# source://prism//lib/prism/node.rb#16289 +class Prism::RescueNode < ::Prism::Node + # def initialize: (Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc, Prism::node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void + # + # @return [RescueNode] a new instance of RescueNode + # + # source://prism//lib/prism/node.rb#16291 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(Prism::Node), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::RescueNode), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16418 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16304 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16309 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16324 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16314 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader consequent: RescueNode? + # + # source://prism//lib/prism/node.rb#16371 + sig { returns(T.nilable(Prism::RescueNode)) } + def consequent; end + + # def copy: (?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: Prism::node?, ?statements: StatementsNode?, ?consequent: RescueNode?, ?location: Location) -> RescueNode + # + # source://prism//lib/prism/node.rb#16329 + sig do + params( + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(Prism::Node), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::RescueNode), + location: Prism::Location + ).returns(Prism::RescueNode) + end + def copy(keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16309 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } + # + # source://prism//lib/prism/node.rb#16337 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#16349 + sig { returns(T::Array[Prism::Node]) } + def exceptions; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16384 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16374 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16342 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#16379 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#16352 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader reference: Prism::node? + # + # source://prism//lib/prism/node.rb#16365 + sig { returns(T.nilable(Prism::Node)) } + def reference; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16368 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16402 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16412 + def type; end + end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#16435 +class Prism::RestParameterNode < ::Prism::Node + # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://prism//lib/prism/node.rb#16437 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, operator_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16552 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16448 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16453 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16463 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16458 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> RestParameterNode + # + # source://prism//lib/prism/node.rb#16468 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RestParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16453 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#16476 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16518 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#16485 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#16488 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#16513 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#16501 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16508 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16536 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16481 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16546 + def type; end + end +end + +# This represents the result of a call to ::parse or ::parse_file. It contains +# the requested structure, any comments that were encounters, and any errors +# that were encountered. +# +# source://prism//lib/prism/parse_result.rb#521 +class Prism::Result + # Create a new result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/parse_result.rb#543 + sig do + params( + comments: T::Array[Prism::Comment], + magic_comments: T::Array[Prism::MagicComment], + data_loc: T.nilable(Prism::Location), + errors: T::Array[Prism::ParseError], + warnings: T::Array[Prism::ParseWarning], + source: Prism::Source + ).void + end + def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + + # The list of comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#523 + sig { returns(T::Array[Prism::Comment]) } + def comments; end + + # An optional location that represents the location of the __END__ marker + # and the rest of the content of the file. This content is loaded into the + # DATA constant when the file being parsed is the main file being executed. + # + # source://prism//lib/prism/parse_result.rb#531 + sig { returns(T.nilable(Prism::Location)) } + def data_loc; end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/parse_result.rb#553 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Returns the encoding of the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#558 + sig { returns(Encoding) } + def encoding; end + + # The list of errors that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#534 + sig { returns(T::Array[Prism::ParseError]) } + def errors; end + + # Returns true if there were errors during parsing and false if there were + # not. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#570 + sig { returns(T::Boolean) } + def failure?; end + + # The list of magic comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#526 + sig { returns(T::Array[Prism::MagicComment]) } + def magic_comments; end + + # A Source instance that represents the source code that was parsed. + # + # source://prism//lib/prism/parse_result.rb#540 + sig { returns(Prism::Source) } + def source; end + + # Returns true if there were no errors during parsing and false if there + # were. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#564 + sig { returns(T::Boolean) } + def success?; end + + # The list of warnings that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#537 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://prism//lib/prism/node.rb#16565 +class Prism::RetryNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [RetryNode] a new instance of RetryNode + # + # source://prism//lib/prism/node.rb#16567 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16641 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16574 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16579 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16589 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16584 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> RetryNode + # + # source://prism//lib/prism/node.rb#16594 + sig { params(location: Prism::Location).returns(Prism::RetryNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16579 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#16602 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16607 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16625 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16635 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16650 +class Prism::ReturnNode < ::Prism::Node + # def initialize: (Integer flags, Location keyword_loc, ArgumentsNode? arguments, Location location) -> void + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://prism//lib/prism/node.rb#16652 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + location: Prism::Location + ).void + end + def initialize(source, flags, keyword_loc, arguments, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16755 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16662 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#16708 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16667 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16679 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16672 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode + # + # source://prism//lib/prism/node.rb#16684 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + location: Prism::Location + ).returns(Prism::ReturnNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16667 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, arguments: ArgumentsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#16692 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16721 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16716 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16701 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def redundant?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16711 + sig { returns(T::Boolean) } + def redundant?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16739 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16697 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16749 + def type; end + end +end + +# Flags for return nodes. +# +# source://prism//lib/prism/node.rb#19325 +module Prism::ReturnNodeFlags; end + +# a return statement that is redundant because it is the last statement in a method +# +# source://prism//lib/prism/node.rb#19327 +Prism::ReturnNodeFlags::REDUNDANT = T.let(T.unsafe(nil), Integer) + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://prism//lib/prism/node.rb#16767 +class Prism::SelfNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [SelfNode] a new instance of SelfNode + # + # source://prism//lib/prism/node.rb#16769 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16843 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16776 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16781 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16791 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16786 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> SelfNode + # + # source://prism//lib/prism/node.rb#16796 + sig { params(location: Prism::Location).returns(Prism::SelfNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16781 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#16804 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16809 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16827 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16837 + def type; end + end +end + +# A module responsible for deserializing parse results. +# +# source://prism//lib/prism/serialize.rb#14 +module Prism::Serialize + class << self + # Deserialize the AST represented by the given string into a parse result. + # + # source://prism//lib/prism/serialize.rb#28 + def load(input, serialized); end + + # Deserialize the tokens represented by the given string into a parse + # result. + # + # source://prism//lib/prism/serialize.rb#40 + def load_tokens(source, serialized); end + end +end + +# source://prism//lib/prism/serialize.rb#44 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://prism//lib/prism/serialize.rb#80 + def initialize(source, serialized); end + + # Returns the value of attribute constant_pool. + # + # source://prism//lib/prism/serialize.rb#77 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://prism//lib/prism/serialize.rb#77 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://prism//lib/prism/serialize.rb#76 + def encoding; end + + # Returns the value of attribute input. + # + # source://prism//lib/prism/serialize.rb#76 + def input; end + + # Returns the value of attribute io. + # + # source://prism//lib/prism/serialize.rb#76 + def io; end + + # source://prism//lib/prism/serialize.rb#118 + def load_comments; end + + # source://prism//lib/prism/serialize.rb#104 + def load_encoding; end + + # source://prism//lib/prism/serialize.rb#95 + def load_header; end + + # source://prism//lib/prism/serialize.rb#114 + def load_line_offsets; end + + # source://prism//lib/prism/serialize.rb#433 + def load_metadata; end + + # source://prism//lib/prism/serialize.rb#467 + def load_nodes; end + + # source://prism//lib/prism/serialize.rb#481 + def load_result; end + + # source://prism//lib/prism/serialize.rb#110 + def load_start_line; end + + # source://prism//lib/prism/serialize.rb#442 + def load_tokens; end + + # source://prism//lib/prism/serialize.rb#455 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://prism//lib/prism/serialize.rb#76 + def serialized; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/serialize.rb#77 + def source; end + + # Returns the value of attribute start_line. + # + # source://prism//lib/prism/serialize.rb#78 + def start_line; end + + private + + # source://prism//lib/prism/serialize.rb#567 + def load_constant(index); end + + # source://prism//lib/prism/serialize.rb#520 + def load_double; end + + # source://prism//lib/prism/serialize.rb#535 + def load_embedded_string; end + + # source://prism//lib/prism/serialize.rb#597 + def load_error_level; end + + # source://prism//lib/prism/serialize.rb#509 + def load_integer; end + + # source://prism//lib/prism/serialize.rb#551 + def load_location; end + + # source://prism//lib/prism/serialize.rb#555 + def load_location_object; end + + # source://prism//lib/prism/serialize.rb#626 + def load_node; end + + # source://prism//lib/prism/serialize.rb#592 + def load_optional_constant; end + + # source://prism//lib/prism/serialize.rb#559 + def load_optional_location; end + + # source://prism//lib/prism/serialize.rb#563 + def load_optional_location_object; end + + # source://prism//lib/prism/serialize.rb#528 + def load_optional_node; end + + # source://prism//lib/prism/serialize.rb#588 + def load_required_constant; end + + # source://prism//lib/prism/serialize.rb#539 + def load_string; end + + # source://prism//lib/prism/serialize.rb#524 + def load_uint32; end + + # source://prism//lib/prism/serialize.rb#504 + def load_varsint; end + + # variable-length integer using https://en.wikipedia.org/wiki/LEB128 + # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints + # + # source://prism//lib/prism/serialize.rb#490 + def load_varuint; end + + # source://prism//lib/prism/serialize.rb#612 + def load_warning_level; end +end + +# source://prism//lib/prism/serialize.rb#127 +Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) + +# StringIO is synchronized and that adds a high overhead on TruffleRuby. +# +# source://prism//lib/prism/serialize.rb#72 +Prism::Serialize::Loader::FastStringIO = StringIO + +# The major version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#17 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The minor version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#21 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The patch version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#25 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# The token types that can be indexed by their enum values. +# +# source://prism//lib/prism/serialize.rb#1850 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. +# +# C = { a: 1 } +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16853 +class Prism::ShareableConstantNode < ::Prism::Node + # def initialize: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void + # + # @return [ShareableConstantNode] a new instance of ShareableConstantNode + # + # source://prism//lib/prism/node.rb#16855 + sig do + params( + source: Prism::Source, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), + location: Prism::Location + ).void + end + def initialize(source, flags, write, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#16953 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16864 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16869 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16879 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16874 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, ?location: Location) -> ShareableConstantNode + # + # source://prism//lib/prism/node.rb#16884 + sig do + params( + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), + location: Prism::Location + ).returns(Prism::ShareableConstantNode) + end + def copy(flags: T.unsafe(nil), write: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16869 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, location: Location } + # + # source://prism//lib/prism/node.rb#16892 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def experimental_copy?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16914 + sig { returns(T::Boolean) } + def experimental_copy?; end + + # def experimental_everything?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16909 + sig { returns(T::Boolean) } + def experimental_everything?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16919 + sig { override.returns(String) } + def inspect; end + + # def literal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16904 + sig { returns(T::Boolean) } + def literal?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16937 + sig { override.returns(Symbol) } + def type; end + + # The constant write that should be modified with the shareability state. + # + # source://prism//lib/prism/node.rb#16901 + sig do + returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) + end + def write; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16897 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16947 + def type; end + end +end + +# Flags for shareable constant nodes. +# +# source://prism//lib/prism/node.rb#19331 +module Prism::ShareableConstantNodeFlags; end + +# constant writes that should be modified with shareable constant value experimental copy +# +# source://prism//lib/prism/node.rb#19339 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value experimental everything +# +# source://prism//lib/prism/node.rb#19336 +Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) + +# constant writes that should be modified with shareable constant value literal +# +# source://prism//lib/prism/node.rb#19333 +Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) + +# Represents a singleton class declaration involving the `class` keyword. +# +# class << self end +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16964 +class Prism::SingletonClassNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression, Prism::node? body, Location end_keyword_loc, Location location) -> void + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://prism//lib/prism/node.rb#16966 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17094 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16979 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#17035 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#17045 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17018 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16997 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16989 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?location: Location) -> SingletonClassNode + # + # source://prism//lib/prism/node.rb#17002 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def copy(locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16984 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: Prism::node?, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#17010 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#17055 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17038 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#17032 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17060 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#17015 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#17050 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#17025 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17078 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17088 + def type; end + end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# source://prism//lib/prism/parse_result.rb#7 +class Prism::Source + # Create a new source object with the given source code. + # + # @return [Source] a new instance of Source + # + # source://prism//lib/prism/parse_result.rb#26 + sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } + def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#78 + sig { params(byte_offset: Integer).returns(Integer) } + def character_column(byte_offset); end + + # Return the character offset for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#73 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Returns the column number in code units for the given encoding for the + # given byte offset. + # + # source://prism//lib/prism/parse_result.rb#95 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_column(byte_offset, encoding); end + + # Returns the offset from the start of the file for the given byte offset + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # source://prism//lib/prism/parse_result.rb#88 + sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } + def code_units_offset(byte_offset, encoding); end + + # Return the column number for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#68 + sig { params(byte_offset: Integer).returns(Integer) } + def column(byte_offset); end + + # Returns the encoding of the source code, which is set by parameters to the + # parser or by the encoding magic comment. + # + # source://prism//lib/prism/parse_result.rb#34 + sig { returns(Encoding) } + def encoding; end + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#51 + sig { params(byte_offset: Integer).returns(Integer) } + def line(byte_offset); end + + # Returns the byte offset of the end of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#63 + def line_end(byte_offset); end + + # Return the byte offset of the start of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#57 + sig { params(byte_offset: Integer).returns(Integer) } + def line_start(byte_offset); end + + # Returns the lines of the source code as an array of strings. + # + # source://prism//lib/prism/parse_result.rb#39 + sig { returns(T::Array[String]) } + def lines; end + + # The list of newline byte offsets in the source code. + # + # source://prism//lib/prism/parse_result.rb#23 + sig { returns(T::Array[Integer]) } + def offsets; end + + # Perform a byteslice on the source code using the given byte offset and + # byte length. + # + # source://prism//lib/prism/parse_result.rb#45 + sig { params(byte_offset: Integer, length: Integer).returns(String) } + def slice(byte_offset, length); end + + # The source code that this source object represents. + # + # source://prism//lib/prism/parse_result.rb#17 + sig { returns(String) } + def source; end + + # The line number where this source starts. + # + # source://prism//lib/prism/parse_result.rb#20 + sig { returns(Integer) } + def start_line; end + + private + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#103 + def find_line(byte_offset); end + + class << self + # Create a new source object with the given source code. This method should + # be used instead of `new` and it will return either a `Source` or a + # specialized and more performant `ASCIISource` if no multibyte characters + # are present in the source code. + # + # source://prism//lib/prism/parse_result.rb#12 + def for(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end + end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17110 +class Prism::SourceEncodingNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://prism//lib/prism/node.rb#17112 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17186 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17119 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17124 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17134 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17129 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> SourceEncodingNode + # + # source://prism//lib/prism/node.rb#17139 + sig { params(location: Prism::Location).returns(Prism::SourceEncodingNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17124 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#17147 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17152 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17170 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17180 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17195 +class Prism::SourceFileNode < ::Prism::Node + # def initialize: (Integer flags, String filepath, Location location) -> void + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://prism//lib/prism/node.rb#17197 + sig { params(source: Prism::Source, flags: Integer, filepath: String, location: Prism::Location).void } + def initialize(source, flags, filepath, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17300 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17206 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17211 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17221 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17216 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode + # + # source://prism//lib/prism/node.rb#17226 + sig { params(flags: Integer, filepath: String, location: Prism::Location).returns(Prism::SourceFileNode) } + def copy(flags: T.unsafe(nil), filepath: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17211 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, filepath: String, location: Location } + # + # source://prism//lib/prism/node.rb#17234 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. + # + # source://prism//lib/prism/node.rb#17243 + sig { returns(String) } + def filepath; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17251 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17246 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17256 + sig { returns(T::Boolean) } + def frozen?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17266 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17261 + sig { returns(T::Boolean) } + def mutable?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17284 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17239 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17294 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17311 +class Prism::SourceLineNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#17313 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17387 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17320 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17325 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17335 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17330 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> SourceLineNode + # + # source://prism//lib/prism/node.rb#17340 + sig { params(location: Prism::Location).returns(Prism::SourceLineNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17325 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#17348 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17353 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17371 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17381 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://prism//lib/prism/node.rb#17396 +class Prism::SplatNode < ::Prism::Node + # def initialize: (Location operator_loc, Prism::node? expression, Location location) -> void + # + # @return [SplatNode] a new instance of SplatNode + # + # source://prism//lib/prism/node.rb#17398 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, operator_loc, expression, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17491 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17407 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17412 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17424 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17417 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode + # + # source://prism//lib/prism/node.rb#17429 + sig do + params( + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::SplatNode) + end + def copy(operator_loc: T.unsafe(nil), expression: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17412 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#17437 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node? + # + # source://prism//lib/prism/node.rb#17449 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17457 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#17452 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#17442 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17475 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17485 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17502 +class Prism::StatementsNode < ::Prism::Node + # def initialize: (Array[Prism::node] body, Location location) -> void + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://prism//lib/prism/node.rb#17504 + sig { params(source: Prism::Source, body: T::Array[Prism::Node], location: Prism::Location).void } + def initialize(source, body, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17582 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17512 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#17545 + sig { returns(T::Array[Prism::Node]) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17517 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17527 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17522 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode + # + # source://prism//lib/prism/node.rb#17532 + sig { params(body: T::Array[Prism::Node], location: Prism::Location).returns(Prism::StatementsNode) } + def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17517 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::node], location: Location } + # + # source://prism//lib/prism/node.rb#17540 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17548 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17566 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17576 + def type; end + end +end + +# Flags for string nodes. +# +# source://prism//lib/prism/node.rb#19343 +module Prism::StringFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19348 +Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19345 +Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#19351 +Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#19354 +Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) + +# Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. +# +# "foo" +# ^^^^^ +# +# %w[foo] +# ^^^ +# +# "foo #{bar} baz" +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#17599 +class Prism::StringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, Location location) -> void + # + # @return [StringNode] a new instance of StringNode + # + # source://prism//lib/prism/node.rb#17601 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17755 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17613 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17618 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#17716 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#17670 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17628 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17623 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#17711 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#17663 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> StringNode + # + # source://prism//lib/prism/node.rb#17633 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).returns(Prism::StringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17618 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#17641 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17691 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17686 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17696 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17721 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17701 + sig { returns(T::Boolean) } + def mutable?; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#17706 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#17650 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # source://prism//lib/prism/node_ext.rb#66 + sig { returns(Prism::InterpolatedStringNode) } + def to_interpolated; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17739 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#17683 + sig { returns(String) } + def unescaped; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17646 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17749 + def type; end + end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17772 +class Prism::SuperNode < ::Prism::Node + # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Prism::node? block, Location location) -> void + # + # @return [SuperNode] a new instance of SuperNode + # + # source://prism//lib/prism/node.rb#17774 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17910 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17786 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#17842 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Prism::node? + # + # source://prism//lib/prism/node.rb#17858 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17791 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17804 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17796 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: Prism::node?, ?location: Location) -> SuperNode + # + # source://prism//lib/prism/node.rb#17809 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::SuperNode) + end + def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17791 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::node?, location: Location } + # + # source://prism//lib/prism/node.rb#17817 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#17876 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#17861 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17822 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#17866 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#17829 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#17871 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#17845 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17894 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17904 + def type; end + end +end + +# Flags for symbol nodes. +# +# source://prism//lib/prism/node.rb#19358 +module Prism::SymbolFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#19363 +Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to US-ASCII +# +# source://prism//lib/prism/node.rb#19366 +Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to UTF-8 +# +# source://prism//lib/prism/node.rb#19360 +Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://prism//lib/prism/node.rb#17927 +class Prism::SymbolNode < ::Prism::Node + # def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://prism//lib/prism/node.rb#17929 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18084 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17941 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17946 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18045 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18004 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17956 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#17951 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> SymbolNode + # + # source://prism//lib/prism/node.rb#17961 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).returns(Prism::SymbolNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17946 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#17969 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18025 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18030 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18020 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18050 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#18035 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#17978 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18068 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#18017 + sig { returns(String) } + def unescaped; end + + # def value: () -> String? + # + # source://prism//lib/prism/node.rb#18040 + sig { returns(T.nilable(String)) } + def value; end + + # attr_reader value_loc: Location? + # + # source://prism//lib/prism/node.rb#17991 + sig { returns(T.nilable(Prism::Location)) } + def value_loc; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17974 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18078 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# source://prism//lib/prism/parse_result.rb#628 +class Prism::Token + # Create a new token object with the given type, value, and location. + # + # @return [Token] a new instance of Token + # + # source://prism//lib/prism/parse_result.rb#640 + sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } + def initialize(source, type, value, location); end + + # Returns true if the given other token is equal to this token. + # + # source://prism//lib/prism/parse_result.rb#675 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Implement the hash pattern matching interface for Token. + # + # source://prism//lib/prism/parse_result.rb#648 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # A Location object representing the location of this token in the source. + # + # source://prism//lib/prism/parse_result.rb#653 + sig { returns(Prism::Location) } + def location; end + + # Implement the pretty print interface for Token. + # + # source://prism//lib/prism/parse_result.rb#660 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # The type of token that this token is. + # + # source://prism//lib/prism/parse_result.rb#634 + sig { returns(Symbol) } + def type; end + + # A byteslice of the source that this token represents. + # + # source://prism//lib/prism/parse_result.rb#637 + sig { returns(String) } + def value; end + + private + + # The Source object that represents the source this token came from. + # + # source://prism//lib/prism/parse_result.rb#630 + sig { returns(Prism::Source) } + def source; end +end + +# This module is responsible for converting the prism syntax tree into other +# syntax trees. +# +# source://prism//lib/prism/translation.rb#6 +module Prism::Translation; end + +# This class is the entry-point for converting a prism syntax tree into the +# whitequark/parser gem's syntax tree. It inherits from the base parser for +# the parser gem, and overrides the parse* methods to parse with prism and +# then translate. +# +# source://prism//lib/prism/translation/parser.rb#11 +class Prism::Translation::Parser < ::Parser::Base + # The default encoding for Ruby files is UTF-8. + # + # source://prism//lib/prism/translation/parser.rb#36 + def default_encoding; end + + # Parses a source buffer and returns the AST. + # + # source://prism//lib/prism/translation/parser.rb#44 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # source://prism//lib/prism/translation/parser.rb#57 + def parse_with_comments(source_buffer); end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. + # + # source://prism//lib/prism/translation/parser.rb#74 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + # Since prism resolves num params for us, we don't need to support this + # kind of logic here. + # + # source://prism//lib/prism/translation/parser.rb#100 + def try_declare_numparam(node); end + + # source://prism//lib/prism/translation/parser.rb#31 + sig { overridable.returns(Integer) } + def version; end + + # source://prism//lib/prism/translation/parser.rb#40 + def yyerror; end + + private + + # Build the parser gem AST from the prism AST. + # + # source://prism//lib/prism/translation/parser.rb#258 + def build_ast(program, offset_cache); end + + # Build the parser gem comments from the prism comments. + # + # source://prism//lib/prism/translation/parser.rb#263 + def build_comments(comments, offset_cache); end + + # Prism deals with offsets in bytes, while the parser gem deals with + # offsets in characters. We need to handle this conversion in order to + # build the parser gem AST. + # + # If the bytesize of the source is the same as the length, then we can + # just use the offset directly. Otherwise, we build an array where the + # index is the byte offset and the value is the character offset. + # + # source://prism//lib/prism/translation/parser.rb#241 + def build_offset_cache(source); end + + # Build a range from a prism location. + # + # source://prism//lib/prism/translation/parser.rb#275 + def build_range(location, offset_cache); end + + # Build the parser gem tokens from the prism tokens. + # + # source://prism//lib/prism/translation/parser.rb#270 + def build_tokens(tokens, offset_cache); end + + # Converts the version format handled by Parser to the format handled by Prism. + # + # source://prism//lib/prism/translation/parser.rb#284 + def convert_for_prism(version); end + + # Build a diagnostic from the given prism parse error. + # + # source://prism//lib/prism/translation/parser.rb#119 + def error_diagnostic(error, offset_cache); end + + # If there was a error generated during the parse, then raise an + # appropriate syntax error. Otherwise return the result. + # + # source://prism//lib/prism/translation/parser.rb#219 + def unwrap(result, offset_cache); end + + # This is a hook to allow consumers to disable some errors if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#108 + def valid_error?(error); end + + # This is a hook to allow consumers to disable some warnings if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#114 + def valid_warning?(warning); end + + # Build a diagnostic from the given prism parse warning. + # + # source://prism//lib/prism/translation/parser.rb#192 + def warning_diagnostic(warning, offset_cache); end +end + +# This class is the entry-point for Ruby 3.3 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser33.rb#6 +class Prism::Translation::Parser33 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser33.rb#7 + sig { override.returns(Integer) } + def version; end +end + +# This class is the entry-point for Ruby 3.4 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser34.rb#6 +class Prism::Translation::Parser34 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser34.rb#7 + sig { override.returns(Integer) } + def version; end +end + +# A visitor that knows how to convert a prism syntax tree into the +# whitequark/parser gem's syntax tree. +# +# source://prism//lib/prism/translation/parser/compiler.rb#8 +class Prism::Translation::Parser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given parser, offset cache, and + # options. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/parser/compiler.rb#39 + def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # The Parser::Builders::Default instance that is being used to build the + # AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#18 + def builder; end + + # The types of values that can be forwarded in the current scope. + # + # source://prism//lib/prism/translation/parser/compiler.rb#29 + def forwarding; end + + # Whether or not the current node is in a destructure. + # + # source://prism//lib/prism/translation/parser/compiler.rb#32 + def in_destructure; end + + # Whether or not the current node is in a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#35 + def in_pattern; end + + # The offset cache that is used to map between byte and character + # offsets in the file. + # + # source://prism//lib/prism/translation/parser/compiler.rb#26 + def offset_cache; end + + # The Parser::Base instance that is being used to build the AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#14 + def parser; end + + # The Parser::Source::Buffer instance that is holding a reference to the + # source code. + # + # source://prism//lib/prism/translation/parser/compiler.rb#22 + def source_buffer; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#58 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#52 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#64 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#70 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#101 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#76 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#82 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#107 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#148 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#158 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#164 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#202 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#208 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#213 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#219 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/parser/compiler.rb#224 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#233 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#338 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#245 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#319 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#357 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#376 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#388 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#407 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#394 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#420 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#459 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#449 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#469 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#433 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#479 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#439 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#510 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#500 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#520 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#576 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#536 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#566 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#586 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#596 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#556 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#485 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#530 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#494 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#605 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#652 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#664 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#670 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#680 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#686 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#692 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#698 + def visit_find_pattern_node(node); end + + # 0..5 + # ^^^^ + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1494 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#710 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#716 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#734 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#740 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#749 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#787 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#777 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#797 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#761 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#807 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#767 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#813 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#823 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#841 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#883 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#889 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#895 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#901 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#945 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#927 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#963 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#981 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1018 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1008 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1028 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#992 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1038 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#998 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1044 + def visit_integer_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1050 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1050 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1065 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1128 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1138 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1153 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1159 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1168 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1177 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1236 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1226 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1246 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1203 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1256 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1216 + def visit_local_variable_write_node(node); end + + # /foo/ + # ^^^^^ + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1528 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1266 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1276 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1286 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1297 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1303 + def visit_module_node(node); end + + # foo, bar = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1314 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1328 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1349 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1361 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1367 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1377 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1383 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1389 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1395 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1401 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1407 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1446 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1456 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1463 + def visit_pinned_variable_node(node); end + + # END {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1468 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1478 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1488 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1494 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1516 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1522 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1528 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1543 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1549 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1555 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1573 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1582 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1588 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1597 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1609 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1614 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1620 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1632 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1638 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1644 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1656 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1669 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1675 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1716 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1739 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1771 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1777 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1786 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1816 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1838 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1856 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1878 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1910 + def visit_yield_node(node); end + + private + + # Initialize a new compiler with the given option overrides, used to + # visit a subtree with the given options. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1924 + def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # When *, **, &, or ... are used as an argument in a method call, we + # check if they were allowed by the current context. To determine that + # we build this lookup table. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1931 + def find_forwarding(node); end + + # Because we have mutated the AST to allow for newlines in the middle of + # a rational, we need to manually handle the value here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1945 + def imaginary_value(node); end + + # Negate the value of a numeric node. This is a special case where you + # have a negative sign on one line and then a number on the next line. + # In normal Ruby, this will always be a method call. The parser gem, + # however, marks this as a numeric literal. We have to massage the tree + # here to get it into the correct form. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1954 + def numeric_negate(message_loc, receiver); end + + # Blocks can have a special set of parameters that automatically expand + # when given arrays if they have a single required parameter and no + # other parameters. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1966 + def procarg0?(parameters); end + + # Because we have mutated the AST to allow for newlines in the middle of + # a rational, we need to manually handle the value here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1979 + def rational_value(node); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1993 + def srange(location); end + + # Constructs a new source range by finding the given tokens between the + # given start offset and end offset. If the needle is not found, it + # returns nil. Importantly it does not search past newlines or comments. + # + # Note that end_offset is allowed to be nil, in which case this will + # search until the end of the string. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2008 + def srange_find(start_offset, end_offset, tokens); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1998 + def srange_offsets(start_offset, end_offset); end + + # Transform a location into a token that the parser gem expects. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2018 + def token(location); end + + # Visit a block node on a call. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2023 + def visit_block(call, block); end + + # Visit a heredoc that can be either a string or an xstring. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2057 + def visit_heredoc(node); end + + # Visit a numeric node and account for the optional sign. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2103 + def visit_numeric(node, value); end + + # Within the given block, track that we're within a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2115 + def within_pattern; end +end + +# Raised when the tree is malformed or there is a bug in the compiler. +# +# source://prism//lib/prism/translation/parser/compiler.rb#10 +class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end + +# Locations in the parser gem AST are generated using this class. We +# store a reference to its constant to make it slightly faster to look +# up. +# +# source://prism//lib/prism/translation/parser/compiler.rb#1990 +Prism::Translation::Parser::Compiler::Range = Parser::Source::Range + +# source://prism//lib/prism/translation/parser.rb#12 +Prism::Translation::Parser::Diagnostic = Parser::Diagnostic + +# Accepts a list of prism tokens and converts them into the expected +# format for the parser gem. +# +# source://prism//lib/prism/translation/parser/lexer.rb#8 +class Prism::Translation::Parser::Lexer + # Initialize the lexer with the given source buffer, prism tokens, and + # offset cache. + # + # @return [Lexer] a new instance of Lexer + # + # source://prism//lib/prism/translation/parser/lexer.rb#204 + def initialize(source_buffer, lexed, offset_cache); end + + # An array of tuples that contain prism tokens and their associated lex + # state when they were lexed. + # + # source://prism//lib/prism/translation/parser/lexer.rb#197 + def lexed; end + + # A hash that maps offsets in bytes to offsets in characters. + # + # source://prism//lib/prism/translation/parser/lexer.rb#200 + def offset_cache; end + + # The Parser::Source::Buffer that the tokens were lexed from. + # + # source://prism//lib/prism/translation/parser/lexer.rb#193 + def source_buffer; end + + # Convert the prism tokens into the expected format for the parser gem. + # + # source://prism//lib/prism/translation/parser/lexer.rb#214 + def to_a; end + + private + + # Parse a complex from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#387 + def parse_complex(value); end + + # Parse a float from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#380 + def parse_float(value); end + + # Parse an integer from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#373 + def parse_integer(value); end + + # Parse a rational from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#402 + def parse_rational(value); end +end + +# These constants represent flags in our lex state. We really, really +# don't want to be using them and we really, really don't want to be +# exposing them as part of our public API. Unfortunately, we don't have +# another way of matching the exact tokens that the parser gem expects +# without them. We should find another way to do this, but in the +# meantime we'll hide them from the documentation and mark them as +# private constants. +# +# source://prism//lib/prism/translation/parser/lexer.rb#187 +Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#188 +Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#210 +Prism::Translation::Parser::Lexer::Range = Parser::Source::Range + +# The direct translating of types between the two lexers. +# +# source://prism//lib/prism/translation/parser/lexer.rb#10 +Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) + +# The parser gem has a list of diagnostics with a hard-coded set of error +# messages. We create our own diagnostic class in order to set our own +# error messages. +# +# source://prism//lib/prism/translation/parser.rb#18 +class Prism::Translation::Parser::PrismDiagnostic < ::Parser::Diagnostic + # Initialize a new diagnostic with the given message and location. + # + # @return [PrismDiagnostic] a new instance of PrismDiagnostic + # + # source://prism//lib/prism/translation/parser.rb#23 + def initialize(message, level, reason, location); end + + # This is the cached message coming from prism. + # + # source://prism//lib/prism/translation/parser.rb#20 + def message; end +end + +# source://prism//lib/prism/translation/parser.rb#29 +Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# This class provides 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. To use this class, you +# treat `Prism::Translation::Ripper` effectively as you would treat the +# `Ripper` class. +# +# Note that this class will serve the most common use cases, but Ripper's +# API is extensive and undocumented. It relies on reporting the state of the +# parser at any given time. We do our best to replicate that here, but +# because it is a different architecture it is not possible to perfectly +# replicate the behavior of Ripper. +# +# The main known difference is that we may omit dispatching some events in +# some cases. This impacts the following events: +# +# - on_assign_error +# - on_comma +# - on_ignored_nl +# - on_ignored_sp +# - on_kw +# - on_label_end +# - on_lbrace +# - on_lbracket +# - on_lparen +# - on_nl +# - on_op +# - on_operator_ambiguous +# - on_rbrace +# - on_rbracket +# - on_rparen +# - on_semicolon +# - on_sp +# - on_symbeg +# - on_tstring_beg +# - on_tstring_end +# +# source://prism//lib/prism/translation/ripper.rb#43 +class Prism::Translation::Ripper < ::Prism::Compiler + # Create a new Translation::Ripper object with the given source. + # + # @return [Ripper] a new instance of Ripper + # + # source://prism//lib/prism/translation/ripper.rb#444 + def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # The current column number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#441 + def column; end + + # True if the parser encountered an error during parsing. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#457 + sig { returns(T::Boolean) } + def error?; end + + # The filename of the source being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#435 + def filename; end + + # The current line number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#438 + def lineno; end + + # Parse the source and return the result. + # + # source://prism//lib/prism/translation/ripper.rb#462 + sig { returns(T.untyped) } + def parse; end + + # The source that is being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#432 + def source; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#561 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#551 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#585 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#605 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#796 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#615 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#775 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#803 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#816 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#825 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#832 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#896 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#902 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode. + # + # source://prism//lib/prism/translation/ripper.rb#908 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#944 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ripper.rb#958 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#982 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1194 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1002 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1172 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1216 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1238 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1263 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1286 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1273 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1299 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1352 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1338 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1366 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1317 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1380 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1327 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1422 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1408 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1436 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1523 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1457 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1509 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1537 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1551 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1480 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1387 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1450 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1397 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1560 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1607 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1614 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1630 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1651 + def visit_embedded_variable_node(node); end + + # Visit an EnsureNode node. + # + # source://prism//lib/prism/translation/ripper.rb#1662 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1680 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1687 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1712 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1726 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1732 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1749 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1756 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1766 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1815 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1801 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1829 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1780 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1843 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1790 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1850 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1865 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1907 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1943 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1949 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#1954 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1961 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1996 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1979 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2013 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2030 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2072 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2058 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2086 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2040 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2100 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2047 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2107 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2113 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2132 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2151 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2179 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2192 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2222 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2227 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2239 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/ripper.rb#2253 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2350 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2336 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2364 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2313 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2378 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2325 + def visit_local_variable_write_node(node); end + + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2385 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2400 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2409 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2418 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#2424 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2430 + def visit_module_node(node); end + + # (foo, bar), bar = qux + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2447 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2501 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2521 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2535 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2542 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2551 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2556 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2563 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2573 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2583 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2593 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2620 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2634 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2643 + def visit_pinned_variable_node(node); end + + # END {} + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2649 + def visit_post_execution_node(node); end + + # BEGIN {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2664 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/ripper.rb#2678 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2689 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2703 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2709 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2716 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2738 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2745 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2752 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2762 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2820 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2832 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2842 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2856 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/ripper.rb#2862 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2868 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2878 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2885 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2892 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2905 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/ripper.rb#2910 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2927 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3059 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3080 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3104 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3111 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3123 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3151 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3175 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3196 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3220 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3243 + def visit_yield_node(node); end + + private + + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper.rb#3387 + def _dispatch_0; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def _dispatch_1(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def _dispatch_2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def _dispatch_3(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def _dispatch_4(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def _dispatch_5(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3393 + def _dispatch_7(_, _, _, _, _, _, _); end + + # This method is responsible for updating lineno and column information + # to reflect the current node. + # + # This method could be drastically improved with some caching on the start + # of every line, but for now it's good enough. + # + # source://prism//lib/prism/translation/ripper.rb#3377 + def bounds(location); end + + # Returns true if the given node is a command node. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#1163 + def command?(node); end + + # This method is called when the parser found syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#3415 + def compile_error(msg); end + + # This method is provided by the Ripper C extension. It is called when a + # string needs to be dedented because of a tilde heredoc. It is expected + # that it will modify the string in place and return the number of bytes + # that were removed. + # + # source://prism//lib/prism/translation/ripper.rb#3430 + def dedent_string(string, width); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_BEGIN(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_CHAR(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_END(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on___end__(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_alias_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_aref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_aref_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_arg_ambiguous(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_arg_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_args_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_args_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_args_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_args_forward; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_array(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_aryptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_assign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_assign_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_assoc_new(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_assoc_splat(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_assoclist_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_backref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_backtick(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_bare_assoc_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_begin(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_binary(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_block_var(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_blockarg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_bodystmt(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_brace_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_break(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_call(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_case(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_class(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_class_name_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_comma(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_command(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_command_call(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_comment(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_const(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_const_path_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_const_path_ref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_cvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_def(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_defined(_); end + + # source://prism//lib/prism/translation/ripper.rb#3392 + def on_defs(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_do_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_dot2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_dot3(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_dyna_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_else(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_elsif(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_embdoc(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_embdoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_embdoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_embexpr_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_embexpr_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_embvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_ensure(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_excessed_comma; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_fcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_field(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_float(_); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_fndptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_for(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_gvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_heredoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_heredoc_dedent(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_heredoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_hshptn(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_ident(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_if(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_if_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_ifop(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_ignored_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_ignored_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_imaginary(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_in(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_int(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_ivar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_kw(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_kwrest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_label(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_label_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_lambda(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_lbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_lbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_lparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_magic_comment(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_massign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_method_add_arg(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_method_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_mlhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_mlhs_add_post(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_mlhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_mlhs_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_module(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_mrhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_mrhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_mrhs_new_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_next(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_nokw_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_op(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_opassign(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_operator_ambiguous(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_param_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3393 + def on_params(_, _, _, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_parse_error(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_period(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_program(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_qsymbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_qsymbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_qwords_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_qwords_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_rational(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_rbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_rbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_redo; end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_regexp_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_regexp_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_regexp_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_regexp_literal(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_rescue(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_rescue_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_rest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_retry; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_return(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_return0; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_rparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_sclass(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_semicolon(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_stmts_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_string_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_string_concat(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_string_content; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_string_dvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_string_embexpr(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_string_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_super(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_symbeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_symbol_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_symbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_symbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_tlambda(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_tlambeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_top_const_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_top_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_tstring_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_tstring_content(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_tstring_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_unary(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_undef(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_unless(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_unless_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_until(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_until_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_var_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_var_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_var_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_vcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_void_stmt; end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_when(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_while(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_while_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_word_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_words_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_words_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_words_sep(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_xstring_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_xstring_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_xstring_new; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_yield(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_yield0; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_zsuper; end + + # Lazily initialize the parse result. + # + # source://prism//lib/prism/translation/ripper.rb#3269 + def result; end + + # Returns true if there is a comma between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3282 + def trailing_comma?(left, right); end + + # Visit one side of an alias global variable node. + # + # source://prism//lib/prism/translation/ripper.rb#570 + def visit_alias_global_variable_node_value(node); end + + # Visit a list of elements, like the elements of an array or arguments. + # + # source://prism//lib/prism/translation/ripper.rb#756 + def visit_arguments(elements); end + + # Visit the clauses of a begin node to form an on_bodystmt call. + # + # source://prism//lib/prism/translation/ripper.rb#840 + def visit_begin_node_clauses(location, node, allow_newline); end + + # Visit the body of a structure that can have either a set of statements + # or statements wrapped in rescue/else/ensure. + # + # source://prism//lib/prism/translation/ripper.rb#875 + def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end + + # Visit the arguments and block of a call node and return the arguments + # and block as they should be used. + # + # source://prism//lib/prism/translation/ripper.rb#1136 + def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end + + # Visit a constant path that is part of a write node. + # + # source://prism//lib/prism/translation/ripper.rb#1489 + def visit_constant_path_write_node_target(node); end + + # Visit a destructured positional parameter node. + # + # source://prism//lib/prism/translation/ripper.rb#2607 + def visit_destructured_parameter_node(node); end + + # Visit a string that is expressed using a <<~ heredoc. + # + # source://prism//lib/prism/translation/ripper.rb#2978 + def visit_heredoc_node(parts, base); end + + # Ripper gives back the escaped string content but strips out the common + # leading whitespace. Prism gives back the unescaped string content and + # a location for the escaped string content. Unfortunately these don't + # work well together, so here we need to re-derive the common leading + # whitespace. + # + # source://prism//lib/prism/translation/ripper.rb#2953 + def visit_heredoc_node_whitespace(parts); end + + # Visit a heredoc node that is representing a string. + # + # source://prism//lib/prism/translation/ripper.rb#3024 + def visit_heredoc_string_node(node); end + + # Visit a heredoc node that is representing an xstring. + # + # source://prism//lib/prism/translation/ripper.rb#3041 + def visit_heredoc_x_string_node(node); end + + # Visit the targets of a multi-target node. + # + # source://prism//lib/prism/translation/ripper.rb#2460 + def visit_multi_target_node_targets(lefts, rest, rights, skippable); end + + # Visit a node that represents a number. We need to explicitly handle the + # unary - operator. + # + # source://prism//lib/prism/translation/ripper.rb#3321 + def visit_number_node(node); end + + # Visit a pattern within a pattern match. This is used to bypass the + # parenthesis node that can be used to wrap patterns. + # + # source://prism//lib/prism/translation/ripper.rb#595 + def visit_pattern_node(node); end + + # Visit the list of statements of a statements node. We support nil + # statements in the list. This would normally not be allowed by the + # structure of the prism parse tree, but we manually add them here so that + # we can mirror Ripper's void stmt. + # + # source://prism//lib/prism/translation/ripper.rb#2919 + def visit_statements_node_body(body); end + + # Visit an individual part of a string-like node. + # + # source://prism//lib/prism/translation/ripper.rb#2211 + def visit_string_content(part); end + + # Visit the string content of a particular node. This method is used to + # split into the various token types. + # + # source://prism//lib/prism/translation/ripper.rb#3294 + def visit_token(token, allow_keywords = T.unsafe(nil)); end + + # Dispatch a words_sep event that contains the space between the elements + # of list literals. + # + # source://prism//lib/prism/translation/ripper.rb#745 + def visit_words_sep(opening_loc, previous, current); end + + # Visit a node that represents a write value. This is used to handle the + # special case of an implicit array that is generated without brackets. + # + # source://prism//lib/prism/translation/ripper.rb#3339 + def visit_write_value(node); end + + # Returns true if there is a semicolon between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3287 + def void_stmt?(left, right, allow_newline); end + + # This method is called when weak warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # source://prism//lib/prism/translation/ripper.rb#3406 + def warn(fmt, *args); end + + # This method is called when strong warning is produced by the parser. + # +fmt+ and +args+ is printf style. + # + # source://prism//lib/prism/translation/ripper.rb#3411 + def warning(fmt, *args); end + + class << self + # Tokenizes the Ruby program and returns an array of an array, + # which is formatted like + # [[lineno, column], type, token, state]. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.lex("def m(a) nil end") + # #=> [[[1, 0], :on_kw, "def", FNAME ], + # [[1, 3], :on_sp, " ", FNAME ], + # [[1, 4], :on_ident, "m", ENDFN ], + # [[1, 5], :on_lparen, "(", BEG|LABEL], + # [[1, 6], :on_ident, "a", ARG ], + # [[1, 7], :on_rparen, ")", ENDFN ], + # [[1, 8], :on_sp, " ", BEG ], + # [[1, 9], :on_kw, "nil", END ], + # [[1, 12], :on_sp, " ", END ], + # [[1, 13], :on_kw, "end", END ]] + # + # source://prism//lib/prism/translation/ripper.rb#72 + def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses the given Ruby program read from +src+. + # +src+ must be a String or an IO or a object with a #gets method. + # + # source://prism//lib/prism/translation/ripper.rb#46 + def parse(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # Returns more readable tree rather than Ripper.sexp_raw. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp("def m(a) nil end") + # #=> [:program, + # [[:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], + # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#381 + def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp_raw("def m(a) nil end") + # #=> [:program, + # [:stmts_add, + # [:stmts_new], + # [:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], + # [:bodystmt, + # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], + # nil, + # nil, + # nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#416 + def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + end +end + +# A list of all of the Ruby binary operators. +# +# source://prism//lib/prism/translation/ripper.rb#337 +Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# This array contains name of all ripper events. +# +# source://prism//lib/prism/translation/ripper.rb#289 +Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) + +# A list of all of the Ruby keywords. +# +# source://prism//lib/prism/translation/ripper.rb#292 +Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) + +# This array contains name of parser events. +# +# source://prism//lib/prism/translation/ripper.rb#283 +Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the parser events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#84 +Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This array contains name of scanner events. +# +# source://prism//lib/prism/translation/ripper.rb#286 +Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the scanner events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#227 +Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#10 +class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper/sexp.rb#13 + def error; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_BEGIN(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_CHAR(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_END(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on___end__(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_forward(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_array(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aryptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_splat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoclist_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backref(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backtick(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bare_assoc_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_begin(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_binary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_block_var(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_blockarg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bodystmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_brace_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_break(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_case(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class_name_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comma(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comment(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_const(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_cvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_def(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defined(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defs(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_do_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot2(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot3(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dyna_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_else(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_elsif(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ensure(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_excessed_comma(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_float(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fndptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_for(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_gvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hshptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ident(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ifop(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_imaginary(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_in(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_int(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ivar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_kw(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_kwrest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_lambda(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_magic_comment(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_massign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_arg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_post(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_module(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_next(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_nokw_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_op(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_opassign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_operator_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_param_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_params(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_period(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_program(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qsymbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qwords_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rational(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_redo(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_retry(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_sclass(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_semicolon(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_concat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_content(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_dvar(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_embexpr(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_super(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambda(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_content(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_undef(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_vcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_void_stmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_when(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_sep(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_zsuper(*args); end + + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def compile_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#17 + def dedent_element(e, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#24 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_parse_error(mesg); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#74 +class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def _dispatch_event_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def _dispatch_event_push(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_args_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#79 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mlhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#109 + def on_mlhs_add_post(list, post); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#105 + def on_mlhs_add_star(list, star); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#101 + def on_mlhs_paren(list); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mrhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qsymbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qwords_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_regexp_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_stmts_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_string_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_symbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_word_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_words_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_xstring_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_xstring_new; end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://prism//lib/prism/node.rb#18098 +class Prism::TrueNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [TrueNode] a new instance of TrueNode + # + # source://prism//lib/prism/node.rb#18100 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18174 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18107 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18112 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18122 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18117 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> TrueNode + # + # source://prism//lib/prism/node.rb#18127 + sig { params(location: Prism::Location).returns(Prism::TrueNode) } + def copy(location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18112 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # + # source://prism//lib/prism/node.rb#18135 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18140 + sig { override.returns(String) } + def inspect; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18158 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18168 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18183 +class Prism::UndefNode < ::Prism::Node + # def initialize: (Array[SymbolNode | InterpolatedSymbolNode] names, Location keyword_loc, Location location) -> void + # + # @return [UndefNode] a new instance of UndefNode + # + # source://prism//lib/prism/node.rb#18185 + sig do + params( + source: Prism::Source, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, names, keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18276 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18194 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18199 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18209 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18204 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode + # + # source://prism//lib/prism/node.rb#18214 + sig do + params( + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::UndefNode) + end + def copy(names: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18199 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#18222 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18242 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18237 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18230 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] + # + # source://prism//lib/prism/node.rb#18227 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } + def names; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18260 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18270 + def type; end + end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18291 +class Prism::UnlessNode < ::Prism::Node + # def initialize: (Location keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://prism//lib/prism/node.rb#18293 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18461 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18306 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18315 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18329 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18320 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#18393 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: ElseNode?, ?end_keyword_loc: Location?, ?location: Location) -> UnlessNode + # + # source://prism//lib/prism/node.rb#18334 + sig do + params( + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::UnlessNode) + end + def copy(keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18315 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#18342 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18422 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword, if present. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#18399 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18427 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18412 + sig { returns(String) } + def keyword; end + + # The location of the `unless` keyword. + # + # unless cond then bar end + # ^^^^^^ + # + # bar unless cond + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#18353 + sig { returns(Prism::Location) } + def keyword_loc; end + + # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # unless cond then bar end + # ^^^^ + # + # bar unless cond + # ^^^^ + # + # source://prism//lib/prism/node.rb#18366 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#18310 + def set_newline_flag(newline_marked); end + + # The body of statements that will executed if the unless condition is + # falsey. Will be `nil` if no body is provided. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#18387 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18417 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword, if present. + # unless cond then bar end ^^^^ + # + # source://prism//lib/prism/node.rb#18370 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18445 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18455 + def type; end + end +end + +# Represents the use of the `until` keyword, either in the block form or the modifier form. +# +# bar until foo +# ^^^^^^^^^^^^^ +# +# until foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18479 +class Prism::UntilNode < ::Prism::Node + # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void + # + # @return [UntilNode] a new instance of UntilNode + # + # source://prism//lib/prism/node.rb#18481 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end + def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18612 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18493 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18563 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18502 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18573 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18544 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18515 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18507 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> UntilNode + # + # source://prism//lib/prism/node.rb#18520 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::UntilNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18502 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#18528 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18578 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18568 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18537 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#18557 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#18497 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18560 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18596 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18533 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18606 + def type; end + end +end + +# The version constant is set by reading the result of calling pm_version. +Prism::VERSION = T.let(T.unsafe(nil), String) + +# A visitor is a class that provides a default implementation for every accept +# method defined on the nodes. This means it can walk a tree without the +# caller needing to define any special handling. This allows you to handle a +# subset of the tree, while still walking the whole tree. +# +# For example, to find all of the method calls that call the `foo` method, you +# could write: +# +# class FooCalls < Prism::Visitor +# def visit_call_node(node) +# if node.name == "foo" +# # Do something with the node +# end +# +# # Call super so that the visitor continues walking the tree +# super +# end +# end +# +# source://prism//lib/prism/visitor.rb#54 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AndNode).void } + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArrayNode).void } + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AssocNode).void } + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BeginNode).void } + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockNode).void } + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BreakNode).void } + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallNode).void } + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # Visit a CaseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CaseNode).void } + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassNode).void } + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::DefNode).void } + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::DefinedNode).void } + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ElseNode).void } + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FalseNode).void } + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FloatNode).void } + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForNode).void } + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::HashNode).void } + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IfNode).void } + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # Visit a InNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InNode).void } + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IntegerNode).void } + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # Visit a ItParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ItParametersNode).void } + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MissingNode).void } + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ModuleNode).void } + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NextNode).void } + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NilNode).void } + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OrNode).void } + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ProgramNode).void } + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RangeNode).void } + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RationalNode).void } + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RedoNode).void } + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RescueNode).void } + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RetryNode).void } + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ReturnNode).void } + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SelfNode).void } + def visit_self_node(node); end + + # Visit a ShareableConstantNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ShareableConstantNode).void } + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SplatNode).void } + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::StatementsNode).void } + def visit_statements_node(node); end + + # Visit a StringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::StringNode).void } + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SuperNode).void } + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::TrueNode).void } + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UndefNode).void } + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UnlessNode).void } + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UntilNode).void } + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::WhenNode).void } + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::WhileNode).void } + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::XStringNode).void } + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::YieldNode).void } + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#18628 +class Prism::WhenNode < ::Prism::Node + # def initialize: (Location keyword_loc, Array[Prism::node] conditions, Location? then_keyword_loc, StatementsNode? statements, Location location) -> void + # + # @return [WhenNode] a new instance of WhenNode + # + # source://prism//lib/prism/node.rb#18630 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, conditions, then_keyword_loc, statements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18747 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18641 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18646 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18659 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18651 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#18684 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # def copy: (?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?location: Location) -> WhenNode + # + # source://prism//lib/prism/node.rb#18664 + sig do + params( + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::WhenNode) + end + def copy(keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18646 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#18672 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18713 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18703 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18677 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18700 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#18708 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#18687 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18731 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18741 + def type; end + end +end + +# Represents the use of the `while` keyword, either in the block form or the modifier form. +# +# bar while foo +# ^^^^^^^^^^^^^ +# +# while foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18764 +class Prism::WhileNode < ::Prism::Node + # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void + # + # @return [WhileNode] a new instance of WhileNode + # + # source://prism//lib/prism/node.rb#18766 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end + def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#18897 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18778 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_modifier?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18848 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18787 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#18858 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#18829 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18800 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18792 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> WhileNode + # + # source://prism//lib/prism/node.rb#18805 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::WhileNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18787 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } + # + # source://prism//lib/prism/node.rb#18813 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#18863 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18853 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18822 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#18842 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#18782 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#18845 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18881 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18818 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18891 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://prism//lib/prism/node.rb#18911 +class Prism::XStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # + # @return [XStringNode] a new instance of XStringNode + # + # source://prism//lib/prism/node.rb#18913 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19045 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#18925 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18930 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#19006 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#18976 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#18940 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#18935 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#19001 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#18969 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> XStringNode + # + # source://prism//lib/prism/node.rb#18945 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::XStringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#18930 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # + # source://prism//lib/prism/node.rb#18953 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18991 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18986 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#19011 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#18996 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#18962 + sig { returns(Prism::Location) } + def opening_loc; end + + # Occasionally it's helpful to treat a string as if it were interpolated so + # that there's a consistent interface for working with strings. + # + # source://prism//lib/prism/node_ext.rb#83 + sig { returns(Prism::InterpolatedXStringNode) } + def to_interpolated; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19029 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#18983 + sig { returns(String) } + def unescaped; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18958 + sig { returns(Integer) } + def flags; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19039 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#19059 +class Prism::YieldNode < ::Prism::Node + # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void + # + # @return [YieldNode] a new instance of YieldNode + # + # source://prism//lib/prism/node.rb#19061 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#19192 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#19072 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#19127 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#19077 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#19089 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#19082 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?location: Location) -> YieldNode + # + # source://prism//lib/prism/node.rb#19094 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::YieldNode) + end + def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#19077 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location } + # + # source://prism//lib/prism/node.rb#19102 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#19158 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19143 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19107 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#19148 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#19114 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#19153 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#19130 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19176 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19186 + def type; end + end +end diff --git a/sorbet/rbi/gems/racc@1.6.2.rbi b/sorbet/rbi/gems/racc@1.6.2.rbi new file mode 100644 index 0000000..c2b767d --- /dev/null +++ b/sorbet/rbi/gems/racc@1.6.2.rbi @@ -0,0 +1,151 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `racc` gem. +# Please instead update this file by running `bin/tapioca gem racc`. + + +# source://racc//racc/parser.rb#23 +ParseError = Racc::ParseError + +# source://racc//racc/info.rb#16 +Racc::Copyright = T.let(T.unsafe(nil), String) + +class Racc::Parser + # source://racc//racc/parser.rb#281 + def _racc_do_parse_rb(arg, in_debug); end + + # source://racc//racc/parser.rb#481 + def _racc_do_reduce(arg, act); end + + # common + # + # source://racc//racc/parser.rb#384 + def _racc_evalact(act, arg); end + + # source://racc//racc/parser.rb#234 + def _racc_init_sysvars; end + + # source://racc//racc/parser.rb#222 + def _racc_setup; end + + # source://racc//racc/parser.rb#331 + def _racc_yyparse_rb(recv, mid, arg, c_debug); end + + # The method to fetch next token. + # If you use #do_parse method, you must implement #next_token. + # + # The format of return value is [TOKEN_SYMBOL, VALUE]. + # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT + # for 'IDENT'. ";" (String) for ';'. + # + # The final symbol (End of file) must be false. + # + # @raise [NotImplementedError] + # + # source://racc//racc/parser.rb#277 + def next_token; end + + # This method is called when a parse error is found. + # + # ERROR_TOKEN_ID is an internal ID of token which caused error. + # You can get string representation of this ID by calling + # #token_to_str. + # + # ERROR_VALUE is a value of error token. + # + # value_stack is a stack of symbol values. + # DO NOT MODIFY this object. + # + # This method raises ParseError by default. + # + # If this method returns, parsers enter "error recovering mode". + # + # @raise [ParseError] + # + # source://racc//racc/parser.rb#537 + def on_error(t, val, vstack); end + + # source://racc//racc/parser.rb#586 + def racc_accept; end + + # source://racc//racc/parser.rb#591 + def racc_e_pop(state, tstack, vstack); end + + # source://racc//racc/parser.rb#598 + def racc_next_state(curstate, state); end + + # source://racc//racc/parser.rb#604 + def racc_print_stacks(t, v); end + + # source://racc//racc/parser.rb#613 + def racc_print_states(s); end + + # For debugging output + # + # source://racc//racc/parser.rb#560 + def racc_read_token(t, tok, val); end + + # source://racc//racc/parser.rb#573 + def racc_reduce(toks, sim, tstack, vstack); end + + # source://racc//racc/parser.rb#567 + def racc_shift(tok, tstack, vstack); end + + # source://racc//racc/parser.rb#620 + def racc_token2str(tok); end + + # Convert internal ID of token symbol to the string. + # + # source://racc//racc/parser.rb#626 + def token_to_str(t); end + + # Exit parser. + # Return value is +Symbol_Value_Stack[0]+. + # + # source://racc//racc/parser.rb#550 + def yyaccept; end + + # Leave error recovering mode. + # + # source://racc//racc/parser.rb#555 + def yyerrok; end + + # Enter error recovering mode. + # This method does not call #on_error. + # + # source://racc//racc/parser.rb#544 + def yyerror; end + + class << self + # source://racc//racc/parser.rb#218 + def racc_runtime_type; end + end +end + +# source://racc//racc/parser.rb#207 +Racc::Parser::Racc_Main_Parsing_Routine = T.let(T.unsafe(nil), Symbol) + +# source://racc//racc/parser.rb#209 +Racc::Parser::Racc_Runtime_Core_Version = T.let(T.unsafe(nil), String) + +# source://racc//racc/parser.rb#189 +Racc::Parser::Racc_Runtime_Core_Version_R = T.let(T.unsafe(nil), String) + +# source://racc//racc/parser.rb#210 +Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) + +# source://racc//racc/parser.rb#188 +Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) + +# source://racc//racc/parser.rb#208 +Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) + +# source://racc//racc/parser.rb#183 +Racc::Racc_No_Extensions = T.let(T.unsafe(nil), FalseClass) + +# source://racc//racc/info.rb#14 +Racc::VERSION = T.let(T.unsafe(nil), String) + +# source://racc//racc/info.rb#15 +Racc::Version = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rainbow@3.1.1.rbi b/sorbet/rbi/gems/rainbow@3.1.1.rbi new file mode 100644 index 0000000..b042218 --- /dev/null +++ b/sorbet/rbi/gems/rainbow@3.1.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rainbow` gem. +# Please instead update this file by running `bin/tapioca gem rainbow`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rake@13.0.6.rbi b/sorbet/rbi/gems/rake@13.0.6.rbi new file mode 100644 index 0000000..0330c4b --- /dev/null +++ b/sorbet/rbi/gems/rake@13.0.6.rbi @@ -0,0 +1,3028 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rake` gem. +# Please instead update this file by running `bin/tapioca gem rake`. + + +# :stopdoc: +# +# Some top level Constants. +# +# source://rake//lib/rake.rb#70 +FileList = Rake::FileList + +# -- +# This a FileUtils extension that defines several additional commands to be +# added to the FileUtils utility functions. +# +# source://rake//lib/rake/file_utils.rb#8 +module FileUtils + # Run a Ruby interpreter with the given arguments. + # + # Example: + # ruby %{-pe '$_.upcase!' ; rm # -rf /. + # + # If a block is given, upon command completion the block is called with an + # OK flag (true on a zero exit status) and a Process::Status object. + # Without a block a RuntimeError is raised when the command exits non-zero. + # + # Examples: + # + # sh 'ls -ltr' + # + # sh 'ls', 'file with spaces' + # + # # check exit status after command runs + # sh %{grep pattern file} do |ok, res| + # if !ok + # puts "pattern not found (status = #{res.exitstatus})" + # end + # end + # + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # Split a file path into individual directory names. + # + # Example: + # split_all("a/b/c") => ['a', 'b', 'c'] + # + # source://rake//lib/rake/file_utils.rb#128 + def split_all(path); end + + private + + # source://rake//lib/rake/file_utils.rb#61 + def create_shell_runner(cmd); end + + # source://rake//lib/rake/file_utils.rb#86 + def set_verbose_option(options); end + + # source://rake//lib/rake/file_utils.rb#73 + def sh_show_command(cmd); end +end + +# source://rake//lib/rake/file_utils.rb#108 +FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) + +# Path to the currently running Ruby program +# +# source://rake//lib/rake/file_utils.rb#10 +FileUtils::RUBY = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/ext/core.rb#2 +class Module + # Check for an existing method in the current class before extending. If + # the method already exists, then a warning is printed and the extension is + # not added. Otherwise the block is yielded and any definitions in the + # block will take effect. + # + # Usage: + # + # class String + # rake_extension("xyz") do + # def xyz + # ... + # end + # end + # end + # + # source://rake//lib/rake/ext/core.rb#18 + def rake_extension(method); end +end + +# source://rake//lib/rake.rb#24 +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + class << self + # Add files to the rakelib list + # + # source://rake//lib/rake/rake_module.rb#33 + def add_rakelib(*files); end + + # Current Rake Application + # + # source://rake//lib/rake/rake_module.rb#8 + def application; end + + # Set the current Rake application object. + # + # source://rake//lib/rake/rake_module.rb#13 + def application=(app); end + + # Yield each file or directory component. + # + # source://rake//lib/rake/file_list.rb#418 + def each_dir_parent(dir); end + + # Convert Pathname and Pathname-like objects to strings; + # leave everything else alone + # + # source://rake//lib/rake/file_list.rb#429 + def from_pathname(path); end + + # Load a rakefile. + # + # source://rake//lib/rake/rake_module.rb#28 + def load_rakefile(path); end + + # Return the original directory where the Rake application was started. + # + # source://rake//lib/rake/rake_module.rb#23 + def original_dir; end + + # source://rake//lib/rake/rake_module.rb#17 + def suggested_thread_count; end + + # Make +block_application+ the default rake application inside a block so + # you can load rakefiles into a different application. + # + # This is useful when you want to run rake tasks inside a library without + # running rake in a sub-shell. + # + # Example: + # + # Dir.chdir 'other/directory' + # + # other_rake = Rake.with_application do |rake| + # rake.load_rakefile + # end + # + # puts other_rake.tasks + # + # source://rake//lib/rake/rake_module.rb#54 + def with_application(block_application = T.unsafe(nil)); end + end +end + +# Rake main application object. When invoking +rake+ from the +# command line, a Rake::Application object is created and run. +# +# source://rake//lib/rake/application.rb#19 +class Rake::Application + include ::Rake::TaskManager + include ::Rake::TraceOutput + + # Initialize a Rake::Application object. + # + # @return [Application] a new instance of Application + # + # source://rake//lib/rake/application.rb#49 + def initialize; end + + # Add a file to the list of files to be imported. + # + # source://rake//lib/rake/application.rb#777 + def add_import(fn); end + + # Add a loader to handle imported files ending in the extension + # +ext+. + # + # source://rake//lib/rake/application.rb#139 + def add_loader(ext, loader); end + + # Collect the list of tasks on the command line. If no tasks are + # given, return a list containing only the default task. + # Environmental assignments are processed at this time as well. + # + # `args` is the list of arguments to peruse to get the list of tasks. + # It should be the command line that was given to rake, less any + # recognised command-line options, which OptionParser.parse will + # have taken care of already. + # + # source://rake//lib/rake/application.rb#758 + def collect_command_line_tasks(args); end + + # Default task name ("default"). + # (May be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#772 + def default_task_name; end + + # Warn about deprecated usage. + # + # Example: + # Rake.application.deprecate("import", "Rake.import", caller.first) + # + # source://rake//lib/rake/application.rb#258 + def deprecate(old_usage, new_usage, call_site); end + + # source://rake//lib/rake/application.rb#222 + def display_cause_details(ex); end + + # Display the error message that caused the exception. + # + # source://rake//lib/rake/application.rb#206 + def display_error_message(ex); end + + # source://rake//lib/rake/application.rb#245 + def display_exception_backtrace(ex); end + + # source://rake//lib/rake/application.rb#214 + def display_exception_details(ex); end + + # source://rake//lib/rake/application.rb#229 + def display_exception_details_seen; end + + # source://rake//lib/rake/application.rb#237 + def display_exception_message_details(ex); end + + # Display the tasks and prerequisites + # + # source://rake//lib/rake/application.rb#381 + def display_prerequisites; end + + # Display the tasks and comments. + # + # source://rake//lib/rake/application.rb#298 + def display_tasks_and_comments; end + + # Calculate the dynamic width of the + # + # source://rake//lib/rake/application.rb#349 + def dynamic_width; end + + # source://rake//lib/rake/application.rb#353 + def dynamic_width_stty; end + + # source://rake//lib/rake/application.rb#357 + def dynamic_width_tput; end + + # Exit the program because of an unhandled exception. + # (may be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#201 + def exit_because_of_exception(ex); end + + # source://rake//lib/rake/application.rb#678 + def find_rakefile_location; end + + # Read and handle the command line options. Returns the command line + # arguments that we didn't understand, which should (in theory) be just + # task names and env vars. + # + # source://rake//lib/rake/application.rb#644 + def handle_options(argv); end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#233 + def has_cause?(ex); end + + # True if one of the files in RAKEFILES is in the current directory. + # If a match is found, it is copied into @rakefile. + # + # source://rake//lib/rake/application.rb#274 + def have_rakefile; end + + # Initialize the command line parameters and app name. + # + # source://rake//lib/rake/application.rb#88 + def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end + + # Invokes a task with arguments that are extracted from +task_string+ + # + # source://rake//lib/rake/application.rb#157 + def invoke_task(task_string); end + + # Load the pending list of imported files. + # + # source://rake//lib/rake/application.rb#782 + def load_imports; end + + # Find the rakefile and then load it and any pending imports. + # + # source://rake//lib/rake/application.rb#102 + def load_rakefile; end + + # The name of the application (typically 'rake') + # + # source://rake//lib/rake/application.rb#24 + def name; end + + # Application options from the command line + # + # source://rake//lib/rake/application.rb#145 + def options; end + + # The original directory where rake was invoked. + # + # source://rake//lib/rake/application.rb#27 + def original_dir; end + + # source://rake//lib/rake/application.rb#163 + def parse_task_string(string); end + + # source://rake//lib/rake/application.rb#690 + def print_rakefile_directory(location); end + + # Similar to the regular Ruby +require+ command, but will check + # for *.rake files in addition to *.rb files. + # + # source://rake//lib/rake/application.rb#664 + def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end + + # Name of the actual rakefile used. + # + # source://rake//lib/rake/application.rb#30 + def rakefile; end + + # source://rake//lib/rake/application.rb#798 + def rakefile_location(backtrace = T.unsafe(nil)); end + + # source://rake//lib/rake/application.rb#695 + def raw_load_rakefile; end + + # Run the Rake application. The run method performs the following + # three steps: + # + # * Initialize the command line options (+init+). + # * Define the tasks (+load_rakefile+). + # * Run the top level tasks (+top_level+). + # + # If you wish to build a custom rake command, you should call + # +init+ on your application. Then define any tasks. Finally, + # call +top_level+ to run your top level tasks. + # + # source://rake//lib/rake/application.rb#79 + def run(argv = T.unsafe(nil)); end + + # Run the given block with the thread startup and shutdown. + # + # source://rake//lib/rake/application.rb#122 + def run_with_threads; end + + # source://rake//lib/rake/application.rb#807 + def set_default_options; end + + # Provide standard exception handling for the given block. + # + # source://rake//lib/rake/application.rb#185 + def standard_exception_handling; end + + # A list of all the standard options used in rake, suitable for + # passing to OptionParser. + # + # source://rake//lib/rake/application.rb#402 + def standard_rake_options; end + + # The directory path containing the system wide rakefiles. + # + # source://rake//lib/rake/application.rb#727 + def system_dir; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns=(_arg0); end + + # source://rake//lib/rake/application.rb#337 + def terminal_width; end + + # Return the thread pool used for multithreaded processing. + # + # source://rake//lib/rake/application.rb#150 + def thread_pool; end + + # Run the top level tasks of a Rake application. + # + # source://rake//lib/rake/application.rb#109 + def top_level; end + + # List of the top level task names (task names from the command line). + # + # source://rake//lib/rake/application.rb#36 + def top_level_tasks; end + + # source://rake//lib/rake/application.rb#388 + def trace(*strings); end + + # source://rake//lib/rake/application.rb#370 + def truncate(string, width); end + + # We will truncate output if we are outputting to a TTY or if we've been + # given an explicit column width to honor + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#293 + def truncate_output?; end + + # Override the detected TTY output state (mostly for testing) + # + # source://rake//lib/rake/application.rb#39 + def tty_output=(_arg0); end + + # True if we are outputting to TTY, false otherwise + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#287 + def tty_output?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#361 + def unix?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#366 + def windows?; end + + private + + # source://rake//lib/rake/application.rb#721 + def glob(path, &block); end + + # Does the exception have a task invocation chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#267 + def has_chain?(exception); end + + # source://rake//lib/rake/application.rb#620 + def select_tasks_to_show(options, show_tasks, value); end + + # source://rake//lib/rake/application.rb#627 + def select_trace_output(options, trace_option, value); end + + # source://rake//lib/rake/application.rb#393 + def sort_options(options); end + + # source://rake//lib/rake/application.rb#744 + def standard_system_dir; end +end + +# source://rake//lib/rake/application.rb#41 +Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#3 +module Rake::Backtrace + class << self + # source://rake//lib/rake/backtrace.rb#18 + def collapse(backtrace); end + end +end + +# source://rake//lib/rake/backtrace.rb#8 +Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#12 +Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/backtrace.rb#16 +Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rake//lib/rake/backtrace.rb#4 +Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#5 +Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array) + +# Mixin for creating easily cloned objects. +# +# source://rake//lib/rake/cloneable.rb#6 +module Rake::Cloneable + private + + # The hook that is invoked by 'clone' and 'dup' methods. + # + # source://rake//lib/rake/cloneable.rb#8 + def initialize_copy(source); end +end + +# source://rake//lib/rake/application.rb#13 +class Rake::CommandLineOptionError < ::StandardError; end + +# Based on a script at: +# http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed +# +# source://rake//lib/rake/cpu_counter.rb#6 +class Rake::CpuCounter + # source://rake//lib/rake/cpu_counter.rb#22 + def count; end + + # source://rake//lib/rake/cpu_counter.rb#11 + def count_with_default(default = T.unsafe(nil)); end + + class << self + # source://rake//lib/rake/cpu_counter.rb#7 + def count; end + end +end + +# DSL is a module that provides #task, #desc, #namespace, etc. Use this +# when you'd like to use rake outside the top level scope. +# +# For a Rakefile you run from the command line this module is automatically +# included. +# +# source://rake//lib/rake/dsl_definition.rb#14 +module Rake::DSL + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + + private + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # Describes the next rake task. Duplicate descriptions are discarded. + # Descriptions are shown with rake -T (up to the first + # sentence) and rake -D (the entire description). + # + # Example: + # desc "Run the Unit Tests" + # task test: [:build] + # # ... run tests + # end + # + # source://rake//lib/rake/dsl_definition.rb#165 + def desc(description); end + + # Declare a set of files tasks to create the given directories on + # demand. + # + # Example: + # directory "testdata/doc" + # + # source://rake//lib/rake/dsl_definition.rb#92 + def directory(*args, &block); end + + # Declare a file task. + # + # Example: + # file "config.cfg" => ["config.template"] do + # open("config.cfg", "w") do |outfile| + # open("config.template") do |infile| + # while line = infile.gets + # outfile.puts line + # end + # end + # end + # end + # + # source://rake//lib/rake/dsl_definition.rb#76 + def file(*args, &block); end + + # Declare a file creation task. + # (Mainly used for the directory command). + # + # source://rake//lib/rake/dsl_definition.rb#82 + def file_create(*args, &block); end + + # Import the partial Rakefiles +fn+. Imported files are loaded + # _after_ the current file is completely loaded. This allows the + # import statement to appear anywhere in the importing file, and yet + # allowing the imported files to depend on objects defined in the + # importing file. + # + # A common use of the import statement is to include files + # containing dependency declarations. + # + # See also the --rakelibdir command line option. + # + # Example: + # import ".depend", "my_rules" + # + # source://rake//lib/rake/dsl_definition.rb#183 + def import(*fns); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # Declare a task that performs its prerequisites in + # parallel. Multitasks does *not* guarantee that its prerequisites + # will execute in any given order (which is obvious when you think + # about it) + # + # Example: + # multitask deploy: %w[deploy_gem deploy_rdoc] + # + # source://rake//lib/rake/dsl_definition.rb#112 + def multitask(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Create a new rake namespace and use it for evaluating the given + # block. Returns a NameSpace object that can be used to lookup + # tasks defined in the namespace. + # + # Example: + # + # ns = namespace "nested" do + # # the "nested:run" task + # task :run + # end + # task_run = ns[:run] # find :run in the given namespace. + # + # Tasks can also be defined in a namespace by using a ":" in the task + # name: + # + # task "nested:test" do + # # ... + # end + # + # source://rake//lib/rake/dsl_definition.rb#135 + def namespace(name = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#100 + def ruby(*args, **options, &block); end + + # Declare a rule for auto-tasks. + # + # Example: + # rule '.o' => '.c' do |t| + # sh 'cc', '-o', t.name, t.source + # end + # + # source://rake//lib/rake/dsl_definition.rb#151 + def rule(*args, &block); end + + # source://rake//lib/rake/file_utils.rb#112 + def safe_ln(*args, **options); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # source://rake//lib/rake/file_utils.rb#128 + def split_all(path); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # :call-seq: + # task(task_name) + # task(task_name: dependencies) + # task(task_name, arguments => dependencies) + # + # Declare a basic task. The +task_name+ is always the first argument. If + # the task name contains a ":" it is defined in that namespace. + # + # The +dependencies+ may be a single task name or an Array of task names. + # The +argument+ (a single name) or +arguments+ (an Array of names) define + # the arguments provided to the task. + # + # The task, argument and dependency names may be either symbols or + # strings. + # + # A task with a single dependency: + # + # task clobber: %w[clean] do + # rm_rf "html" + # end + # + # A task with an argument and a dependency: + # + # task :package, [:version] => :test do |t, args| + # # ... + # end + # + # To invoke this task from the command line: + # + # $ rake package[1.2.3] + # + # source://rake//lib/rake/dsl_definition.rb#59 + def task(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end +end + +# Default Rakefile loader used by +import+. +# +# source://rake//lib/rake/default_loader.rb#5 +class Rake::DefaultLoader + # Loads a rakefile into the current application from +fn+ + # + # source://rake//lib/rake/default_loader.rb#10 + def load(fn); end +end + +# source://rake//lib/rake/early_time.rb#21 +Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) + +# source://rake//lib/rake/task_arguments.rb#108 +Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments) + +# EarlyTime is a fake timestamp that occurs _before_ any other time value. +# +# source://rake//lib/rake/early_time.rb#5 +class Rake::EarlyTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # The EarlyTime always comes before +other+! + # + # source://rake//lib/rake/early_time.rb#12 + def <=>(other); end + + # source://rake//lib/rake/early_time.rb#16 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# A FileCreationTask is a file task that when used as a dependency will be +# needed if and only if the file has not been created. Once created, it is +# not re-triggered if any of its dependencies are newer, nor does trigger +# any rebuilds of tasks that depend on it whenever it is updated. +# +# source://rake//lib/rake/file_creation_task.rb#12 +class Rake::FileCreationTask < ::Rake::FileTask + # Is this file task needed? Yes if it doesn't exist. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_creation_task.rb#14 + def needed?; end + + # Time stamp for file creation task. This time stamp is earlier + # than any other time stamp. + # + # source://rake//lib/rake/file_creation_task.rb#20 + def timestamp; end +end + +# A FileList is essentially an array with a few helper methods defined to +# make file manipulation a bit easier. +# +# FileLists are lazy. When given a list of glob patterns for possible files +# to be included in the file list, instead of searching the file structures +# to find the files, a FileList holds the pattern for latter use. +# +# This allows us to define a number of FileList to match any number of +# files, but only search out the actual files when then FileList itself is +# actually used. The key is that the first time an element of the +# FileList/Array is requested, the pending patterns are resolved into a real +# list of file names. +# +# source://rake//lib/rake/file_list.rb#22 +class Rake::FileList + include ::Rake::Cloneable + + # Create a file list from the globbable patterns given. If you wish to + # perform multiple includes or excludes at object build time, use the + # "yield self" pattern. + # + # Example: + # file_list = FileList.new('lib/**/*.rb', 'test/test*.rb') + # + # pkg_files = FileList.new('lib/**/*') do |fl| + # fl.exclude(/\bCVS\b/) + # end + # + # @return [FileList] a new instance of FileList + # @yield [_self] + # @yieldparam _self [Rake::FileList] the object that the method was called on + # + # source://rake//lib/rake/file_list.rb#99 + def initialize(*patterns); end + + # source://rake//lib/rake/file_list.rb#68 + def &(*args, &block); end + + # Redefine * to return either a string or a new file list. + # + # source://rake//lib/rake/file_list.rb#193 + def *(other); end + + # source://rake//lib/rake/file_list.rb#68 + def +(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def -(*args, &block); end + + # source://rake//lib/rake/file_list.rb#203 + def <<(obj); end + + # source://rake//lib/rake/file_list.rb#77 + def <=>(*args, &block); end + + # A FileList is equal through array equality. + # + # source://rake//lib/rake/file_list.rb#171 + def ==(array); end + + # source://rake//lib/rake/file_list.rb#77 + def [](*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def []=(*args, &block); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def add(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def all?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def any?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def append(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def assoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chain(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def clear(*args, &block); end + + # Clear all the exclude patterns so that we exclude nothing. + # + # source://rake//lib/rake/file_list.rb#164 + def clear_exclude; end + + # source://rake//lib/rake/file_list.rb#68 + def collect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect_concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def compact(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def compact!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def count(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def cycle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def deconstruct(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_if(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def detect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def difference(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def dig(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_cons(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_entry(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_object(*args, &block); end + + # Grep each of the files in the filelist using the given pattern. If a + # block is given, call the block on each matching line, passing the file + # name, line number, and the matching line of text. If no block is given, + # a standard emacs style file:linenumber:line message will be printed to + # standard out. Returns the number of matched items. + # + # source://rake//lib/rake/file_list.rb#293 + def egrep(pattern, *options); end + + # source://rake//lib/rake/file_list.rb#77 + def empty?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def entries(*args, &block); end + + # Register a list of file name patterns that should be excluded from the + # list. Patterns may be regular expressions, glob patterns or regular + # strings. In addition, a block given to exclude will remove entries that + # return true when given to the block. + # + # Note that glob patterns are expanded against the file system. If a file + # is explicitly added to a file list, but does not exist in the file + # system, then an glob pattern in the exclude list will not exclude the + # file. + # + # Examples: + # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c'] + # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c'] + # + # If "a.c" is a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c'] + # + # If "a.c" is not a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c'] + # + # source://rake//lib/rake/file_list.rb#150 + def exclude(*patterns, &block); end + + # Should the given file name be excluded from the list? + # + # NOTE: This method was formerly named "exclude?", but Rails + # introduced an exclude? method as an array method and setup a + # conflict with file list. We renamed the method to avoid + # confusion. If you were using "FileList#exclude?" in your user + # code, you will need to update. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#364 + def excluded_from_list?(fn); end + + # Return a new file list that only contains file names from the current + # file list that exist on the file system. + # + # source://rake//lib/rake/file_list.rb#320 + def existing; end + + # Modify the current file list so that it contains only file name that + # exist on the file system. + # + # source://rake//lib/rake/file_list.rb#326 + def existing!; end + + # Return a new FileList with String#ext method applied to + # each member of the array. + # + # This method is a shortcut for: + # + # array.collect { |item| item.ext(newext) } + # + # +ext+ is a user added method for the Array class. + # + # source://rake//lib/rake/file_list.rb#284 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/file_list.rb#77 + def fetch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def fill(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def find_all(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def first(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flat_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def flatten(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flatten!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def grep(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def grep_v(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def group_by(*args, &block); end + + # Return a new FileList with the results of running +gsub+ against each + # element of the original list. + # + # Example: + # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") + # => ['lib\\test\\file', 'x\\y'] + # + # source://rake//lib/rake/file_list.rb#253 + def gsub(pat, rep); end + + # Same as +gsub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#264 + def gsub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#391 + def import(array); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def include(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def include?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def insert(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inspect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersect?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersection(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def is_a?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def join(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def keep_if(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def kind_of?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def last(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def lazy(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def length(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def map!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def member?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def none?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def one?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pack(*args, &block); end + + # FileList version of partition. Needed because the nested arrays should + # be FileLists in this version. + # + # source://rake//lib/rake/file_list.rb#334 + def partition(&block); end + + # Apply the pathmap spec to each of the included file names, returning a + # new file list with the modified paths. (See String#pathmap for + # details.) + # + # source://rake//lib/rake/file_list.rb#272 + def pathmap(spec = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_list.rb#77 + def permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def place(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def prepend(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def product(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def push(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rassoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reduce(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def reject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reject!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def replace(*args, &block); end + + # Resolve all the pending adds now. + # + # source://rake//lib/rake/file_list.rb#210 + def resolve; end + + # source://rake//lib/rake/file_list.rb#77 + def reverse(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse_each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rindex(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sample(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def select(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def select!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shelljoin(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def size(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_after(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_before(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_when(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort_by!(*args, &block); end + + # Return a new FileList with the results of running +sub+ against each + # element of the original list. + # + # Example: + # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] + # + # source://rake//lib/rake/file_list.rb#242 + def sub(pat, rep); end + + # Same as +sub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#258 + def sub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#77 + def sum(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def tally(*args, &block); end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#176 + def to_a; end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#182 + def to_ary; end + + # source://rake//lib/rake/file_list.rb#77 + def to_csv(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def to_h(*args, &block); end + + # Convert a FileList to a string by joining all elements with a space. + # + # source://rake//lib/rake/file_list.rb#344 + def to_s; end + + # source://rake//lib/rake/file_list.rb#77 + def to_set(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def transpose(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def union(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def uniq(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def uniq!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def unshift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def values_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def zip(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def |(*args, &block); end + + private + + # Add matching glob patterns. + # + # source://rake//lib/rake/file_list.rb#350 + def add_matching(pattern); end + + # source://rake//lib/rake/file_list.rb#220 + def resolve_add(fn); end + + # source://rake//lib/rake/file_list.rb#230 + def resolve_exclude; end + + class << self + # Create a new file list including the files listed. Similar to: + # + # FileList.new(*args) + # + # source://rake//lib/rake/file_list.rb#400 + def [](*args); end + + # Get a sorted list of files matching the pattern. This method + # should be preferred to Dir[pattern] and Dir.glob(pattern) because + # the files returned are guaranteed to be sorted. + # + # source://rake//lib/rake/file_list.rb#407 + def glob(pattern, *args); end + end +end + +# List of array methods (that are not in +Object+) that need to be +# delegated. +# +# source://rake//lib/rake/file_list.rb#44 +Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#381 +Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#387 +Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#61 +Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#86 +Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp) + +# List of additional methods that must be delegated. +# +# source://rake//lib/rake/file_list.rb#47 +Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array) + +# List of methods that should not be delegated here (we define special +# versions of them explicitly below). +# +# source://rake//lib/rake/file_list.rb#51 +Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array) + +# List of delegated methods that return new array values which need +# wrapping. +# +# source://rake//lib/rake/file_list.rb#55 +Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) + +# A FileTask is a task that includes time based dependencies. If any of a +# FileTask's prerequisites have a timestamp that is later than the file +# represented by this task, then the file must be rebuilt (using the +# supplied actions). +# +# source://rake//lib/rake/file_task.rb#12 +class Rake::FileTask < ::Rake::Task + # Is this file task needed? Yes if it doesn't exist, or if its time stamp + # is out of date. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_task.rb#16 + def needed?; end + + # Time stamp for file task. + # + # source://rake//lib/rake/file_task.rb#21 + def timestamp; end + + private + + # Are there any prerequisites with a later time than the given time stamp? + # + # @return [Boolean] + # + # source://rake//lib/rake/file_task.rb#32 + def out_of_date?(stamp); end + + class << self + # Apply the scope to the task name according to the rules for this kind + # of task. File based tasks ignore the scope when creating the name. + # + # source://rake//lib/rake/file_task.rb#49 + def scope_name(scope, task_name); end + end +end + +# FileUtilsExt provides a custom version of the FileUtils methods +# that respond to the verbose and nowrite +# commands. +# +# source://rake//lib/rake/file_utils_ext.rb#10 +module Rake::FileUtilsExt + include ::FileUtils::StreamUtils_ + include ::FileUtils + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Get/set the nowrite flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # nowrite # return the current value of the + # # nowrite flag + # nowrite(v) # set the nowrite flag to _v_. + # nowrite(v) { code } # Execute code with the nowrite flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # Check that the options do not contain options not listed in + # +optdecl+. An ArgumentError exception is thrown if non-declared + # options are found. + # + # @raise [ArgumentError] + # + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # Send the message to the default rake output (which is $stderr). + # + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # Get/set the verbose flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # verbose # return the current value of the + # # verbose flag + # verbose(v) # set the verbose flag to _v_. + # verbose(v) { code } # Execute code with the verbose flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # Use this function to prevent potentially destructive ruby code + # from running when the :nowrite flag is set. + # + # Example: + # + # when_writing("Building Project") do + # project.build + # end + # + # The following code will build the project under normal + # conditions. If the nowrite(true) flag is set, then the example + # will print: + # + # DRYRUN: Building Project + # + # instead of actually building the project. + # + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end + + class << self + # Returns the value of attribute nowrite_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag; end + + # Sets the attribute nowrite_flag + # + # @param value the value to set the attribute nowrite_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag=(_arg0); end + + # Returns the value of attribute verbose_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag; end + + # Sets the attribute verbose_flag + # + # @param value the value to set the attribute verbose_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag=(_arg0); end + end +end + +# source://rake//lib/rake/file_utils_ext.rb#17 +Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object) + +# InvocationChain tracks the chain of task invocations to detect +# circular dependencies. +# +# source://rake//lib/rake/invocation_chain.rb#6 +class Rake::InvocationChain < ::Rake::LinkedList + # Append an invocation to the chain of invocations. It is an error + # if the invocation already listed. + # + # source://rake//lib/rake/invocation_chain.rb#15 + def append(invocation); end + + # Is the invocation already in the chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#9 + def member?(invocation); end + + # Convert to string, ie: TOP => invocation => invocation + # + # source://rake//lib/rake/invocation_chain.rb#23 + def to_s; end + + private + + # source://rake//lib/rake/invocation_chain.rb#34 + def prefix; end + + class << self + # Class level append. + # + # source://rake//lib/rake/invocation_chain.rb#28 + def append(invocation, chain); end + end +end + +# source://rake//lib/rake/invocation_chain.rb#55 +Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain) + +# Null object for an empty chain. +# +# source://rake//lib/rake/invocation_chain.rb#39 +class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/invocation_chain.rb#46 + def append(invocation); end + + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#42 + def member?(obj); end + + # source://rake//lib/rake/invocation_chain.rb#50 + def to_s; end +end + +# source://rake//lib/rake/invocation_exception_mixin.rb#3 +module Rake::InvocationExceptionMixin + # Return the invocation chain (list of Rake tasks) that were in + # effect when this exception was detected by rake. May be null if + # no tasks were active. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#7 + def chain; end + + # Set the invocation chain in effect when this exception was + # detected. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#13 + def chain=(value); end +end + +# source://rake//lib/rake/late_time.rb#17 +Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime) + +# LateTime is a fake timestamp that occurs _after_ any other time value. +# +# source://rake//lib/rake/late_time.rb#4 +class Rake::LateTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://rake//lib/rake/late_time.rb#8 + def <=>(other); end + + # source://rake//lib/rake/late_time.rb#12 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# Polylithic linked list structure used to implement several data +# structures in Rake. +# +# source://rake//lib/rake/linked_list.rb#6 +class Rake::LinkedList + include ::Enumerable + + # @return [LinkedList] a new instance of LinkedList + # + # source://rake//lib/rake/linked_list.rb#84 + def initialize(head, tail = T.unsafe(nil)); end + + # Lists are structurally equivalent. + # + # source://rake//lib/rake/linked_list.rb#25 + def ==(other); end + + # Polymorphically add a new element to the head of a list. The + # type of head node will be the same list type as the tail. + # + # source://rake//lib/rake/linked_list.rb#12 + def conj(item); end + + # For each item in the list. + # + # source://rake//lib/rake/linked_list.rb#48 + def each; end + + # Is the list empty? + # .make guards against a list being empty making any instantiated LinkedList + # object not empty by default + # You should consider overriding this method if you implement your own .make method + # + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#20 + def empty?; end + + # Returns the value of attribute head. + # + # source://rake//lib/rake/linked_list.rb#8 + def head; end + + # Same as +to_s+, but with inspected items. + # + # source://rake//lib/rake/linked_list.rb#42 + def inspect; end + + # Returns the value of attribute tail. + # + # source://rake//lib/rake/linked_list.rb#8 + def tail; end + + # Convert to string: LL(item, item...) + # + # source://rake//lib/rake/linked_list.rb#36 + def to_s; end + + class << self + # Cons a new head onto the tail list. + # + # source://rake//lib/rake/linked_list.rb#73 + def cons(head, tail); end + + # The standard empty list class for the given LinkedList class. + # + # source://rake//lib/rake/linked_list.rb#78 + def empty; end + + # Make a list out of the given arguments. This method is + # polymorphic + # + # source://rake//lib/rake/linked_list.rb#59 + def make(*args); end + end +end + +# source://rake//lib/rake/linked_list.rb#110 +Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList) + +# Represent an empty list, using the Null Object Pattern. +# +# When inheriting from the LinkedList class, you should implement +# a type specific Empty class as well. Make sure you set the class +# instance variable @parent to the associated list class (this +# allows conj, cons and make to work polymorphically). +# +# source://rake//lib/rake/linked_list.rb#95 +class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList + # @return [EmptyLinkedList] a new instance of EmptyLinkedList + # + # source://rake//lib/rake/linked_list.rb#98 + def initialize; end + + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#101 + def empty?; end + + class << self + # source://rake//lib/rake/linked_list.rb#105 + def cons(head, tail); end + end +end + +# Same as a regular task, but the immediate prerequisites are done in +# parallel using Ruby threads. +# +# source://rake//lib/rake/multi_task.rb#7 +class Rake::MultiTask < ::Rake::Task + private + + # source://rake//lib/rake/multi_task.rb#10 + def invoke_prerequisites(task_args, invocation_chain); end +end + +# The NameSpace class will lookup task names in the scope defined by a +# +namespace+ command. +# +# source://rake//lib/rake/name_space.rb#6 +class Rake::NameSpace + # Create a namespace lookup object using the given task manager + # and the list of scopes. + # + # @return [NameSpace] a new instance of NameSpace + # + # source://rake//lib/rake/name_space.rb#12 + def initialize(task_manager, scope_list); end + + # Lookup a task named +name+ in the namespace. + # + # source://rake//lib/rake/name_space.rb#20 + def [](name); end + + # The scope of the namespace (a LinkedList) + # + # source://rake//lib/rake/name_space.rb#27 + def scope; end + + # Return the list of tasks defined in this and nested namespaces. + # + # source://rake//lib/rake/name_space.rb#34 + def tasks; end +end + +# Include PrivateReader to use +private_reader+. +# +# source://rake//lib/rake/private_reader.rb#5 +module Rake::PrivateReader + mixes_in_class_methods ::Rake::PrivateReader::ClassMethods + + class << self + # source://rake//lib/rake/private_reader.rb#7 + def included(base); end + end +end + +# source://rake//lib/rake/private_reader.rb#11 +module Rake::PrivateReader::ClassMethods + # Declare a list of private accessors + # + # source://rake//lib/rake/private_reader.rb#14 + def private_reader(*names); end +end + +# A Promise object represents a promise to do work (a chore) in the +# future. The promise is created with a block and a list of +# arguments for the block. Calling value will return the value of +# the promised chore. +# +# Used by ThreadPool. +# +# source://rake//lib/rake/promise.rb#11 +class Rake::Promise + # Create a promise to do the chore specified by the block. + # + # @return [Promise] a new instance of Promise + # + # source://rake//lib/rake/promise.rb#17 + def initialize(args, &block); end + + # source://rake//lib/rake/promise.rb#14 + def recorder; end + + # source://rake//lib/rake/promise.rb#14 + def recorder=(_arg0); end + + # Return the value of this promise. + # + # If the promised chore is not yet complete, then do the work + # synchronously. We will wait. + # + # source://rake//lib/rake/promise.rb#29 + def value; end + + # If no one else is working this promise, go ahead and do the chore. + # + # source://rake//lib/rake/promise.rb#42 + def work; end + + private + + # Perform the chore promised + # + # source://rake//lib/rake/promise.rb#57 + def chore; end + + # Are we done with the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#83 + def complete?; end + + # free up these items for the GC + # + # source://rake//lib/rake/promise.rb#88 + def discard; end + + # Did the promise throw an error + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#78 + def error?; end + + # Do we have a result for the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#73 + def result?; end + + # Record execution statistics if there is a recorder + # + # source://rake//lib/rake/promise.rb#94 + def stat(*args); end +end + +# source://rake//lib/rake/promise.rb#12 +Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object) + +# Exit status class for times the system just gives us a nil. +# +# source://rake//lib/rake/pseudo_status.rb#6 +class Rake::PseudoStatus + # @return [PseudoStatus] a new instance of PseudoStatus + # + # source://rake//lib/rake/pseudo_status.rb#9 + def initialize(code = T.unsafe(nil)); end + + # source://rake//lib/rake/pseudo_status.rb#17 + def >>(n); end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#25 + def exited?; end + + # source://rake//lib/rake/pseudo_status.rb#7 + def exitstatus; end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#21 + def stopped?; end + + # source://rake//lib/rake/pseudo_status.rb#13 + def to_i; end +end + +# Error indicating a recursion overflow error in task selection. +# +# source://rake//lib/rake/rule_recursion_overflow_error.rb#5 +class Rake::RuleRecursionOverflowError < ::StandardError + # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError + # + # source://rake//lib/rake/rule_recursion_overflow_error.rb#6 + def initialize(*args); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#11 + def add_target(target); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#15 + def message; end +end + +# source://rake//lib/rake/scope.rb#3 +class Rake::Scope < ::Rake::LinkedList + # Path for the scope. + # + # source://rake//lib/rake/scope.rb#6 + def path; end + + # Path for the scope + the named path. + # + # source://rake//lib/rake/scope.rb#11 + def path_with_task_name(task_name); end + + # Trim +n+ innermost scope levels from the scope. In no case will + # this trim beyond the toplevel scope. + # + # source://rake//lib/rake/scope.rb#17 + def trim(n); end +end + +# Singleton null object for an empty scope. +# +# source://rake//lib/rake/scope.rb#41 +Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope) + +# Scope lists always end with an EmptyScope object. See Null +# Object Pattern) +# +# source://rake//lib/rake/scope.rb#28 +class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/scope.rb#31 + def path; end + + # source://rake//lib/rake/scope.rb#35 + def path_with_task_name(task_name); end +end + +# A Task is the basic unit of work in a Rakefile. Tasks have associated +# actions (possibly more than one) and a list of prerequisites. When +# invoked, a task will first ensure that all of its prerequisites have an +# opportunity to run and then it will execute its own actions. +# +# Tasks are not usually created directly using the new method, but rather +# use the +file+ and +task+ convenience methods. +# +# source://rake//lib/rake/task.rb#15 +class Rake::Task + # Create a task named +task_name+ with no actions or prerequisites. Use + # +enhance+ to add actions and prerequisites. + # + # @return [Task] a new instance of Task + # + # source://rake//lib/rake/task.rb#99 + def initialize(task_name, app); end + + # List of actions attached to a task. + # + # source://rake//lib/rake/task.rb#24 + def actions; end + + # Add a description to the task. The description can consist of an option + # argument list (enclosed brackets) and an optional comment. + # + # source://rake//lib/rake/task.rb#298 + def add_description(description); end + + # List of all unique prerequisite tasks including prerequisite tasks' + # prerequisites. + # Includes self when cyclic dependencies are found. + # + # source://rake//lib/rake/task.rb#77 + def all_prerequisite_tasks; end + + # Has this task already been invoked? Already invoked tasks + # will be skipped unless you reenable them. + # + # source://rake//lib/rake/task.rb#39 + def already_invoked; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application=(_arg0); end + + # Argument description (nil if none). + # + # source://rake//lib/rake/task.rb#136 + def arg_description; end + + # Name of arguments for this task. + # + # source://rake//lib/rake/task.rb#141 + def arg_names; end + + # Clear the existing prerequisites, actions, comments, and arguments of a rake task. + # + # source://rake//lib/rake/task.rb#153 + def clear; end + + # Clear the existing actions on a rake task. + # + # source://rake//lib/rake/task.rb#168 + def clear_actions; end + + # Clear the existing arguments on a rake task. + # + # source://rake//lib/rake/task.rb#180 + def clear_args; end + + # Clear the existing comments on a rake task. + # + # source://rake//lib/rake/task.rb#174 + def clear_comments; end + + # Clear the existing prerequisites of a rake task. + # + # source://rake//lib/rake/task.rb#162 + def clear_prerequisites; end + + # First line (or sentence) of all comments. Multiple comments are + # separated by a "/". + # + # source://rake//lib/rake/task.rb#322 + def comment; end + + # source://rake//lib/rake/task.rb#304 + def comment=(comment); end + + # Enhance a task with prerequisites or actions. Returns self. + # + # source://rake//lib/rake/task.rb#115 + def enhance(deps = T.unsafe(nil), &block); end + + # Execute the actions associated with this task. + # + # source://rake//lib/rake/task.rb#270 + def execute(args = T.unsafe(nil)); end + + # Full collection of comments. Multiple comments are separated by + # newlines. + # + # source://rake//lib/rake/task.rb#316 + def full_comment; end + + # source://rake//lib/rake/task.rb#46 + def inspect; end + + # Return a string describing the internal state of a task. Useful for + # debugging. + # + # source://rake//lib/rake/task.rb#354 + def investigation; end + + # Invoke the task if it is needed. Prerequisites are invoked first. + # + # source://rake//lib/rake/task.rb#186 + def invoke(*args); end + + # Invoke all the prerequisites of a task. + # + # source://rake//lib/rake/task.rb#237 + def invoke_prerequisites(task_args, invocation_chain); end + + # Invoke all the prerequisites of a task in parallel. + # + # source://rake//lib/rake/task.rb#249 + def invoke_prerequisites_concurrently(task_args, invocation_chain); end + + # File/Line locations of each of the task definitions for this + # task (only valid if the task was defined with the detect + # location option set). + # + # source://rake//lib/rake/task.rb#35 + def locations; end + + # Name of the task, including any namespace qualifiers. + # + # source://rake//lib/rake/task.rb#122 + def name; end + + # Name of task with argument list description. + # + # source://rake//lib/rake/task.rb#127 + def name_with_args; end + + # Is this task needed? + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#286 + def needed?; end + + # List of order only prerequisites for a task. + # + # source://rake//lib/rake/task.rb#21 + def order_only_prerequisites; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prereqs; end + + # List of prerequisite tasks + # + # source://rake//lib/rake/task.rb#61 + def prerequisite_tasks; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prerequisites; end + + # Reenable the task, allowing its tasks to be executed if the task + # is invoked again. + # + # source://rake//lib/rake/task.rb#147 + def reenable; end + + # Array of nested namespaces names used for task lookup by this task. + # + # source://rake//lib/rake/task.rb#30 + def scope; end + + # Set the names of the arguments for this task. +args+ should be + # an array of symbols, one for each argument name. + # + # source://rake//lib/rake/task.rb#348 + def set_arg_names(args); end + + # First source from a rule (nil if no sources) + # + # source://rake//lib/rake/task.rb#93 + def source; end + + # source://rake//lib/rake/task.rb#52 + def sources; end + + # List of sources for task. + # + # source://rake//lib/rake/task.rb#51 + def sources=(_arg0); end + + # Timestamp for this task. Basic tasks return the current time for their + # time stamp. Other tasks can be more sophisticated. + # + # source://rake//lib/rake/task.rb#292 + def timestamp; end + + # Return task name + # + # source://rake//lib/rake/task.rb#42 + def to_s; end + + # Add order only dependencies. + # + # source://rake//lib/rake/task.rb#379 + def |(deps); end + + protected + + # source://rake//lib/rake/task.rb#83 + def collect_prerequisites(seen); end + + # Same as invoke, but explicitly pass a call chain to detect + # circular dependencies. + # + # If multiple tasks depend on this + # one in parallel, they will all fail if the first execution of + # this task fails. + # + # source://rake//lib/rake/task.rb#197 + def invoke_with_call_chain(task_args, invocation_chain); end + + private + + # source://rake//lib/rake/task.rb#229 + def add_chain_to(exception, new_chain); end + + # source://rake//lib/rake/task.rb#308 + def add_comment(comment); end + + # Get the first sentence in a string. The sentence is terminated + # by the first period, exclamation mark, or the end of the line. + # Decimal points do not count as periods. + # + # source://rake//lib/rake/task.rb#341 + def first_sentence(string); end + + # Format the trace flags for display. + # + # source://rake//lib/rake/task.rb#261 + def format_trace_flags; end + + # source://rake//lib/rake/task.rb#65 + def lookup_prerequisite(prerequisite_name); end + + # Transform the list of comments as specified by the block and + # join with the separator. + # + # source://rake//lib/rake/task.rb#328 + def transform_comments(separator, &block); end + + class << self + # Return a task with the given name. If the task is not currently + # known, try to synthesize one from the defined rules. If no rules are + # found, but an existing file matches the task name, assume it is a file + # task with no dependencies or actions. + # + # source://rake//lib/rake/task.rb#404 + def [](task_name); end + + # Clear the task list. This cause rake to immediately forget all the + # tasks that have been assigned. (Normally used in the unit tests.) + # + # source://rake//lib/rake/task.rb#391 + def clear; end + + # Define a rule for synthesizing tasks. + # + # source://rake//lib/rake/task.rb#421 + def create_rule(*args, &block); end + + # Define a task given +args+ and an option block. If a rule with the + # given name already exists, the prerequisites and actions are added to + # the existing task. Returns the defined task. + # + # source://rake//lib/rake/task.rb#416 + def define_task(*args, &block); end + + # Format dependencies parameter to pass to task. + # + # source://rake//lib/rake/task.rb#373 + def format_deps(deps); end + + # Apply the scope to the task name according to the rules for + # this kind of task. Generic tasks will accept the scope as + # part of the name. + # + # source://rake//lib/rake/task.rb#428 + def scope_name(scope, task_name); end + + # TRUE if the task name is already defined. + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#409 + def task_defined?(task_name); end + + # List of all defined tasks. + # + # source://rake//lib/rake/task.rb#396 + def tasks; end + end +end + +# Error indicating an ill-formed task declaration. +# +# source://rake//lib/rake/task_argument_error.rb#5 +class Rake::TaskArgumentError < ::ArgumentError; end + +# TaskArguments manage the arguments passed to a task. +# +# source://rake//lib/rake/task_arguments.rb#7 +class Rake::TaskArguments + include ::Enumerable + + # Create a TaskArgument object with a list of argument +names+ and a set + # of associated +values+. +parent+ is the parent argument object. + # + # @return [TaskArguments] a new instance of TaskArguments + # + # source://rake//lib/rake/task_arguments.rb#15 + def initialize(names, values, parent = T.unsafe(nil)); end + + # Find an argument value by name or index. + # + # source://rake//lib/rake/task_arguments.rb#44 + def [](index); end + + # Enumerates the arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#56 + def each(&block); end + + # Retrieve the list of values not associated with named arguments + # + # source://rake//lib/rake/task_arguments.rb#32 + def extras; end + + # source://rake//lib/rake/task_arguments.rb#93 + def fetch(*args, &block); end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#88 + def has_key?(key); end + + # source://rake//lib/rake/task_arguments.rb#79 + def inspect; end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#88 + def key?(key); end + + # Returns the value of the given argument via method_missing + # + # source://rake//lib/rake/task_arguments.rb#66 + def method_missing(sym, *args); end + + # Argument names + # + # source://rake//lib/rake/task_arguments.rb#11 + def names; end + + # Create a new argument scope using the prerequisite argument + # names. + # + # source://rake//lib/rake/task_arguments.rb#38 + def new_scope(names); end + + # Retrieve the complete array of sequential values + # + # source://rake//lib/rake/task_arguments.rb#27 + def to_a; end + + # Returns a Hash of arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#71 + def to_hash; end + + # source://rake//lib/rake/task_arguments.rb#75 + def to_s; end + + # Extracts the argument values at +keys+ + # + # source://rake//lib/rake/task_arguments.rb#61 + def values_at(*keys); end + + # Specify a hash of default values for task arguments. Use the + # defaults only if there is no specific value for the given + # argument. + # + # source://rake//lib/rake/task_arguments.rb#51 + def with_defaults(defaults); end + + protected + + # source://rake//lib/rake/task_arguments.rb#99 + def lookup(name); end +end + +# Base class for Task Libraries. +# +# source://rake//lib/rake/tasklib.rb#7 +class Rake::TaskLib + include ::Rake::Cloneable + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL +end + +# The TaskManager module is a mixin for managing tasks. +# +# source://rake//lib/rake/task_manager.rb#5 +module Rake::TaskManager + # source://rake//lib/rake/task_manager.rb#9 + def initialize; end + + # Find a matching task for +task_name+. + # + # source://rake//lib/rake/task_manager.rb#54 + def [](task_name, scopes = T.unsafe(nil)); end + + # Clear all tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#182 + def clear; end + + # source://rake//lib/rake/task_manager.rb#17 + def create_rule(*args, &block); end + + # Return the list of scope names currently active in the task + # manager. + # + # source://rake//lib/rake/task_manager.rb#222 + def current_scope; end + + # source://rake//lib/rake/task_manager.rb#23 + def define_task(task_class, *args, &block); end + + # If a rule can be found that matches the task name, enhance the + # task with the prerequisites and actions from the rule. Set the + # source attribute of the task appropriately for the rule. Return + # the enhanced task or nil of no rule was found. + # + # source://rake//lib/rake/task_manager.rb#151 + def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end + + # source://rake//lib/rake/task_manager.rb#68 + def generate_did_you_mean_suggestions(task_name); end + + # source://rake//lib/rake/task_manager.rb#62 + def generate_message_for_undefined_task(task_name); end + + # Evaluate the block in a nested namespace named +name+. Create + # an anonymous namespace if +name+ is nil. + # + # source://rake//lib/rake/task_manager.rb#228 + def in_namespace(name); end + + # Lookup a task. Return an existing task if found, otherwise + # create a task of the current type. + # + # source://rake//lib/rake/task_manager.rb#49 + def intern(task_class, task_name); end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description; end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description=(_arg0); end + + # Lookup a task, using scope and the scope hints in the task name. + # This method performs straight lookups without trying to + # synthesize file tasks or rules. Special scope names (e.g. '^') + # are recognized. If no scope argument is supplied, use the + # current scope. Return nil if the task cannot be found. + # + # source://rake//lib/rake/task_manager.rb#192 + def lookup(task_name, initial_scope = T.unsafe(nil)); end + + # Resolve the arguments for a task/rule. Returns a tuple of + # [task_name, arg_name_list, prerequisites, order_only_prerequisites]. + # + # source://rake//lib/rake/task_manager.rb#88 + def resolve_args(args); end + + # source://rake//lib/rake/task_manager.rb#81 + def synthesize_file_task(task_name); end + + # List of all defined tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#168 + def tasks; end + + # List of all the tasks defined in the given scope (and its + # sub-scopes). + # + # source://rake//lib/rake/task_manager.rb#174 + def tasks_in_scope(scope); end + + private + + # Add a location to the locations field of the given task. + # + # source://rake//lib/rake/task_manager.rb#241 + def add_location(task); end + + # Attempt to create a rule given the list of prerequisites. + # + # source://rake//lib/rake/task_manager.rb#271 + def attempt_rule(task_name, task_pattern, args, extensions, block, level); end + + # Find the location that called into the dsl layer. + # + # source://rake//lib/rake/task_manager.rb#248 + def find_location; end + + # Generate an anonymous namespace name. + # + # source://rake//lib/rake/task_manager.rb#259 + def generate_name; end + + # Return the current description, clearing it in the process. + # + # source://rake//lib/rake/task_manager.rb#319 + def get_description(task); end + + # Lookup the task name + # + # source://rake//lib/rake/task_manager.rb#208 + def lookup_in_scope(name, scope); end + + # Make a list of sources from the list of file name extensions / + # translation procs. + # + # source://rake//lib/rake/task_manager.rb#293 + def make_sources(task_name, task_pattern, extensions); end + + # Resolve task arguments for a task or rule when there are + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t, order_only: [:e] + # task :t => [:d] + # task :t => [:d], order_only: [:e] + # task :t, [a] => [:d] + # task :t, [a] => [:d], order_only: [:e] + # + # source://rake//lib/rake/task_manager.rb#127 + def resolve_args_with_dependencies(args, hash); end + + # Resolve task arguments for a task or rule when there are no + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t + # task :t, [:a] + # + # source://rake//lib/rake/task_manager.rb#105 + def resolve_args_without_dependencies(args); end + + # source://rake//lib/rake/task_manager.rb#265 + def trace_rule(level, message); end + + class << self + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata; end + + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata=(_arg0); end + end +end + +# source://rake//lib/rake/thread_history_display.rb#6 +class Rake::ThreadHistoryDisplay + include ::Rake::PrivateReader + extend ::Rake::PrivateReader::ClassMethods + + # @return [ThreadHistoryDisplay] a new instance of ThreadHistoryDisplay + # + # source://rake//lib/rake/thread_history_display.rb#11 + def initialize(stats); end + + # source://rake//lib/rake/thread_history_display.rb#17 + def show; end + + private + + # source://rake//lib/rake/private_reader.rb#15 + def items; end + + # source://rake//lib/rake/thread_history_display.rb#35 + def rename(hash, key, renames); end + + # source://rake//lib/rake/private_reader.rb#15 + def stats; end + + # source://rake//lib/rake/private_reader.rb#15 + def threads; end +end + +# source://rake//lib/rake/thread_pool.rb#7 +class Rake::ThreadPool + # Creates a ThreadPool object. The +thread_count+ parameter is the size + # of the pool. + # + # @return [ThreadPool] a new instance of ThreadPool + # + # source://rake//lib/rake/thread_pool.rb#11 + def initialize(thread_count); end + + # Creates a future executed by the +ThreadPool+. + # + # The args are passed to the block when executing (similarly to + # Thread#new) The return value is an object representing + # a future which has been created and added to the queue in the + # pool. Sending #value to the object will sleep the + # current thread until the future is finished and will return the + # result (or raise an exception thrown from the future) + # + # source://rake//lib/rake/thread_pool.rb#33 + def future(*args, &block); end + + # Enable the gathering of history events. + # + # source://rake//lib/rake/thread_pool.rb#68 + def gather_history; end + + # Return a array of history events for the thread pool. + # + # History gathering must be enabled to be able to see the events + # (see #gather_history). Best to call this when the job is + # complete (i.e. after ThreadPool#join is called). + # + # source://rake//lib/rake/thread_pool.rb#77 + def history; end + + # Waits until the queue of futures is empty and all threads have exited. + # + # source://rake//lib/rake/thread_pool.rb#44 + def join; end + + # Return a hash of always collected statistics for the thread pool. + # + # source://rake//lib/rake/thread_pool.rb#84 + def statistics; end + + private + + # for testing only + # + # source://rake//lib/rake/thread_pool.rb#158 + def __queue__; end + + # processes one item on the queue. Returns true if there was an + # item to process, false if there was no item + # + # source://rake//lib/rake/thread_pool.rb#95 + def process_queue_item; end + + # source://rake//lib/rake/thread_pool.rb#111 + def safe_thread_count; end + + # source://rake//lib/rake/thread_pool.rb#117 + def start_thread; end + + # source://rake//lib/rake/thread_pool.rb#145 + def stat(event, data = T.unsafe(nil)); end +end + +# source://rake//lib/rake/trace_output.rb#3 +module Rake::TraceOutput + # Write trace output to output stream +out+. + # + # The write is done as a single IO call (to print) to lessen the + # chance that the trace output is interrupted by other tasks also + # producing output. + # + # source://rake//lib/rake/trace_output.rb#10 + def trace_on(out, *strings); end +end + +# source://rake//lib/rake/version.rb#3 +Rake::VERSION = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#5 +module Rake::Version; end + +# source://rake//lib/rake/version.rb#6 +Rake::Version::BUILD = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MAJOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MINOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#8 +Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::OTHER = T.let(T.unsafe(nil), Array) + +# Win 32 interface methods for Rake. Windows specific functionality +# will be placed here to collect that knowledge in one spot. +# +# source://rake//lib/rake/win32.rb#7 +module Rake::Win32 + class << self + # Normalize a win32 path so that the slashes are all forward slashes. + # + # source://rake//lib/rake/win32.rb#45 + def normalize(path); end + + # The standard directory containing system wide rake files on + # Win 32 systems. Try the following environment variables (in + # order): + # + # * HOME + # * HOMEDRIVE + HOMEPATH + # * APPDATA + # * USERPROFILE + # + # If the above are not defined, the return nil. + # + # @raise [Win32HomeError] + # + # source://rake//lib/rake/win32.rb#30 + def win32_system_dir; end + + # True if running on a windows system. + # + # @return [Boolean] + # + # source://rake//lib/rake/win32.rb#16 + def windows?; end + end +end + +# Error indicating a problem in locating the home directory on a +# Win32 system. +# +# source://rake//lib/rake/win32.rb#11 +class Rake::Win32::Win32HomeError < ::RuntimeError; end + +# source://rake//lib/rake.rb#71 +RakeFileUtils = Rake::FileUtilsExt + +# source://rake//lib/rake/ext/string.rb#4 +class String + include ::Comparable + + # source://rake//lib/rake/ext/string.rb#14 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/ext/string.rb#138 + def pathmap(spec = T.unsafe(nil), &block); end + + protected + + # source://rake//lib/rake/ext/string.rb#27 + def pathmap_explode; end + + # source://rake//lib/rake/ext/string.rb#41 + def pathmap_partial(n); end + + # source://rake//lib/rake/ext/string.rb#59 + def pathmap_replace(patterns, &block); end +end diff --git a/sorbet/rbi/gems/rbi@0.1.13.rbi b/sorbet/rbi/gems/rbi@0.1.13.rbi new file mode 100644 index 0000000..8bd71dd --- /dev/null +++ b/sorbet/rbi/gems/rbi@0.1.13.rbi @@ -0,0 +1,3078 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# 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/loc.rb#4 +module RBI; end + +# source://rbi//lib/rbi/model.rb#1041 +class RBI::Arg < ::RBI::Node + # source://rbi//lib/rbi/model.rb#1053 + sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#1059 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # 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#1064 + sig { returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#1045 + sig { returns(::String) } + def value; end +end + +# Attributes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#349 +class RBI::Attr < ::RBI::NodeWithComments + include ::RBI::Indexable + + abstract! + + # source://rbi//lib/rbi/model.rb#374 + sig do + params( + name: ::Symbol, + names: T::Array[::Symbol], + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + 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#348 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # 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#382 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # 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#420 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#356 + sig { returns(T::Array[::Symbol]) } + def names; end + + # source://rbi//lib/rbi/printer.rb#375 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/model.rb#362 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # source://rbi//lib/rbi/model.rb#359 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#359 + def visibility=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#385 +class RBI::AttrAccessor < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#399 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) + ).void + 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#452 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#405 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#411 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#417 +class RBI::AttrReader < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#431 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) + ).void + 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#434 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#437 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#443 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#449 +class RBI::AttrWriter < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#463 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) + ).void + 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#443 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#469 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # 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#74 +class RBI::BlankLine < ::RBI::Comment + # 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#217 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end +end + +# source://rbi//lib/rbi/model.rb#814 +class RBI::BlockParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#825 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#836 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # 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#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#831 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#218 +class RBI::Class < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#236 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Class).void) + ).void + 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#376 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#244 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#222 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#222 + def name=(_arg0); end + + # 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#225 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#225 + def superclass_name=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#53 +class RBI::Comment < ::RBI::Node + # 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#66 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # 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#57 + sig { returns(::String) } + def text; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#57 + def text=(_arg0); end +end + +# A tree showing incompatibles nodes +# +# Is rendered as a merge conflict between `left` and` right`: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#589 +class RBI::ConflictTree < ::RBI::Tree + # 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#607 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # 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#593 + def right; end +end + +# Consts +# +# source://rbi//lib/rbi/model.rb#312 +class RBI::Const < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#327 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Const).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # 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#403 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#335 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#103 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#316 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#342 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#316 + def value; end +end + +# source://rbi//lib/rbi/model.rb#889 +class RBI::Extend < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#901 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Extend).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # 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#143 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#907 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#137 +class RBI::File + # source://rbi//lib/rbi/model.rb#156 + sig do + params( + strictness: T.nilable(::String), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(file: ::RBI::File).void) + ).void + end + def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#164 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/printer.rb#105 + sig { params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#147 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#147 + def comments=(_arg0); end + + # source://rbi//lib/rbi/model.rb#169 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/printer.rb#129 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + 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#141 + sig { returns(::RBI::Tree) } + def root; end + + # @return [Tree] + # + # source://rbi//lib/rbi/model.rb#141 + def root=(_arg0); end + + # source://rbi//lib/rbi/model.rb#144 + sig { returns(T.nilable(::String)) } + def strictness; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#144 + def strictness=(_arg0); end + + # 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#36 + sig do + params( + add_sig_templates: T::Boolean, + group_nodes: T::Boolean, + max_line_length: T.nilable(::Integer), + nest_singleton_methods: T::Boolean, + nest_non_public_methods: T::Boolean, + sort_nodes: T::Boolean + ).void + 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#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#59 + sig { params(file: ::RBI::File).void } + def format_file(file); end + + # source://rbi//lib/rbi/formatter.rb#64 + sig { params(tree: ::RBI::Tree).void } + def format_tree(tree); 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#24 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/formatter.rb#24 + def max_line_length=(_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 + + # 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#53 + sig { params(file: ::RBI::File).returns(::String) } + def print_file(file); end + + # source://rbi//lib/rbi/formatter.rb#9 + 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 +class RBI::Group < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/group_nodes.rb#95 + sig { params(kind: ::RBI::Group::Kind).void } + def initialize(kind); end + + # source://rbi//lib/rbi/printer.rb#838 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#92 + sig { returns(::RBI::Group::Kind) } + def kind; end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 +class RBI::Group::Kind < ::T::Enum + enums do + Mixins = new + RequiredAncestors = new + Helpers = new + TypeMembers = new + MixesInClassMethods = new + Sends = new + Attrs = new + TStructFields = new + TEnums = new + Inits = new + Methods = new + SingletonClasses = new + Consts = new + end +end + +# Sorbet's misc. +# +# source://rbi//lib/rbi/model.rb#1372 +class RBI::Helper < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1386 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Helper).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # 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#520 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#173 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1376 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1393 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#866 +class RBI::Include < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#878 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Include).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # 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#133 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#884 + 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#21 + sig { void } + def initialize; end + + # 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#37 + sig { params(nodes: ::RBI::Node).void } + def index(*nodes); end + + # source://rbi//lib/rbi/index.rb#27 + sig { returns(T::Array[::String]) } + def keys; end + + # 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#59 + sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } + def index_node(node); end + + class << self + # source://rbi//lib/rbi/index.rb#13 + sig { params(node: ::RBI::Node).returns(::RBI::Index) } + def index(*node); end + end +end + +# A Node that can be referred to by a unique ID inside an index +# +# @abstract Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/index.rb#74 +module RBI::Indexable + interface! + + # Unique IDs that refer to this node. + # + # Some nodes can have multiple ids, for example an attribute accessor matches the ID of the + # getter and the setter. + # + # @abstract + # + # source://rbi//lib/rbi/index.rb#85 + sig { abstract.returns(T::Array[::String]) } + def index_ids; end +end + +# source://rbi//lib/rbi/model.rb#1069 +class RBI::KwArg < ::RBI::Arg + # source://rbi//lib/rbi/model.rb#1082 + 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#1088 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # 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#1073 + sig { returns(::String) } + def keyword; end + + # source://rbi//lib/rbi/model.rb#1093 + sig { returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#755 +class RBI::KwOptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#770 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#782 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # 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#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#777 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#759 + sig { returns(::String) } + def value; end +end + +# source://rbi//lib/rbi/model.rb#728 +class RBI::KwParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#739 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#750 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # 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#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#745 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#787 +class RBI::KwRestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#798 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#809 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # 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#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#804 + 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#38 + sig do + params( + file: T.nilable(::String), + begin_line: T.nilable(::Integer), + end_line: T.nilable(::Integer), + begin_column: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def begin_column; end + + # 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#27 + def end_column; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def end_line; end + + # source://rbi//lib/rbi/loc.rb#24 + sig { returns(T.nilable(::String)) } + def file; end + + # source://rbi//lib/rbi/loc.rb#56 + sig { returns(T.nilable(::String)) } + def source; end + + # source://rbi//lib/rbi/loc.rb#47 + sig { returns(::String) } + def to_s; end + + class << self + # source://rbi//lib/rbi/loc.rb#12 + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end + end +end + +# A tree that _might_ contain conflicts +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#330 +class RBI::MergeTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + 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#334 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end +end + +# Methods and args +# +# source://rbi//lib/rbi/model.rb#483 +class RBI::Method < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#513 + sig do + params( + name: ::String, + params: T::Array[::RBI::Param], + is_singleton: T::Boolean, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Method).void) + ).void + 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#533 + sig { params(param: ::RBI::Param).void } + def <<(param); end + + # source://rbi//lib/rbi/printer.rb#384 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/model.rb#568 + sig { params(name: ::String).void } + def add_block_param(name); end + + # source://rbi//lib/rbi/model.rb#558 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#553 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # source://rbi//lib/rbi/model.rb#563 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#543 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#538 + sig { params(name: ::String).void } + def add_param(name); end + + # source://rbi//lib/rbi/model.rb#548 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#585 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.nilable(::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + block: T.proc.params(node: ::RBI::Sig).void + ).void + end + def add_sig(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), &block); end + + # 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#611 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#123 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/printer.rb#437 + sig { returns(T::Boolean) } + def inline_params?; end + + # source://rbi//lib/rbi/model.rb#493 + sig { returns(T::Boolean) } + def is_singleton; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#493 + def is_singleton=(_arg0); end + + # 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#487 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#487 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#432 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/model.rb#490 + sig { returns(T::Array[::RBI::Param]) } + def params; end + + # source://rbi//lib/rbi/model.rb#499 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#499 + def sigs=(_arg0); end + + # source://rbi//lib/rbi/model.rb#620 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#496 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#496 + def visibility=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1433 +class RBI::MixesInClassMethods < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1445 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # 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#153 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1451 + sig { override.returns(::String) } + def to_s; end +end + +# Mixins +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#843 +class RBI::Mixin < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#860 + sig do + params( + name: ::String, + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # 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#484 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#850 + sig { returns(T::Array[::String]) } + def names; end +end + +# source://rbi//lib/rbi/model.rb#190 +class RBI::Module < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#204 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Module).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # 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#211 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#194 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#194 + def name=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#270 + sig { override.params(v: ::RBI::Printer).void } + def print_header(v); end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#5 +class RBI::Node + abstract! + + # source://rbi//lib/rbi/model.rb#18 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end + + # @abstract + # + # 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#287 + sig { params(_other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(_other); end + + # source://rbi//lib/rbi/model.rb#24 + sig { void } + def detach; end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#48 + sig { returns(::RBI::Group::Kind) } + def group_kind; end + + # source://rbi//lib/rbi/model.rb#15 + sig { returns(T.nilable(::RBI::Loc)) } + def loc; end + + # @return [Loc, nil] + # + # source://rbi//lib/rbi/model.rb#15 + def loc=(_arg0); end + + # Merge `self` and `other` into a single definition + # + # 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#179 + sig { returns(T::Boolean) } + def oneline?; end + + # 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#46 + sig { returns(T.nilable(::RBI::Scope)) } + def parent_scope; end + + # source://rbi//lib/rbi/model.rb#12 + sig { returns(T.nilable(::RBI::Tree)) } + def parent_tree; end + + # @return [Tree, nil] + # + # source://rbi//lib/rbi/model.rb#12 + def parent_tree=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#156 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + 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#169 + sig { params(v: ::RBI::Printer).void } + def print_blank_line_before(v); end + + # source://rbi//lib/rbi/model.rb#33 + sig { params(node: ::RBI::Node).void } + def replace(node); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#94 + sig { params(version: ::Gem::Version).returns(T::Boolean) } + def satisfies_version?(version); end + + # 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#83 +class RBI::NodeWithComments < ::RBI::Node + abstract! + + # 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#99 + sig { returns(T::Array[::String]) } + def annotations; end + + # source://rbi//lib/rbi/model.rb#90 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#90 + def comments=(_arg0); end + + # 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#188 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#104 + sig { returns(T::Array[::Gem::Requirement]) } + def version_requirements; end +end + +# source://rbi//lib/rbi/model.rb#674 +class RBI::OptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#689 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#696 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # 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#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#678 + 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#625 +class RBI::Param < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#641 + 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#446 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/printer.rb#459 + sig { returns(T::Array[::String]) } + def comments_lines; end + + # source://rbi//lib/rbi/model.rb#632 + sig { returns(::String) } + def name; end + + # 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#647 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/parser.rb#7 +class RBI::ParseError < ::StandardError + # source://rbi//lib/rbi/parser.rb#14 + sig { params(message: ::String, location: ::RBI::Loc).void } + def initialize(message, location); end + + # source://rbi//lib/rbi/parser.rb#11 + sig { returns(::RBI::Loc) } + def location; end +end + +# source://rbi//lib/rbi/parser.rb#53 +class RBI::Parser + # 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#83 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + private + + # 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#65 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # 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#60 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + # source://rbi//lib/rbi/parser.rb#76 + sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_strings(strings); end + end +end + +# source://rbi//lib/rbi/parser.rb#791 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#798 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # source://rbi//lib/rbi/parser.rb#795 + sig { returns(::RBI::Sig) } + def current; end + + # source://rbi//lib/rbi/parser.rb#850 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://rbi//lib/rbi/parser.rb#805 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# source://rbi//lib/rbi/parser.rb#153 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#163 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # source://rbi//lib/rbi/parser.rb#160 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # source://rbi//lib/rbi/parser.rb#157 + sig { returns(::RBI::Tree) } + def tree; end + + # source://rbi//lib/rbi/parser.rb#299 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://rbi//lib/rbi/parser.rb#176 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://rbi//lib/rbi/parser.rb#208 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # source://rbi//lib/rbi/parser.rb#201 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#194 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#241 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://rbi//lib/rbi/parser.rb#255 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://rbi//lib/rbi/parser.rb#272 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://rbi//lib/rbi/parser.rb#283 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # source://rbi//lib/rbi/parser.rb#467 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # source://rbi//lib/rbi/parser.rb#485 + sig { void } + def collect_orphan_comments; end + + # source://rbi//lib/rbi/parser.rb#508 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/parser.rb#513 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # source://rbi//lib/rbi/parser.rb#520 + sig { returns(T::Array[::RBI::Comment]) } + def current_sigs_comments; end + + # source://rbi//lib/rbi/parser.rb#527 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # source://rbi//lib/rbi/parser.rb#545 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # source://rbi//lib/rbi/parser.rb#574 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # source://rbi//lib/rbi/parser.rb#550 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # source://rbi//lib/rbi/parser.rb#648 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # source://rbi//lib/rbi/parser.rb#658 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # source://rbi//lib/rbi/parser.rb#708 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # source://rbi//lib/rbi/parser.rb#745 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # source://rbi//lib/rbi/parser.rb#759 + sig { void } + def separate_header_comments; end + + # source://rbi//lib/rbi/parser.rb#769 + sig { void } + def set_root_tree_loc; end + + # source://rbi//lib/rbi/parser.rb#783 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# source://rbi//lib/rbi/parser.rb#122 +class RBI::Parser::Visitor < ::Prism::Visitor + # source://rbi//lib/rbi/parser.rb#126 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # source://rbi//lib/rbi/parser.rb#136 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # source://rbi//lib/rbi/parser.rb#141 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # source://rbi//lib/rbi/parser.rb#148 + sig { params(node: ::Prism::Node).returns(::String) } + def node_string!(node); end +end + +# source://rbi//lib/rbi/printer.rb#5 +class RBI::Printer < ::RBI::Visitor + # source://rbi//lib/rbi/printer.rb#28 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(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#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/printer.rb#46 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi//lib/rbi/printer.rb#41 + sig { void } + def indent; end + + # source://rbi//lib/rbi/printer.rb#18 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # source://rbi//lib/rbi/printer.rb#12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#52 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#9 + def print_locs=(_arg0); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#72 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#58 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#65 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#83 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/printer.rb#90 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/printer.rb#78 + sig { params(file: ::RBI::File).void } + def visit_file(file); end +end + +# source://rbi//lib/rbi/model.rb#982 +class RBI::Private < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#992 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Private).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#966 +class RBI::Protected < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#976 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Protected).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#950 +class RBI::Public < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#960 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Public).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#652 +class RBI::ReqParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#663 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#669 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end +end + +# source://rbi//lib/rbi/model.rb#1456 +class RBI::RequiresAncestor < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1469 + 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#870 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/index.rb#163 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1460 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1475 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#701 +class RBI::RestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#712 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#723 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # 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#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#718 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 +module RBI::Rewriters; end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 +class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 + sig { params(with_todo_comment: T::Boolean).void } + def initialize(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 + sig { params(attr: ::RBI::Attr).void } + def add_attr_sig(attr); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 + sig { params(method: ::RBI::Method).void } + def add_method_sig(method); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 + sig { params(node: ::RBI::NodeWithComments).void } + def add_todo_comment(node); end +end + +# source://rbi//lib/rbi/rewriters/annotate.rb#6 +class RBI::Rewriters::Annotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/annotate.rb#10 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#18 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/annotate.rb#31 + sig { params(node: ::RBI::NodeWithComments).void } + def annotate_node(node); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#38 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def root?(node); end +end + +# source://rbi//lib/rbi/rewriters/deannotate.rb#6 +class RBI::Rewriters::Deannotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/deannotate.rb#10 + sig { params(annotation: ::String).void } + def initialize(annotation); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/deannotate.rb#27 + sig { params(node: ::RBI::NodeWithComments).void } + def deannotate_node(node); end +end + +# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations +# in comments. As an example: +# +# ~~~rb +# tree = Parser.parse_string(<<~RBI) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# +# # @version <= 0.3.0 +# def bar(arg1) +# end +# end +# RBI +# +# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) +# +# assert_equal(<<~RBI, tree.string) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# end +# RBI +# ~~~ +# +# Supported operators: +# - equals `=` +# - not equals `!=` +# - greater than `>` +# - greater than or equal to `>=` +# - less than `<` +# - less than or equal to `<=` +# - pessimistic or twiddle-wakka`~>` +# +# And/or logic: +# - "And" logic: put multiple versions on the same line +# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 +# - "Or" logic: put multiple versions on subsequent lines +# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 +# ``` +# # @version < 0.3.0 +# # @version > 1.0.0 +# ``` +# Prerelease versions: +# - Prerelease versions are considered less than their non-prerelease counterparts +# - e.g. `0.4.0-prerelease` is less than `0.4.0` +# +# RBI with no versions: +# - RBI with no version annotations are automatically counted towards ALL versions +# +# source://rbi//lib/rbi/rewriters/filter_versions.rb#57 +class RBI::Rewriters::FilterVersions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/filter_versions.rb#73 + sig { params(version: ::Gem::Version).void } + def initialize(version); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#79 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + class << self + # source://rbi//lib/rbi/rewriters/filter_versions.rb#66 + sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } + def filter(tree, version); end + end +end + +# source://rbi//lib/rbi/rewriters/filter_versions.rb#60 +RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#6 +class RBI::Rewriters::GroupNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Merge two RBI trees together +# +# Be this `Tree`: +# ~~~rb +# class Foo +# attr_accessor :a +# def m; end +# C = 10 +# end +# ~~~ +# +# Merged with this one: +# ~~~rb +# class Foo +# attr_reader :a +# def m(x); end +# C = 10 +# end +# ~~~ +# +# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: +# ~~~rb +# class Foo +# <<<<<<< left +# attr_accessor :a +# def m; end +# ======= +# attr_reader :a +# def m(x); end +# >>>>>>> right +# C = 10 +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 +class RBI::Rewriters::Merge + # 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#79 + sig { params(tree: ::RBI::Tree).void } + def merge(tree); end + + # 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#54 + sig do + params( + left: ::RBI::Tree, + right: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge_trees(left, right, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + end +end + +# Used for logging / error displaying purpose +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#86 +class RBI::Rewriters::Merge::Conflict < ::T::Struct + const :left, ::RBI::Node + const :right, ::RBI::Node + const :left_name, ::String + const :right_name, ::String + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11372/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# Merge adjacent conflict trees +# +# Transform this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# ======= +# def m1(a); end +# >>>>>>> right +# <<<<<<< left +# def m2(a); end +# ======= +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# Into this: +# ~~~rb +# class Foo +# <<<<<<< left +# def m1; end +# def m2(a); end +# ======= +# def m1(a); end +# def m2; end +# >>>>>>> right +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#245 +class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # 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#252 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # 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 + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 +class RBI::Rewriters::Merge::Keep < ::T::Enum + enums do + NONE = new + LEFT = new + RIGHT = new + end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 +class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 + sig do + params( + output: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).void + 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#104 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end + + # 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#168 + sig { returns(::RBI::Tree) } + def current_scope; end + + # 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#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#173 + sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } + def previous_definition(node); end + + # 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 + +# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6 +class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 +class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Remove all definitions existing in the index from the current tree +# +# Let's create an `Index` from two different `Tree`s: +# ~~~rb +# tree1 = Parse.parse_string(<<~RBI) +# class Foo +# def foo; end +# end +# RBI +# +# tree2 = Parse.parse_string(<<~RBI) +# FOO = 10 +# RBI +# +# index = Index.index(tree1, tree2) +# ~~~ +# +# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: +# ~~~rb +# tree_to_clean = Parser.parse_string(<<~RBI) +# class Foo +# def foo; end +# def bar; end +# end +# FOO = 10 +# BAR = 42 +# RBI +# +# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) +# +# assert_equal(<<~RBI, cleaned_tree) +# class Foo +# def bar; end +# end +# BAR = 42 +# RBI +# +# assert_equal(<<~OPERATIONS, operations.join("\n")) +# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) +# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) +# OPERATIONS +# ~~~ +# +# 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#55 + sig { params(index: ::RBI::Index).void } + def initialize(index); end + + # 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#83 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # 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#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#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#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#70 + sig do + params( + tree: ::RBI::Tree, + index: ::RBI::Index + ).returns([::RBI::Tree, T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]]) + end + def remove(tree, index); end + end +end + +# 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#141 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11372/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 +class RBI::Rewriters::SortNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # 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#94 + sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } + def node_name(node); end + + # 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#106 + sig { params(node: ::RBI::Node).void } + def sort_node_names!(node); end +end + +# Scopes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#176 +class RBI::Scope < ::RBI::Tree + include ::RBI::Indexable + + abstract! + + # 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#356 + sig { returns(T.self_type) } + def dup_empty; end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#182 + sig { abstract.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#93 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # 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#253 + sig { abstract.params(v: ::RBI::Printer).void } + def print_header(v); end + + # source://rbi//lib/rbi/model.rb#185 + sig { override.returns(::String) } + def to_s; end +end + +# A conflict between two scope headers +# +# Is rendered as a merge conflict between `left` and` right` for scope definitions: +# ~~~rb +# <<<<<<< left +# class Foo +# ======= +# module Foo +# >>>>>>> right +# def m1; end +# end +# ~~~ +# +# source://rbi//lib/rbi/rewriters/merge_trees.rb#628 +class RBI::ScopeConflict < ::RBI::Tree + # 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#651 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 + sig { returns(::RBI::Scope) } + def left; end + + # 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#632 + def right; end +end + +# Sends +# +# source://rbi//lib/rbi/model.rb#1000 +class RBI::Send < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1018 + sig do + params( + method: ::String, + args: T::Array[::RBI::Arg], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Send).void) + ).void + end + def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1026 + sig { params(arg: ::RBI::Arg).void } + def <<(arg); end + + # source://rbi//lib/rbi/model.rb#1031 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # 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#1007 + sig { returns(T::Array[::RBI::Arg]) } + def args; end + + # 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#193 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1004 + sig { returns(::String) } + def method; end + + # source://rbi//lib/rbi/model.rb#1036 + sig { returns(::String) } + def to_s; end +end + +# Sorbet's sigs +# +# source://rbi//lib/rbi/model.rb#1100 +class RBI::Sig < ::RBI::Node + # source://rbi//lib/rbi/model.rb#1132 + sig do + params( + params: T::Array[::RBI::SigParam], + return_type: T.nilable(::String), + is_abstract: T::Boolean, + is_override: T::Boolean, + is_overridable: T::Boolean, + is_final: T::Boolean, + type_params: T::Array[::String], + checked: T.nilable(::Symbol), + loc: T.nilable(::RBI::Loc), + block: T.nilable(T.proc.params(node: ::RBI::Sig).void) + ).void + 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#1157 + sig { params(param: ::RBI::SigParam).void } + def <<(param); end + + # source://rbi//lib/rbi/model.rb#1167 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # 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#1162 + sig { params(name: ::String, type: ::String).void } + def add_param(name, type); end + + # source://rbi//lib/rbi/model.rb#1116 + sig { returns(T.nilable(::Symbol)) } + def checked; end + + # @return [Symbol, nil] + # + # source://rbi//lib/rbi/model.rb#1116 + def checked=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#656 + sig { returns(T::Boolean) } + def inline_params?; end + + # source://rbi//lib/rbi/model.rb#1110 + sig { returns(T::Boolean) } + def is_abstract; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_abstract=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_final; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_final=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_overridable; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_overridable=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_override; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1110 + def is_override=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#651 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/model.rb#1104 + sig { returns(T::Array[::RBI::SigParam]) } + def params; end + + # source://rbi//lib/rbi/model.rb#1107 + sig { returns(T.nilable(::String)) } + def return_type; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1107 + def return_type=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1113 + sig { returns(T::Array[::String]) } + def type_params; end + + private + + # 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#674 + sig { params(v: ::RBI::Printer).void } + def print_as_line(v); end + + # source://rbi//lib/rbi/printer.rb#663 + sig { returns(T::Array[::String]) } + def sig_modifiers; end +end + +# source://rbi//lib/rbi/model.rb#1176 +class RBI::SigParam < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#1191 + sig do + params( + name: ::String, + type: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) + ).void + end + def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1199 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # 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#764 + sig { returns(T::Array[::String]) } + def comments_lines; end + + # source://rbi//lib/rbi/model.rb#1180 + sig { returns(::String) } + def name; end + + # 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#1180 + def type; end +end + +# source://rbi//lib/rbi/model.rb#251 +class RBI::SingletonClass < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#261 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#267 + sig { override.returns(::String) } + def fully_qualified_name; end + + # 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#272 +class RBI::Struct < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#294 + sig do + params( + name: ::String, + members: T::Array[::Symbol], + keyword_init: T::Boolean, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) + ).void + 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#394 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#303 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#282 + sig { returns(T::Boolean) } + def keyword_init; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#282 + def keyword_init=(_arg0); end + + # source://rbi//lib/rbi/model.rb#279 + sig { returns(T::Array[::Symbol]) } + def members; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#279 + def members=(_arg0); end + + # source://rbi//lib/rbi/model.rb#276 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#276 + def name=(_arg0); end + + # 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#1317 +class RBI::TEnum < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1328 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(klass: ::RBI::TEnum).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#1334 +class RBI::TEnumBlock < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1348 + sig do + params( + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) + ).void + end + def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1360 + sig { params(name: ::String).void } + def <<(name); end + + # 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#1355 + sig { returns(T::Boolean) } + def empty?; end + + # 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#556 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#1338 + sig { returns(T::Array[::String]) } + def names; end + + # source://rbi//lib/rbi/model.rb#1365 + sig { override.returns(::String) } + def to_s; end +end + +# Sorbet's T::Struct +# +# source://rbi//lib/rbi/model.rb#1206 +class RBI::TStruct < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1217 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(klass: ::RBI::TStruct).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end +end + +# source://rbi//lib/rbi/model.rb#1255 +class RBI::TStructConst < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1268 + sig do + params( + name: ::String, + type: ::String, + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) + ).void + 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#547 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1274 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#203 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1280 + 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#1223 +class RBI::TStructField < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#1244 + sig do + params( + name: ::String, + type: ::String, + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # 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#538 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1233 + sig { returns(T.nilable(::String)) } + def default; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1233 + def default=(_arg0); end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#1252 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#1230 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1230 + def name=(_arg0); end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1230 + def type; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1230 + def type=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1285 +class RBI::TStructProp < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1298 + sig do + params( + name: ::String, + type: ::String, + default: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) + ).void + 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#570 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1304 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#213 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1310 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#106 +class RBI::Tree < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#119 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#126 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/printer.rb#226 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi//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//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.14.1/lib/tapioca/rbi_ext/model.rb#38 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) + ).returns(::RBI::Scope) + end + def create_class(name, superclass_name: T.unsafe(nil), &block); end + + # source://tapioca/0.14.1/lib/tapioca/rbi_ext/model.rb#45 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # source://tapioca/0.14.1/lib/tapioca/rbi_ext/model.rb#55 + sig { params(name: ::String).void } + def create_extend(name); end + + # source://tapioca/0.14.1/lib/tapioca/rbi_ext/model.rb#50 + sig { params(name: ::String).void } + def create_include(name); end + + # source://tapioca/0.14.1/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, + 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), comments: T.unsafe(nil)); end + + # source://tapioca/0.14.1/lib/tapioca/rbi_ext/model.rb#113 + sig do + params( + name: ::String, + sigs: T::Array[::RBI::Sig], + parameters: T::Array[::RBI::Param], + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://tapioca/0.14.1/lib/tapioca/rbi_ext/model.rb#60 + sig { params(name: ::String).void } + def create_mixes_in_class_methods(name); end + + # source://tapioca/0.14.1/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.14.1/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.14.1/lib/tapioca/rbi_ext/model.rb#135 + sig do + params( + parameters: T::Hash[T.any(::String, ::Symbol), ::String], + type_parameters: T::Array[::String], + return_type: ::String + ).returns(::RBI::Sig) + end + def create_sig(parameters:, type_parameters: T.unsafe(nil), return_type: T.unsafe(nil)); end + + # source://tapioca/0.14.1/lib/tapioca/rbi_ext/model.rb#74 + sig do + params( + name: ::String, + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).void + 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#41 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # source://rbi//lib/rbi/model.rb#132 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#118 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 + sig { void } + def group_nodes!; end + + # source://rbi//lib/rbi/index.rb#68 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + 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#46 + sig { void } + def nest_non_public_methods!; end + + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 + sig { void } + def nest_singleton_methods!; end + + # source://rbi//lib/rbi/model.rb#110 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi//lib/rbi/printer.rb#233 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 + sig { void } + def sort_nodes!; end + + private + + # source://tapioca/0.14.1/lib/tapioca/rbi_ext/model.rb#150 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # source://tapioca/0.14.1/lib/tapioca/rbi_ext/model.rb#145 + sig { returns(T::Hash[::String, ::RBI::Node]) } + def nodes_cache; end +end + +# source://rbi//lib/rbi/model.rb#1398 +class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1413 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # 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#1421 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#183 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1402 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1428 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1402 + def value; end +end + +# source://rbi//lib/rbi/parser.rb#20 +class RBI::UnexpectedParserError < ::StandardError + # source://rbi//lib/rbi/parser.rb#27 + sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } + def initialize(parent_exception, last_location); end + + # source://rbi//lib/rbi/parser.rb#24 + sig { returns(::RBI::Loc) } + def last_location; end + + # source://rbi//lib/rbi/parser.rb#34 + sig { params(io: T.any(::IO, ::StringIO)).void } + def print_debug(io: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/version.rb#5 +RBI::VERSION = T.let(T.unsafe(nil), String) + +# Visibility +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#914 +class RBI::Visibility < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#924 + 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#930 + sig { params(other: ::RBI::Visibility).returns(T::Boolean) } + def ==(other); end + + # 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#945 + sig { returns(T::Boolean) } + def private?; end + + # source://rbi//lib/rbi/model.rb#940 + sig { returns(T::Boolean) } + def protected?; end + + # source://rbi//lib/rbi/model.rb#935 + sig { returns(T::Boolean) } + def public?; end + + # source://rbi//lib/rbi/model.rb#921 + sig { returns(::Symbol) } + def visibility; end +end + +# 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#59 + sig { params(visibility: ::RBI::Visibility).void } + def initialize(visibility); end + + # 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#861 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 + sig { returns(::RBI::Visibility) } + def visibility; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/visitor.rb#5 +class RBI::Visitor + abstract! + + # @abstract + # + # source://rbi//lib/rbi/visitor.rb#12 + sig { abstract.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/visitor.rb#15 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end +end diff --git a/sorbet/rbi/gems/regexp_parser@2.7.0.rbi b/sorbet/rbi/gems/regexp_parser@2.7.0.rbi new file mode 100644 index 0000000..35b1936 --- /dev/null +++ b/sorbet/rbi/gems/regexp_parser@2.7.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `regexp_parser` gem. +# Please instead update this file by running `bin/tapioca gem regexp_parser`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi b/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi new file mode 100644 index 0000000..22802d5 --- /dev/null +++ b/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi @@ -0,0 +1,390 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `reverse_markdown` gem. +# Please instead update this file by running `bin/tapioca gem reverse_markdown`. + + +# source://reverse_markdown//lib/reverse_markdown/version.rb#1 +module ReverseMarkdown + class << self + # source://reverse_markdown//lib/reverse_markdown.rb#60 + def cleaner; end + + # @yield [@config] + # + # source://reverse_markdown//lib/reverse_markdown.rb#54 + def config; end + + # source://reverse_markdown//lib/reverse_markdown.rb#37 + def convert(input, options = T.unsafe(nil)); end + end +end + +# source://reverse_markdown//lib/reverse_markdown/cleaner.rb#2 +class ReverseMarkdown::Cleaner + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#58 + def clean_punctuation_characters(string); end + + # Find non-asterisk content that is enclosed by two or + # more asterisks. Ensure that only one whitespace occurs + # in the border area. + # Same for underscores and brackets. + # + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#32 + def clean_tag_borders(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#62 + def force_encoding(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#20 + def remove_inner_whitespaces(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#16 + def remove_leading_newlines(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#12 + def remove_newlines(string); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#4 + def tidy(string); end + + private + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#81 + def present_or_default(string, default); end + + # source://reverse_markdown//lib/reverse_markdown/cleaner.rb#69 + def preserve_border_whitespaces(string, options = T.unsafe(nil), &block); end +end + +# source://reverse_markdown//lib/reverse_markdown/config.rb#2 +class ReverseMarkdown::Config + # @return [Config] a new instance of Config + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#5 + def initialize; end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#34 + def force_encoding; end + + # Sets the attribute force_encoding + # + # @param value the value to set the attribute force_encoding to. + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#3 + def force_encoding=(_arg0); end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#26 + def github_flavored; end + + # Sets the attribute github_flavored + # + # @param value the value to set the attribute github_flavored to. + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#3 + def github_flavored=(_arg0); end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#30 + def tag_border; end + + # Sets the attribute tag_border + # + # @param value the value to set the attribute tag_border to. + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#3 + def tag_border=(_arg0); end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#22 + def unknown_tags; end + + # Sets the attribute unknown_tags + # + # @param value the value to set the attribute unknown_tags to. + # + # source://reverse_markdown//lib/reverse_markdown/config.rb#3 + def unknown_tags=(_arg0); end + + # source://reverse_markdown//lib/reverse_markdown/config.rb#15 + def with(options = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters.rb#2 +module ReverseMarkdown::Converters + class << self + # source://reverse_markdown//lib/reverse_markdown/converters.rb#18 + def default_converter(tag_name); end + + # source://reverse_markdown//lib/reverse_markdown/converters.rb#12 + def lookup(tag_name); end + + # source://reverse_markdown//lib/reverse_markdown/converters.rb#3 + def register(tag_name, converter); end + + # source://reverse_markdown//lib/reverse_markdown/converters.rb#8 + def unregister(tag_name); end + end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/a.rb#3 +class ReverseMarkdown::Converters::A < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/a.rb#4 + def convert(node, state = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/a.rb#20 + def prepend_space?(node); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/base.rb#3 +class ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/base.rb#14 + def escape_keychars(string); end + + # source://reverse_markdown//lib/reverse_markdown/converters/base.rb#18 + def extract_title(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/base.rb#10 + def treat(node, state); end + + # source://reverse_markdown//lib/reverse_markdown/converters/base.rb#4 + def treat_children(node, state); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/blockquote.rb#3 +class ReverseMarkdown::Converters::Blockquote < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/blockquote.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/br.rb#3 +class ReverseMarkdown::Converters::Br < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/br.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/bypass.rb#3 +class ReverseMarkdown::Converters::Bypass < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/bypass.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/code.rb#3 +class ReverseMarkdown::Converters::Code < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/code.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/del.rb#3 +class ReverseMarkdown::Converters::Del < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/del.rb#4 + def convert(node, state = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/del.rb#17 + def disabled?; end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/del.rb#13 + def enabled?; end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/details.rb#3 +class ReverseMarkdown::Converters::Details < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/details.rb#4 + def convert(node, state = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/details.rb#17 + def disabled?; end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/details.rb#13 + def enabled?; end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/div.rb#3 +class ReverseMarkdown::Converters::Div < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/div.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/drop.rb#3 +class ReverseMarkdown::Converters::Drop < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/drop.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/em.rb#3 +class ReverseMarkdown::Converters::Em < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/em.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/figcaption.rb#3 +class ReverseMarkdown::Converters::FigCaption < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/figcaption.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/figure.rb#3 +class ReverseMarkdown::Converters::Figure < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/figure.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/h.rb#3 +class ReverseMarkdown::Converters::H < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/h.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/hr.rb#3 +class ReverseMarkdown::Converters::Hr < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/hr.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/ignore.rb#3 +class ReverseMarkdown::Converters::Ignore < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/ignore.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/img.rb#3 +class ReverseMarkdown::Converters::Img < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/img.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/li.rb#3 +class ReverseMarkdown::Converters::Li < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/li.rb#4 + def convert(node, state = T.unsafe(nil)); end + + # source://reverse_markdown//lib/reverse_markdown/converters/li.rb#24 + def indentation_from(state); end + + # source://reverse_markdown//lib/reverse_markdown/converters/li.rb#15 + def prefix_for(node); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/ol.rb#3 +class ReverseMarkdown::Converters::Ol < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/ol.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/p.rb#3 +class ReverseMarkdown::Converters::P < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/p.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/pass_through.rb#3 +class ReverseMarkdown::Converters::PassThrough < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/pass_through.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#3 +class ReverseMarkdown::Converters::Pre < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#4 + def convert(node, state = T.unsafe(nil)); end + + private + + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#27 + def language(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#36 + def language_from_confluence_class(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#32 + def language_from_highlight_class(node); end + + # Override #treat as proposed in https://github.com/xijo/reverse_markdown/pull/69 + # + # source://reverse_markdown//lib/reverse_markdown/converters/pre.rb#16 + def treat(node, state); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/strong.rb#3 +class ReverseMarkdown::Converters::Strong < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/strong.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/table.rb#3 +class ReverseMarkdown::Converters::Table < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/table.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/td.rb#3 +class ReverseMarkdown::Converters::Td < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/td.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/text.rb#3 +class ReverseMarkdown::Converters::Text < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#4 + def convert(node, options = T.unsafe(nil)); end + + private + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#54 + def preserve_keychars_within_backticks(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#38 + def preserve_nbsp(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#42 + def preserve_tags(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#46 + def remove_border_newlines(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#50 + def remove_inner_newlines(text); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#14 + def treat_empty(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/text.rb#25 + def treat_text(node); end +end + +# source://reverse_markdown//lib/reverse_markdown/converters/tr.rb#3 +class ReverseMarkdown::Converters::Tr < ::ReverseMarkdown::Converters::Base + # source://reverse_markdown//lib/reverse_markdown/converters/tr.rb#4 + def convert(node, state = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://reverse_markdown//lib/reverse_markdown/converters/tr.rb#10 + def table_header_row?(node); end + + # source://reverse_markdown//lib/reverse_markdown/converters/tr.rb#14 + def underline_for(node); end +end + +# source://reverse_markdown//lib/reverse_markdown/errors.rb#2 +class ReverseMarkdown::Error < ::StandardError; end + +# source://reverse_markdown//lib/reverse_markdown/errors.rb#8 +class ReverseMarkdown::InvalidConfigurationError < ::ReverseMarkdown::Error; end + +# source://reverse_markdown//lib/reverse_markdown/errors.rb#5 +class ReverseMarkdown::UnknownTagError < ::ReverseMarkdown::Error; end + +# source://reverse_markdown//lib/reverse_markdown/version.rb#2 +ReverseMarkdown::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rexml@3.2.5.rbi b/sorbet/rbi/gems/rexml@3.2.5.rbi new file mode 100644 index 0000000..ab6db3f --- /dev/null +++ b/sorbet/rbi/gems/rexml@3.2.5.rbi @@ -0,0 +1,364 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rexml` gem. +# Please instead update this file by running `bin/tapioca gem rexml`. + + +# source://rexml//lib/rexml/encoding.rb#4 +module REXML::Encoding + # source://rexml//lib/rexml/encoding.rb#29 + def decode(string); end + + # source://rexml//lib/rexml/encoding.rb#25 + def encode(string); end + + # ID ---> Encoding name + # + # source://rexml//lib/rexml/encoding.rb#6 + def encoding; end + + # source://rexml//lib/rexml/encoding.rb#7 + def encoding=(encoding); end + + private + + # source://rexml//lib/rexml/encoding.rb#34 + def find_encoding(name); end +end + +# A Source that wraps an IO. See the Source class for method +# documentation +# +# source://rexml//lib/rexml/source.rb#159 +class REXML::IOSource < ::REXML::Source + # block_size has been deprecated + # + # @return [IOSource] a new instance of IOSource + # + # source://rexml//lib/rexml/source.rb#163 + def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#215 + def consume(pattern); end + + # @return the current line in the source + # + # source://rexml//lib/rexml/source.rb#244 + def current_line; end + + # @return [Boolean] + # + # source://rexml//lib/rexml/source.rb#235 + def empty?; end + + # source://rexml//lib/rexml/source.rb#219 + def match(pattern, cons = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#239 + def position; end + + # source://rexml//lib/rexml/source.rb#207 + def read; end + + # source://rexml//lib/rexml/source.rb#184 + def scan(pattern, cons = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/source.rb#286 + def encoding_updated; end + + # source://rexml//lib/rexml/source.rb#266 + def readline; end +end + +# source://rexml//lib/rexml/parseexception.rb#3 +class REXML::ParseException < ::RuntimeError + # @return [ParseException] a new instance of ParseException + # + # source://rexml//lib/rexml/parseexception.rb#6 + def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parseexception.rb#48 + def context; end + + # Returns the value of attribute continued_exception. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def continued_exception; end + + # Sets the attribute continued_exception + # + # @param value the value to set the attribute continued_exception to. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def continued_exception=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#43 + def line; end + + # Returns the value of attribute parser. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def parser; end + + # Sets the attribute parser + # + # @param value the value to set the attribute parser to. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def parser=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#38 + def position; end + + # Returns the value of attribute source. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def source; end + + # Sets the attribute source + # + # @param value the value to set the attribute source to. + # + # source://rexml//lib/rexml/parseexception.rb#4 + def source=(_arg0); end + + # source://rexml//lib/rexml/parseexception.rb#13 + def to_s; end +end + +# = Using the Pull Parser +# This API is experimental, and subject to change. +# parser = PullParser.new( "texttxet" ) +# while parser.has_next? +# res = parser.next +# puts res[1]['att'] if res.start_tag? and res[0] == 'b' +# end +# See the PullEvent class for information on the content of the results. +# The data is identical to the arguments passed for the various events to +# the StreamListener API. +# +# Notice that: +# parser = PullParser.new( "BAD DOCUMENT" ) +# while parser.has_next? +# res = parser.next +# raise res[1] if res.error? +# end +# +# Nat Price gave me some good ideas for the API. +# +# source://rexml//lib/rexml/parsers/baseparser.rb#29 +class REXML::Parsers::BaseParser + # @return [BaseParser] a new instance of BaseParser + # + # source://rexml//lib/rexml/parsers/baseparser.rb#115 + def initialize(source); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#120 + def add_listener(listener); end + + # Returns true if there are no more events + # + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#146 + def empty?; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#438 + def entity(reference, entities); end + + # Returns true if there are more events. Synonymous with !empty? + # + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#151 + def has_next?; end + + # Escapes all possible entities + # + # source://rexml//lib/rexml/parsers/baseparser.rb#449 + def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end + + # Peek at the +depth+ event in the stack. The first element on the stack + # is at depth 0. If +depth+ is -1, will parse to the end of the input + # stream and return the last event, which is always :end_document. + # Be aware that this causes the stream to be parsed up to the +depth+ + # event, so you can effectively pre-parse the entire document (pull the + # entire thing into memory) using this method. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#167 + def peek(depth = T.unsafe(nil)); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#136 + def position; end + + # Returns the next event. This is a +PullEvent+ object. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#182 + def pull; end + + # Returns the value of attribute source. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#124 + def source; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#126 + def stream=(source); end + + # Unescapes all possible entities + # + # source://rexml//lib/rexml/parsers/baseparser.rb#465 + def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end + + # Push an event back on the head of the stream. This method + # has (theoretically) infinite depth. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#157 + def unshift(token); end + + private + + # @return [Boolean] + # + # source://rexml//lib/rexml/parsers/baseparser.rb#495 + def need_source_encoding_update?(xml_declaration_encoding); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#589 + def parse_attributes(prefixes, curr_ns); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#514 + def parse_id(base_error_message, accept_external_id:, accept_public_id:); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#542 + def parse_id_invalid_details(accept_external_id:, accept_public_id:); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#501 + def parse_name(base_error_message); end + + # source://rexml//lib/rexml/parsers/baseparser.rb#580 + def process_instruction; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#190 + def pull_event; end +end + +# source://rexml//lib/rexml/parsers/baseparser.rb#102 +REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#103 +REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#104 +REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#38 +REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#37 +REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) + +# A Source can be searched for patterns, and wraps buffers and other +# objects and provides consumption of text +# +# source://rexml//lib/rexml/source.rb#31 +class REXML::Source + include ::REXML::Encoding + + # Constructor + # value, overriding all encoding detection + # + # @param arg must be a String, and should be a valid XML document + # @param encoding if non-null, sets the encoding of the source to this + # @return [Source] a new instance of Source + # + # source://rexml//lib/rexml/source.rb#43 + def initialize(arg, encoding = T.unsafe(nil)); end + + # The current buffer (what we're going to read next) + # + # source://rexml//lib/rexml/source.rb#34 + def buffer; end + + # source://rexml//lib/rexml/source.rb#87 + def consume(pattern); end + + # @return the current line in the source + # + # source://rexml//lib/rexml/source.rb#117 + def current_line; end + + # @return [Boolean] true if the Source is exhausted + # + # source://rexml//lib/rexml/source.rb#108 + def empty?; end + + # Returns the value of attribute encoding. + # + # source://rexml//lib/rexml/source.rb#37 + def encoding; end + + # Inherited from Encoding + # Overridden to support optimized en/decoding + # + # source://rexml//lib/rexml/source.rb#56 + def encoding=(enc); end + + # The line number of the last consumed text + # + # source://rexml//lib/rexml/source.rb#36 + def line; end + + # source://rexml//lib/rexml/source.rb#101 + def match(pattern, cons = T.unsafe(nil)); end + + # source://rexml//lib/rexml/source.rb#91 + def match_to(char, pattern); end + + # source://rexml//lib/rexml/source.rb#95 + def match_to_consume(char, pattern); end + + # source://rexml//lib/rexml/source.rb#112 + def position; end + + # source://rexml//lib/rexml/source.rb#84 + def read; end + + # Scans the source for a given pattern. Note, that this is not your + # usual scan() method. For one thing, the pattern argument has some + # requirements; for another, the source can be consumed. You can easily + # confuse this method. Originally, the patterns were easier + # to construct and this method more robust, because this method + # generated search regexps on the fly; however, this was + # computationally expensive and slowed down the entire REXML package + # considerably, since this is by far the most commonly called method. + # /^\s*(#{your pattern, with no groups})(.*)/. The first group + # will be returned; the second group is used if the consume flag is + # set. + # everything after it in the Source. + # pattern is not found. + # + # @param pattern must be a Regexp, and must be in the form of + # @param consume if true, the pattern returned will be consumed, leaving + # @return the pattern, if found, or nil if the Source is empty or the + # + # source://rexml//lib/rexml/source.rb#77 + def scan(pattern, cons = T.unsafe(nil)); end + + private + + # source://rexml//lib/rexml/source.rb#125 + def detect_encoding; end + + # source://rexml//lib/rexml/source.rb#146 + def encoding_updated; end +end + +# source://rexml//lib/rexml/undefinednamespaceexception.rb#4 +class REXML::UndefinedNamespaceException < ::REXML::ParseException + # @return [UndefinedNamespaceException] a new instance of UndefinedNamespaceException + # + # source://rexml//lib/rexml/undefinednamespaceexception.rb#5 + def initialize(prefix, source, parser); end +end diff --git a/sorbet/rbi/gems/rubocop-ast@1.26.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.26.0.rbi new file mode 100644 index 0000000..1fa5113 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-ast@1.26.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-ast` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-ast`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop-espago@1.0.2.rbi b/sorbet/rbi/gems/rubocop-espago@1.0.2.rbi new file mode 100644 index 0000000..32f1e0b --- /dev/null +++ b/sorbet/rbi/gems/rubocop-espago@1.0.2.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-espago` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-espago`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop@1.45.1.rbi b/sorbet/rbi/gems/rubocop@1.45.1.rbi new file mode 100644 index 0000000..753389f --- /dev/null +++ b/sorbet/rbi/gems/rubocop@1.45.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop` gem. +# Please instead update this file by running `bin/tapioca gem rubocop`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi b/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi new file mode 100644 index 0000000..c92481c --- /dev/null +++ b/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby-progressbar` gem. +# Please instead update this file by running `bin/tapioca gem ruby-progressbar`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/shale@0.9.0.rbi b/sorbet/rbi/gems/shale@0.9.0.rbi new file mode 100644 index 0000000..d677e30 --- /dev/null +++ b/sorbet/rbi/gems/shale@0.9.0.rbi @@ -0,0 +1,2027 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `shale` gem. +# Please instead update this file by running `bin/tapioca gem shale`. + + +# Main library namespace +# +# Shale uses adapters for parsing and serializing documents. +# For handling JSON, YAML, TOML and CSV, adapter must implement .load and .dump methods, so +# e.g for handling JSON, MultiJson works out of the box. +# +# Adapters for XML handling are more complicated and must conform to [@see shale/adapter/rexml] +# Shale provides adaters for most popular XML parsing libraries: +# Shale::Adapter::REXML, Shale::Adapter::Nokogiri and Shale::Adapter::Ox +# +# By default Shale::Adapter::REXML is used so no external dependencies are needed, but it's +# not as performant as Nokogiri or Ox, so you may want to change it. +# +# @api public +# @example setting MultiJSON for handling JSON documents +# Shale.json_adapter = MultiJson +# Shale.json_adapter # => MultiJson +# @example setting TOML adapter for handling TOML documents +# require 'shale/adapter/toml_rb' +# +# Shale.toml_adapter = Shale::Adapter::TomlRB +# Shale.toml_adapter # => Shale::Adapter::TomlRB +# @example setting REXML adapter for handling XML documents +# Shale.xml_adapter = Shale::Adapter::REXML +# Shale.xml_adapter # => Shale::Adapter::REXML +# @example setting Nokogiri adapter for handling XML documents +# require 'shale/adapter/nokogiri' +# +# Shale.xml_adapter = Shale::Adapter::Nokogir +# Shale.xml_adapter # => Shale::Adapter::Nokogir +# @example setting Ox adapter for handling XML documents +# require 'shale/adapter/ox' +# +# Shale.xml_adapter = Shale::Adapter::Ox +# Shale.xml_adapter # => Shale::Adapter::Ox +# +# source://shale//lib/shale/attribute.rb#3 +module Shale + class << self + # Return CSV adapter. By default CSV is used + # + # @api public + # @example + # Shale.csv_adapter + # # => Shale::Adapter::CSV + # @return [.load, .dump] + # + # source://shale//lib/shale.rb#152 + def csv_adapter; end + + # Set CSV adapter + # + # @api public + # @example + # Shale.csv_adapter = Shale::Adapter::CSV + # @param adapter [.load, .dump] + # + # source://shale//lib/shale.rb#100 + def csv_adapter=(_arg0); end + + # Return JSON adapter. By default Shale::Adapter::JSON is used + # + # @api public + # @example + # Shale.json_adapter + # # => Shale::Adapter::JSON + # @return [.load, .dump] + # + # source://shale//lib/shale.rb#126 + def json_adapter; end + + # Set JSON adapter + # + # @api public + # @example + # Shale.json_adapter = Shale::Adapter::JSON + # @param adapter [.load, .dump] + # + # source://shale//lib/shale.rb#66 + def json_adapter=(_arg0); end + + # TOML adapter accessor. + # + # @api public + # @example setting adapter + # Shale.toml_adapter = Shale::Adapter::TomlRB + # @example getting adapter + # Shale.toml_adapter + # # => Shale::Adapter::TomlRB + # @param adapter [@see Shale::Adapter::TomlRB] + # + # source://shale//lib/shale.rb#90 + def toml_adapter; end + + # TOML adapter accessor. + # + # @api public + # @example setting adapter + # Shale.toml_adapter = Shale::Adapter::TomlRB + # @example getting adapter + # Shale.toml_adapter + # # => Shale::Adapter::TomlRB + # @param adapter [@see Shale::Adapter::TomlRB] + # + # source://shale//lib/shale.rb#90 + def toml_adapter=(_arg0); end + + # XML adapter accessor. Available adapters are Shale::Adapter::REXML, + # Shale::Adapter::Nokogiri and Shale::Adapter::Ox + # + # @api public + # @example setting adapter + # Shale.xml_adapter = Shale::Adapter::REXML + # @example getting adapter + # Shale.xml_adapter + # # => Shale::Adapter::REXML + # @param adapter [@see Shale::Adapter::REXML] + # + # source://shale//lib/shale.rb#115 + def xml_adapter; end + + # XML adapter accessor. Available adapters are Shale::Adapter::REXML, + # Shale::Adapter::Nokogiri and Shale::Adapter::Ox + # + # @api public + # @example setting adapter + # Shale.xml_adapter = Shale::Adapter::REXML + # @example getting adapter + # Shale.xml_adapter + # # => Shale::Adapter::REXML + # @param adapter [@see Shale::Adapter::REXML] + # + # source://shale//lib/shale.rb#115 + def xml_adapter=(_arg0); end + + # Return YAML adapter. By default YAML is used + # + # @api public + # @example + # Shale.yaml_adapter + # # => YAML + # @return [.load, .dump] + # + # source://shale//lib/shale.rb#139 + def yaml_adapter; end + + # Set YAML adapter + # + # @api public + # @example + # Shale.yaml_adapter = YAML + # @param adapter [.load, .dump] + # + # source://shale//lib/shale.rb#76 + def yaml_adapter=(_arg0); end + end +end + +# source://shale//lib/shale/adapter/csv.rb#6 +module Shale::Adapter; end + +# CSV adapter +# +# @api public +# +# source://shale//lib/shale/adapter/csv.rb#10 +class Shale::Adapter::CSV + class << self + # Serialize Array> into CSV + # + # @api private + # @param obj [Array>] Array> object + # @param headers [Array] + # @param options [Hash] + # @return [String] + # + # source://shale//lib/shale/adapter/csv.rb#33 + def dump(obj, headers:, **options); end + + # Parse CSV into Array> + # + # @api private + # @param csv [String] CSV document + # @param headers [Array] + # @param options [Hash] + # @return [Array>] + # + # source://shale//lib/shale/adapter/csv.rb#20 + def load(csv, headers:, **options); end + end +end + +# JSON adapter +# +# @api public +# +# source://shale//lib/shale/adapter/json.rb#10 +class Shale::Adapter::JSON + class << self + # Serialize Hash into JSON + # + # @api private + # @param obj [Hash] Hash object + # @param pretty [true, false] + # @return [String] + # + # source://shale//lib/shale/adapter/json.rb#30 + def dump(obj, pretty: T.unsafe(nil)); end + + # Parse JSON into Hash + # + # @api private + # @param json [String] JSON document + # @return [Hash] + # + # source://shale//lib/shale/adapter/json.rb#18 + def load(json); end + end +end + +# Adapter error +# +# @api private +# +# source://shale//lib/shale/error.rb#104 +class Shale::AdapterError < ::StandardError; end + +# Class representing object's attribute +# +# @api private +# +# source://shale//lib/shale/attribute.rb#7 +class Shale::Attribute + # Initialize Attribute object + # + # @api private + # @param name [Symbol] Name of the attribute + # @param type [Shale::Type::Value] Type of the attribute + # @param collection [Boolean] Is this attribute a collection + # @param default [Proc] Default value + # @return [Attribute] a new instance of Attribute + # + # source://shale//lib/shale/attribute.rb#36 + def initialize(name, type, collection, default); end + + # Return wheter attribute is collection or not + # + # @api private + # @return [Boolean] + # + # source://shale//lib/shale/attribute.rb#49 + def collection?; end + + # Return default + # + # @api private + # + # source://shale//lib/shale/attribute.rb#21 + def default; end + + # Return name + # + # @api private + # + # source://shale//lib/shale/attribute.rb#11 + def name; end + + # Return setter name + # + # @api private + # + # source://shale//lib/shale/attribute.rb#26 + def setter; end + + # Return type + # + # @api private + # + # source://shale//lib/shale/attribute.rb#16 + def type; end +end + +# Error for trying to assign not callable object as an attribute's default +# +# @api private +# +# source://shale//lib/shale/error.rb#59 +class Shale::DefaultNotCallableError < ::StandardError + # Initialize error object + # + # @api private + # @param record [String] + # @param attribute [String] + # @return [DefaultNotCallableError] a new instance of DefaultNotCallableError + # + # source://shale//lib/shale/error.rb#66 + def initialize(record, attribute); end +end + +# Error for passing incorrect arguments to map functions +# +# @api private +# +# source://shale//lib/shale/error.rb#80 +class Shale::IncorrectMappingArgumentsError < ::StandardError; end + +# Error for passing incorrect model type +# +# @api private +# +# source://shale//lib/shale/error.rb#74 +class Shale::IncorrectModelError < ::StandardError; end + +# Base class used for mapping +# +# @api public +# @example +# class Address < Shale::Mapper +# attribute :city, Shale::Type::String +# attribute :street, Shale::Type::String +# attribute :state, Shale::Type::Integer +# attribute :zip, Shale::Type::String +# end +# +# class Person < Shale::Mapper +# attribute :first_name, Shale::Type::String +# attribute :last_name, Shale::Type::String +# attribute :age, Shale::Type::Integer +# attribute :address, Address +# end +# +# person = Person.from_json(%{ +# { +# "first_name": "John", +# "last_name": "Doe", +# "age": 55, +# "address": { +# "city": "London", +# "street": "Oxford Street", +# "state": "London", +# "zip": "E1 6AN" +# } +# } +# }) +# +# person.to_json +# +# source://shale//lib/shale/mapper.rb#45 +class Shale::Mapper < ::Shale::Type::Complex + # Initialize instance with properties + # + # @api public + # @example + # Person.new( + # first_name: 'John', + # last_name: 'Doe', + # address: Address.new(city: 'London') + # ) + # # => #> + # @param props [Hash] Properties + # @raise [UnknownAttributeError] when attribute is not defined on the class + # @return [Mapper] a new instance of Mapper + # + # source://shale//lib/shale/mapper.rb#363 + def initialize(**props); end + + class << self + # Define attribute on class + # + # @api public + # @example + # calss Person < Shale::Mapper + # attribute :first_name, Shale::Type::String + # attribute :last_name, Shale::Type::String + # attribute :age, Shale::Type::Integer, default: -> { 1 } + # attribute :hobbies, Shale::Type::String, collection: true + # end + # + # person = Person.new + # + # person.first_name # => nil + # person.first_name = 'John' + # person.first_name # => 'John' + # + # person.age # => 1 + # + # person.hobbies << 'Dancing' + # person.hobbies # => ['Dancing'] + # @param name [Symbol] Name of the attribute + # @param type [Shale::Type::Value] Type of the attribute + # @param collection [Boolean] Is the attribute a collection + # @param default [Proc] Default value for the attribute + # @raise [DefaultNotCallableError] when attribute's default is not callable + # + # source://shale//lib/shale/mapper.rb#173 + def attribute(name, type, collection: T.unsafe(nil), default: T.unsafe(nil)); end + + # Return attributes Hash + # + # @api public + # @return [Hash] + # + # source://shale//lib/shale/mapper.rb#61 + def attributes; end + + # Define CSV mapping + # + # @api public + # @example + # calss Person < Shale::Mapper + # attribute :first_name, Shale::Type::String + # attribute :last_name, Shale::Type::String + # attribute :age, Shale::Type::Integer + # + # csv do + # map 'first_name', to: :first_name + # map 'last_name', to: :last_name + # map 'age', to: :age + # end + # end + # @param block [Proc] + # + # source://shale//lib/shale/mapper.rb#312 + def csv(&block); end + + # Return CSV mapping object + # + # @api public + # @return [Shale::Mapping::Dict] + # + # source://shale//lib/shale/mapper.rb#96 + def csv_mapping; end + + # Return Hash mapping object + # + # @api public + # @return [Shale::Mapping::Dict] + # + # source://shale//lib/shale/mapper.rb#68 + def hash_mapping; end + + # Define Hash mapping + # + # @api public + # @example + # calss Person < Shale::Mapper + # attribute :first_name, Shale::Type::String + # attribute :last_name, Shale::Type::String + # attribute :age, Shale::Type::Integer + # + # hsh do + # map 'firstName', to: :first_name + # map 'lastName', to: :last_name + # map 'age', to: :age + # end + # end + # @param block [Proc] + # + # source://shale//lib/shale/mapper.rb#216 + def hsh(&block); end + + # @api private + # @private + # + # source://shale//lib/shale/mapper.rb#106 + def inherited(subclass); end + + # Define JSON mapping + # + # @api public + # @example + # calss Person < Shale::Mapper + # attribute :first_name, Shale::Type::String + # attribute :last_name, Shale::Type::String + # attribute :age, Shale::Type::Integer + # + # json do + # map 'firstName', to: :first_name + # map 'lastName', to: :last_name + # map 'age', to: :age + # end + # end + # @param block [Proc] + # + # source://shale//lib/shale/mapper.rb#240 + def json(&block); end + + # Return JSON mapping object + # + # @api public + # @return [Shale::Mapping::Dict] + # + # source://shale//lib/shale/mapper.rb#75 + def json_mapping; end + + # @api public + # + # source://shale//lib/shale/mapper.rb#135 + def model(klass = T.unsafe(nil)); end + + # Define TOML mapping + # + # @api public + # @example + # calss Person < Shale::Mapper + # attribute :first_name, Shale::Type::String + # attribute :last_name, Shale::Type::String + # attribute :age, Shale::Type::Integer + # + # toml do + # map 'first_name', to: :first_name + # map 'last_name', to: :last_name + # map 'age', to: :age + # end + # end + # @param block [Proc] + # + # source://shale//lib/shale/mapper.rb#288 + def toml(&block); end + + # Return TOML mapping object + # + # @api public + # @return [Shale::Mapping::Dict] + # + # source://shale//lib/shale/mapper.rb#89 + def toml_mapping; end + + # Define XML mapping + # + # @api public + # @example + # calss Person < Shale::Mapper + # attribute :first_name, Shale::Type::String + # attribute :last_name, Shale::Type::String + # attribute :age, Shale::Type::Integer + # + # xml do + # root 'Person' + # map_content to: :first_name + # map_element 'LastName', to: :last_name + # map_attribute 'age', to: :age + # end + # end + # @param block [Proc] + # + # source://shale//lib/shale/mapper.rb#337 + def xml(&block); end + + # Return XML mapping object + # + # @api public + # @return [Shale::Mapping::XML] + # + # source://shale//lib/shale/mapper.rb#103 + def xml_mapping; end + + # Define YAML mapping + # + # @api public + # @example + # calss Person < Shale::Mapper + # attribute :first_name, Shale::Type::String + # attribute :last_name, Shale::Type::String + # attribute :age, Shale::Type::Integer + # + # yaml do + # map 'first_name', to: :first_name + # map 'last_name', to: :last_name + # map 'age', to: :age + # end + # end + # @param block [Proc] + # + # source://shale//lib/shale/mapper.rb#264 + def yaml(&block); end + + # Return YAML mapping object + # + # @api public + # @return [Shale::Mapping::Dict] + # + # source://shale//lib/shale/mapper.rb#82 + def yaml_mapping; end + end +end + +# source://shale//lib/shale/mapping/descriptor/dict.rb#4 +module Shale::Mapping; end + +# source://shale//lib/shale/mapping/descriptor/dict.rb#5 +module Shale::Mapping::Descriptor; end + +# Class representing attribute mapping +# +# @api private +# +# source://shale//lib/shale/mapping/descriptor/dict.rb#9 +class Shale::Mapping::Descriptor::Dict + # Initialize instance + # + # @api private + # @param name [String] + # @param attribute [Symbol, nil] + # @param methods [Hash, nil] + # @param group [String, nil] + # @param render_nil [true, false] + # @return [Dict] a new instance of Dict + # + # source://shale//lib/shale/mapping/descriptor/dict.rb#54 + def initialize(name:, attribute:, methods:, group:, render_nil:); end + + # Return attribute name + # + # @api private + # @return [Symbol] + # + # source://shale//lib/shale/mapping/descriptor/dict.rb#22 + def attribute; end + + # Return group name + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/descriptor/dict.rb#43 + def group; end + + # Return method symbol + # + # @api private + # @return [Symbol] + # + # source://shale//lib/shale/mapping/descriptor/dict.rb#29 + def method_from; end + + # Return method symbol + # + # @api private + # @return [Symbol] + # + # source://shale//lib/shale/mapping/descriptor/dict.rb#36 + def method_to; end + + # Return mapping name + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/descriptor/dict.rb#15 + def name; end + + # Check render_nil + # + # @api private + # @return [true, false] + # + # source://shale//lib/shale/mapping/descriptor/dict.rb#71 + def render_nil?; end +end + +# Class representing XML attribute mapping +# +# @api private +# +# source://shale//lib/shale/mapping/descriptor/xml.rb#11 +class Shale::Mapping::Descriptor::Xml < ::Shale::Mapping::Descriptor::Dict + # Initialize instance + # + # @api private + # @param name [String] + # @param attribute [Symbol, String] + # @param methods [Hash, nil] + # @param namespace [Shale::Mapping::XmlNamespace] + # @param cdata [true, false] + # @param render_nil [true, false] + # @param group [String, nil] + # @return [Xml] a new instance of Xml + # + # source://shale//lib/shale/mapping/descriptor/xml.rb#37 + def initialize(name:, attribute:, methods:, group:, namespace:, cdata:, render_nil:); end + + # Return cdata + # + # @api private + # @return [true, false] + # + # source://shale//lib/shale/mapping/descriptor/xml.rb#24 + def cdata; end + + # Return namespace + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/descriptor/xml.rb#17 + def namespace; end + + # Return name with XML namespace + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/descriptor/xml.rb#64 + def namespaced_name; end + + # Return name with XML prefix + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/descriptor/xml.rb#55 + def prefixed_name; end +end + +# Class representing XML namespace +# +# @api private +# +# source://shale//lib/shale/mapping/descriptor/xml_namespace.rb#9 +class Shale::Mapping::Descriptor::XmlNamespace + # Initialize instance + # + # @api private + # @param name [String, nil] + # @param prefix [String, nil] + # @return [XmlNamespace] a new instance of XmlNamespace + # + # source://shale//lib/shale/mapping/descriptor/xml_namespace.rb#30 + def initialize(name = T.unsafe(nil), prefix = T.unsafe(nil)); end + + # Return name + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/descriptor/xml_namespace.rb#15 + def name; end + + # Return name + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/descriptor/xml_namespace.rb#15 + def name=(_arg0); end + + # Return prefix + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/descriptor/xml_namespace.rb#22 + def prefix; end + + # Return prefix + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/descriptor/xml_namespace.rb#22 + def prefix=(_arg0); end +end + +# Mapping for dictionary serialization formats (Hash/JSON/YAML) +# +# @api private +# +# source://shale//lib/shale/mapping/dict.rb#11 +class Shale::Mapping::Dict < ::Shale::Mapping::DictBase + # Map group of keys to mapping methods + # + # @api private + # @param from [Symbol] + # @param to [Symbol] + # @param block [Proc] + # + # source://shale//lib/shale/mapping/dict.rb#33 + def group(from:, to:, &block); end + + # Map key to attribute + # + # @api private + # @param key [String] Document's key + # @param to [Symbol, nil] Object's attribute + # @param using [Hash, nil] + # @param render_nil [true, false, nil] + # @raise [IncorrectMappingArgumentsError] when arguments are incorrect + # + # source://shale//lib/shale/mapping/dict.rb#22 + def map(key, to: T.unsafe(nil), using: T.unsafe(nil), render_nil: T.unsafe(nil)); end +end + +# Base class for Mapping dictionary serialization formats (Hash/JSON/YAML) +# +# @api private +# +# source://shale//lib/shale/mapping/dict_base.rb#11 +class Shale::Mapping::DictBase + # Initialize instance + # + # @api private + # @param render_nil_default [true, false] + # @return [DictBase] a new instance of DictBase + # + # source://shale//lib/shale/mapping/dict_base.rb#24 + def initialize(render_nil_default: T.unsafe(nil)); end + + # Set the "finalized" instance variable to true + # + # @api private + # + # source://shale//lib/shale/mapping/dict_base.rb#55 + def finalize!; end + + # Query the "finalized" instance variable + # + # @api private + # @return [truem false] + # + # source://shale//lib/shale/mapping/dict_base.rb#64 + def finalized?; end + + # Return keys mapping hash + # + # @api private + # @return [Hash] + # + # source://shale//lib/shale/mapping/dict_base.rb#17 + def keys; end + + # Map key to attribute + # + # @api private + # @param key [String] + # @param to [Symbol, nil] + # @param using [Hash, nil] + # @param group [String, nil] + # @param render_nil [true, false, nil] + # @raise [IncorrectMappingArgumentsError] when arguments are incorrect + # + # source://shale//lib/shale/mapping/dict_base.rb#41 + def map(key, to: T.unsafe(nil), using: T.unsafe(nil), group: T.unsafe(nil), render_nil: T.unsafe(nil)); end + + private + + # @api private + # + # source://shale//lib/shale/mapping/dict_base.rb#69 + def initialize_dup(other); end +end + +# Group for dictionary serialization formats (Hash/JSON/YAML) +# +# @api private +# +# source://shale//lib/shale/mapping/dict_group.rb#10 +class Shale::Mapping::DictGroup < ::Shale::Mapping::DictBase + # Initialize instance + # + # @api private + # @param from [Symbol] + # @param to [Symbol] + # @return [DictGroup] a new instance of DictGroup + # + # source://shale//lib/shale/mapping/dict_group.rb#24 + def initialize(from, to); end + + # Map key to attribute + # + # @api private + # @param key [String] + # + # source://shale//lib/shale/mapping/dict_group.rb#36 + def map(key); end + + # Return name of the group + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/dict_group.rb#16 + def name; end +end + +# source://shale//lib/shale/mapping/group/dict.rb#5 +module Shale::Mapping::Group; end + +# Dict group descriptor +# +# @api private +# +# source://shale//lib/shale/mapping/group/dict.rb#9 +class Shale::Mapping::Group::Dict + # Initialize instance + # + # @api private + # @param method_from [Symbol] + # @param method_to [Symbol] + # @return [Dict] a new instance of Dict + # + # source://shale//lib/shale/mapping/group/dict.rb#37 + def initialize(method_from, method_to); end + + # Add key-value pair to a group + # + # @api private + # @param key [String] + # @param value [any] + # + # source://shale//lib/shale/mapping/group/dict.rb#49 + def add(key, value); end + + # Return dict hash + # + # @api private + # @return [Hash] + # + # source://shale//lib/shale/mapping/group/dict.rb#29 + def dict; end + + # Return method_from + # + # @api private + # @return [Symbol] + # + # source://shale//lib/shale/mapping/group/dict.rb#15 + def method_from; end + + # Return method_to + # + # @api private + # @return [Symbol] + # + # source://shale//lib/shale/mapping/group/dict.rb#22 + def method_to; end +end + +# Class representing mapping group for JSON/YAML/TOML +# +# @api private +# +# source://shale//lib/shale/mapping/group/dict_grouping.rb#11 +class Shale::Mapping::Group::DictGrouping + # Initialize instance + # + # @api private + # @return [DictGrouping] a new instance of DictGrouping + # + # source://shale//lib/shale/mapping/group/dict_grouping.rb#15 + def initialize; end + + # Add a value to a group + # + # @api private + # @param mapping [Shale::Mapping::Descriptor::Dict] + # @param value [any] + # + # source://shale//lib/shale/mapping/group/dict_grouping.rb#25 + def add(mapping, value); end + + # Iterate over groups + # + # @api private + # @param block [Proc] + # + # source://shale//lib/shale/mapping/group/dict_grouping.rb#35 + def each(&block); end +end + +# Xml group descriptor +# +# @api private +# +# source://shale//lib/shale/mapping/group/xml.rb#11 +class Shale::Mapping::Group::Xml < ::Shale::Mapping::Group::Dict + # Initialize instance + # + # @api private + # @param method_from [Symbol] + # @param method_to [Symbol] + # @return [Xml] a new instance of Xml + # + # source://shale//lib/shale/mapping/group/xml.rb#18 + def initialize(method_from, method_to); end + + # Add key-value pair to a group + # + # @api private + # @param kind [Symbol] + # @param key [String] + # @param value [any] + # + # source://shale//lib/shale/mapping/group/xml.rb#30 + def add(kind, key, value); end +end + +# Class representing mapping group for XML +# +# @api private +# +# source://shale//lib/shale/mapping/group/xml_grouping.rb#12 +class Shale::Mapping::Group::XmlGrouping < ::Shale::Mapping::Group::DictGrouping + # Add a value to a group + # + # @api private + # @param mapping [Shale::Mapping::Descriptor::Dict] + # @param kind [Symbol] + # @param value [any] + # + # source://shale//lib/shale/mapping/group/xml_grouping.rb#20 + def add(mapping, kind, value); end +end + +# source://shale//lib/shale/mapping/validator.rb#7 +module Shale::Mapping::Validator + class << self + # Validate correctness of argument passed to map functions + # + # @api private + # @param key [String] + # @param to [Symbol] + # @param using [Hash] + # @raise [IncorrectMappingArgumentsError] when arguments are incorrect + # + # source://shale//lib/shale/mapping/validator.rb#17 + def validate_arguments(key, to, using); end + + # Validate correctness of namespace arguments + # + # @api private + # @param key [String] + # @param namespace [String, Symbol, nil] + # @param prefix [String, Symbol, nil] + # @raise [IncorrectMappingArgumentsError] when arguments are incorrect + # + # source://shale//lib/shale/mapping/validator.rb#38 + def validate_namespace(key, namespace, prefix); end + end +end + +# Mapping for XML serialization format +# +# @api private +# +# source://shale//lib/shale/mapping/xml.rb#11 +class Shale::Mapping::Xml < ::Shale::Mapping::XmlBase + # Map group of nodes to mapping methods + # + # @api private + # @param from [Symbol] + # @param to [Symbol] + # @param block [Proc] + # + # source://shale//lib/shale/mapping/xml.rb#89 + def group(from:, to:, &block); end + + # Map document's attribute to object's attribute + # + # @api private + # @param attribute [String] + # @param to [Symbol, nil] + # @param using [Hash, nil] + # @param namespace [String, nil] + # @param prefix [String, nil] + # @param render_nil [true, false] + # + # source://shale//lib/shale/mapping/xml.rb#53 + def map_attribute(attribute, to: T.unsafe(nil), using: T.unsafe(nil), namespace: T.unsafe(nil), prefix: T.unsafe(nil), render_nil: T.unsafe(nil)); end + + # Map document's content to object's attribute + # + # @api private + # @param to [Symbol] + # @param using [Hash, nil] + # @param cdata [true, false] + # + # source://shale//lib/shale/mapping/xml.rb#78 + def map_content(to: T.unsafe(nil), using: T.unsafe(nil), cdata: T.unsafe(nil)); end + + # Map element to attribute + # + # @api private + # @param element [String] + # @param to [Symbol, nil] + # @param using [Hash, nil] + # @param namespace [String, nil] + # @param prefix [String, nil] + # @param cdata [true, false] + # @param render_nil [true, false] + # + # source://shale//lib/shale/mapping/xml.rb#23 + def map_element(element, to: T.unsafe(nil), using: T.unsafe(nil), namespace: T.unsafe(nil), prefix: T.unsafe(nil), cdata: T.unsafe(nil), render_nil: T.unsafe(nil)); end +end + +# Base class for Mapping XML serialization format +# +# @api private +# +# source://shale//lib/shale/mapping/xml_base.rb#12 +class Shale::Mapping::XmlBase + # Initialize instance + # + # @api private + # @return [XmlBase] a new instance of XmlBase + # + # source://shale//lib/shale/mapping/xml_base.rb#62 + def initialize; end + + # Return attributes mapping hash + # + # @api private + # @return [Hash] + # + # source://shale//lib/shale/mapping/xml_base.rb#25 + def attributes; end + + # Return content mapping + # + # @api private + # @return [Symbol] + # + # source://shale//lib/shale/mapping/xml_base.rb#32 + def content; end + + # Return default namespace + # + # @api private + # @return [Shale::Mapping::Descriptor::XmlNamespace] + # + # source://shale//lib/shale/mapping/xml_base.rb#39 + def default_namespace; end + + # Return elements mapping hash + # + # @api private + # @return [Hash] + # + # source://shale//lib/shale/mapping/xml_base.rb#18 + def elements; end + + # Set the "finalized" instance variable to true + # + # @api private + # + # source://shale//lib/shale/mapping/xml_base.rb#201 + def finalize!; end + + # Query the "finalized" instance variable + # + # @api private + # @return [truem false] + # + # source://shale//lib/shale/mapping/xml_base.rb#210 + def finalized?; end + + # Map document's attribute to object's attribute + # + # @api private + # @param attribute [String] + # @param to [Symbol, nil] + # @param using [Hash, nil] + # @param prefix [String, nil] + # @param render_nil [true, false] + # @param namespace [String, nil] + # @raise [IncorrectMappingArgumentsError] when arguments are incorrect + # + # source://shale//lib/shale/mapping/xml_base.rb#132 + def map_attribute(attribute, to: T.unsafe(nil), using: T.unsafe(nil), group: T.unsafe(nil), namespace: T.unsafe(nil), prefix: T.unsafe(nil), render_nil: T.unsafe(nil)); end + + # Map document's content to object's attribute + # + # @api private + # @param to [Symbol] + # @param using [Hash, nil] + # @param cdata [true, false] + # + # source://shale//lib/shale/mapping/xml_base.rb#164 + def map_content(to: T.unsafe(nil), using: T.unsafe(nil), group: T.unsafe(nil), cdata: T.unsafe(nil)); end + + # Map element to attribute + # + # @api private + # @param element [String] + # @param to [Symbol, nil] + # @param using [Hash, nil] + # @param group [String, nil] + # @param prefix [String, nil] + # @param cdata [true, false] + # @param render_nil [true, false] + # @param namespace [String, nil] + # @raise [IncorrectMappingArgumentsError] when arguments are incorrect + # + # source://shale//lib/shale/mapping/xml_base.rb#86 + def map_element(element, to: T.unsafe(nil), using: T.unsafe(nil), group: T.unsafe(nil), namespace: T.unsafe(nil), prefix: T.unsafe(nil), cdata: T.unsafe(nil), render_nil: T.unsafe(nil)); end + + # Set default namespace for root element + # + # @api private + # @param name [String] + # @param prefix [String] + # + # source://shale//lib/shale/mapping/xml_base.rb#193 + def namespace(name, prefix); end + + # Return prefixed root + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/xml_base.rb#55 + def prefixed_root; end + + # Set the name for root element + # + # @api private + # @param value [String] root's name + # + # source://shale//lib/shale/mapping/xml_base.rb#183 + def root(value); end + + # Return unprefixed root + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/xml_base.rb#46 + def unprefixed_root; end + + private + + # @api private + # + # source://shale//lib/shale/mapping/xml_base.rb#215 + def initialize_dup(other); end +end + +# Group for XML serialization format +# +# @api private +# +# source://shale//lib/shale/mapping/xml_group.rb#10 +class Shale::Mapping::XmlGroup < ::Shale::Mapping::XmlBase + # Initialize instance + # + # @api private + # @return [XmlGroup] a new instance of XmlGroup + # + # source://shale//lib/shale/mapping/xml_group.rb#21 + def initialize(from, to); end + + # Map document's attribute to object's attribute + # + # @api private + # @param attribute [String] + # @param namespace [String, nil] + # @param prefix [String, nil] + # + # source://shale//lib/shale/mapping/xml_group.rb#52 + def map_attribute(attribute, namespace: T.unsafe(nil), prefix: T.unsafe(nil)); end + + # Map document's content to object's attribute + # + # @api private + # + # source://shale//lib/shale/mapping/xml_group.rb#65 + def map_content; end + + # Map element to attribute + # + # @api private + # @param element [String] + # @param namespace [String, nil] + # @param prefix [String, nil] + # + # source://shale//lib/shale/mapping/xml_group.rb#35 + def map_element(element, namespace: T.unsafe(nil), prefix: T.unsafe(nil)); end + + # Return name of the group + # + # @api private + # @return [String] + # + # source://shale//lib/shale/mapping/xml_group.rb#16 + def name; end +end + +# Error for passing incorrect arguments to schema generation function +# +# @api private +# +# source://shale//lib/shale/error.rb#86 +class Shale::NotAShaleMapperError < ::StandardError; end + +# Parsing error +# +# @api private +# +# source://shale//lib/shale/error.rb#98 +class Shale::ParseError < ::StandardError; end + +# Schema compilation error +# +# @api private +# +# source://shale//lib/shale/error.rb#92 +class Shale::SchemaError < ::StandardError; end + +# Error message displayed when TOML adapter is not set +# +# @api private +# +# source://shale//lib/shale/error.rb#6 +Shale::TOML_ADAPTER_NOT_SET_MESSAGE = T.let(T.unsafe(nil), String) + +# source://shale//lib/shale/type/value.rb#4 +module Shale::Type; end + +# Cast value to Boolean +# +# @api public +# +# source://shale//lib/shale/type/boolean.rb#10 +class Shale::Type::Boolean < ::Shale::Type::Value + class << self + # @api private + # @param value [any] Value to cast + # @return [Boolean, nil] + # + # source://shale//lib/shale/type/boolean.rb#28 + def cast(value); end + end +end + +# @api public +# +# source://shale//lib/shale/type/boolean.rb#11 +Shale::Type::Boolean::FALSE_VALUES = T.let(T.unsafe(nil), Array) + +# Build complex object. Don't use it directly. +# It serves as a base type class for @see Shale::Mapper +# +# @api private +# +# source://shale//lib/shale/type/complex.rb#14 +class Shale::Type::Complex < ::Shale::Type::Value + # Convert Object to CSV + # + # @api public + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#900 + def to_csv(only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil), headers: T.unsafe(nil), **csv_options); end + + # Convert Object to Hash + # + # @api public + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [Hash] + # + # source://shale//lib/shale/type/complex.rb#841 + def to_hash(only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert Object to JSON + # + # @api public + # @param only [Array] + # @param except [Array] + # @param context [any] + # @param pretty [true, false] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#855 + def to_json(only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil), pretty: T.unsafe(nil)); end + + # Convert Object to TOML + # + # @api public + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#887 + def to_toml(only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert Object to XML + # + # @api public + # @param only [Array] + # @param except [Array] + # @param context [any] + # @param declaration [true, false] + # @param encoding [true, false, String] + # @param pretty [true, false] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#923 + def to_xml(only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil), pretty: T.unsafe(nil), declaration: T.unsafe(nil), encoding: T.unsafe(nil)); end + + # Convert Object to YAML + # + # @api public + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#874 + def to_yaml(only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + class << self + # source://shale//lib/shale/type/complex.rb#129 + def as_csv(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # source://shale//lib/shale/type/complex.rb#129 + def as_hash(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # source://shale//lib/shale/type/complex.rb#129 + def as_json(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # source://shale//lib/shale/type/complex.rb#124 + def as_toml(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert Object to XML document + # + # @api public + # @param instance [any] Object to convert + # @param node_name [String, nil] XML node name + # @param doc [Shale::Adapter::::Document, nil] Object to convert + # @param except [Array] + # @param context [any] + # @param only [Array] + # @raise [IncorrectModelError] + # @return [::REXML::Document, ::Nokogiri::Document, ::Ox::Document] + # + # source://shale//lib/shale/type/complex.rb#574 + def as_xml(instance, node_name = T.unsafe(nil), doc = T.unsafe(nil), _cdata = T.unsafe(nil), only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil), version: T.unsafe(nil)); end + + # source://shale//lib/shale/type/complex.rb#129 + def as_yaml(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert CSV to Object + # + # @api public + # @param csv [String] CSV to convert + # @param only [Array] + # @param except [Array] + # @param headers [true, false] + # @param csv_options [Hash] + # @param context [any] + # @return [model instance] + # + # source://shale//lib/shale/type/complex.rb#351 + def from_csv(csv, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil), headers: T.unsafe(nil), **csv_options); end + + # @api private + # + # source://shale//lib/shale/type/complex.rb#28 + def from_hash(hash, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert JSON to Object + # + # @api public + # @param json [String] JSON to convert + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [model instance] + # + # source://shale//lib/shale/type/complex.rb#240 + def from_json(json, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert TOML to Object + # + # @api public + # @param toml [String] TOML to convert + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [model instance] + # + # source://shale//lib/shale/type/complex.rb#312 + def from_toml(toml, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert XML to Object + # + # @api public + # @param xml [String] XML to convert + # @param only [Array] + # @param except [Array] + # @param context [any] + # @raise [AdapterError] + # @return [model instance] + # + # source://shale//lib/shale/type/complex.rb#550 + def from_xml(xml, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert YAML to Object + # + # @api public + # @param yaml [String] YAML to convert + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [model instance] + # + # source://shale//lib/shale/type/complex.rb#277 + def from_yaml(yaml, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # source://shale//lib/shale/type/complex.rb#28 + def of_csv(hash, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # source://shale//lib/shale/type/complex.rb#28 + def of_hash(hash, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # source://shale//lib/shale/type/complex.rb#28 + def of_json(hash, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # source://shale//lib/shale/type/complex.rb#28 + def of_toml(hash, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert XML document to Object + # + # @api public + # @param element [Shale::Adapter::::Node] + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [model instance] + # + # source://shale//lib/shale/type/complex.rb#408 + def of_xml(element, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # source://shale//lib/shale/type/complex.rb#28 + def of_yaml(hash, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert Object to CSV + # + # @api public + # @param instance [model instance] Object to convert + # @param only [Array] + # @param except [Array] + # @param headers [true, false] + # @param csv_options [Hash] + # @param context [any] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#376 + def to_csv(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil), headers: T.unsafe(nil), **csv_options); end + + # @api private + # + # source://shale//lib/shale/type/complex.rb#129 + def to_hash(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert Object to JSON + # + # @api public + # @param instance [model instance] Object to convert + # @param only [Array] + # @param except [Array] + # @param context [any] + # @param pretty [true, false] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#260 + def to_json(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil), pretty: T.unsafe(nil)); end + + # Convert Object to TOML + # + # @api public + # @param instance [model instance] Object to convert + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#332 + def to_toml(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + # Convert Object to XML + # + # @api public + # @param instance [model instance] Object to convert + # @param only [Array] + # @param except [Array] + # @param context [any] + # @param declaration [true, false] + # @param encoding [true, false, String] + # @param pretty [true, false] + # @raise [AdapterError] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#774 + def to_xml(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil), pretty: T.unsafe(nil), declaration: T.unsafe(nil), encoding: T.unsafe(nil)); end + + # Convert Object to YAML + # + # @api public + # @param instance [model instance] Object to convert + # @param only [Array] + # @param except [Array] + # @param context [any] + # @return [String] + # + # source://shale//lib/shale/type/complex.rb#296 + def to_yaml(instance, only: T.unsafe(nil), except: T.unsafe(nil), context: T.unsafe(nil)); end + + private + + # Convert array with attributes to a hash + # + # @api private + # @param ary [Array] + # @return [Hash, nil] + # + # source://shale//lib/shale/type/complex.rb#819 + def to_partial_render_attributes(ary); end + + # Validate TOML adapter + # + # @api private + # @raise [AdapterError] + # + # source://shale//lib/shale/type/complex.rb#799 + def validate_toml_adapter; end + + # Validate XML adapter + # + # @api private + # @raise [AdapterError] + # + # source://shale//lib/shale/type/complex.rb#808 + def validate_xml_adapter; end + end +end + +# Cast value to Date +# +# @api public +# +# source://shale//lib/shale/type/date.rb#11 +class Shale::Type::Date < ::Shale::Type::Value + class << self + # Use ISO 8601 format in CSV document + # + # @api private + # @param value [Date] + # @return [String] + # + # source://shale//lib/shale/type/date.rb#57 + def as_csv(value, **_arg1); end + + # Use ISO 8601 format in JSON document + # + # @api private + # @param value [Date] + # @return [String] + # + # source://shale//lib/shale/type/date.rb#35 + def as_json(value, **_arg1); end + + # Use ISO 8601 format in XML document + # + # @api private + # @param value [Date] Value to convert to XML + # @return [String] + # + # source://shale//lib/shale/type/date.rb#68 + def as_xml_value(value); end + + # Use ISO 8601 format in YAML document + # + # @api private + # @param value [Date] + # @return [String] + # + # source://shale//lib/shale/type/date.rb#46 + def as_yaml(value, **_arg1); end + + # @api private + # @param value [any] Value to cast + # @return [Date, nil] + # + # source://shale//lib/shale/type/date.rb#17 + def cast(value); end + end +end + +# Cast value to Float +# +# @api public +# +# source://shale//lib/shale/type/float.rb#10 +class Shale::Type::Float < ::Shale::Type::Value + class << self + # @api private + # @param value [#to_f, String, nil] Value to cast + # @return [Float, nil] + # + # source://shale//lib/shale/type/float.rb#16 + def cast(value); end + end +end + +# Cast value to Integer +# +# @api public +# +# source://shale//lib/shale/type/integer.rb#10 +class Shale::Type::Integer < ::Shale::Type::Value + class << self + # @api private + # @param value [#to_i, nil] Value to cast + # @return [Integer, nil] + # + # source://shale//lib/shale/type/integer.rb#16 + def cast(value); end + end +end + +# Cast value to String +# +# @api public +# +# source://shale//lib/shale/type/string.rb#10 +class Shale::Type::String < ::Shale::Type::Value + class << self + # @api private + # @param value [#to_s, nil] Value to cast + # @return [String, nil] + # + # source://shale//lib/shale/type/string.rb#16 + def cast(value); end + end +end + +# Cast value to Time +# +# @api public +# +# source://shale//lib/shale/type/time.rb#11 +class Shale::Type::Time < ::Shale::Type::Value + class << self + # Use ISO 8601 format in CSV document + # + # @api private + # @param value [Time] + # @return [String] + # + # source://shale//lib/shale/type/time.rb#57 + def as_csv(value, **_arg1); end + + # Use ISO 8601 format in JSON document + # + # @api private + # @param value [Time] + # @return [String] + # + # source://shale//lib/shale/type/time.rb#35 + def as_json(value, **_arg1); end + + # Use ISO 8601 format in XML document + # + # @api private + # @param value [Time] Value to convert to XML + # @return [String] + # + # source://shale//lib/shale/type/time.rb#68 + def as_xml_value(value); end + + # Use ISO 8601 format in YAML document + # + # @api private + # @param value [Time] + # @return [String] + # + # source://shale//lib/shale/type/time.rb#46 + def as_yaml(value, **_arg1); end + + # @api private + # @param value [any] Value to cast + # @return [Time, nil] + # + # source://shale//lib/shale/type/time.rb#17 + def cast(value); end + end +end + +# Base class for all types +# +# @api public +# @example +# class MyType < Shale::Type::Value +# ... overwrite methods as needed +# end +# +# source://shale//lib/shale/type/value.rb#13 +class Shale::Type::Value + class << self + # Convert value to form accepted by CSV document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#132 + def as_csv(value, **_arg1); end + + # Convert value to form accepted by Hash document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#44 + def as_hash(value, **_arg1); end + + # Convert value to form accepted by JSON document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#66 + def as_json(value, **_arg1); end + + # Convert value to form accepted by TOML document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#110 + def as_toml(value, **_arg1); end + + # Convert value to XML element + # + # @api private + # @param value [#to_s] Value to convert to XML + # @param name [String] Name of the element + # @param doc [Shale::Adapter::::Document] Document + # @param cdata [true, false] + # + # source://shale//lib/shale/type/value.rb#166 + def as_xml(value, name, doc, cdata = T.unsafe(nil), **_arg4); end + + # Convert value to form accepted by XML document + # + # @api private + # @param value [#to_s] Value to convert to XML + # @return [String] + # + # source://shale//lib/shale/type/value.rb#154 + def as_xml_value(value); end + + # Convert value to form accepted by YAML document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#88 + def as_yaml(value, **_arg1); end + + # Cast raw value to a type. Base form just returns whatever it receives + # + # @api private + # @param value [any] Value to cast + # @return [any] + # + # source://shale//lib/shale/type/value.rb#22 + def cast(value); end + + # Extract value from CSV document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#121 + def of_csv(value, **_arg1); end + + # Extract value from Hash document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#33 + def of_hash(value, **_arg1); end + + # Extract value from JSON document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#55 + def of_json(value, **_arg1); end + + # Extract value from TOML document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#99 + def of_toml(value, **_arg1); end + + # Extract value from XML document + # + # @api private + # @param value [Shale::Adapter::::Node] + # @return [String] + # + # source://shale//lib/shale/type/value.rb#143 + def of_xml(node, **_arg1); end + + # Extract value from YAML document + # + # @api private + # @param value [any] + # @return [any] + # + # source://shale//lib/shale/type/value.rb#77 + def of_yaml(value, **_arg1); end + end +end + +# Error for assigning value to not existing attribute +# +# @api private +# +# source://shale//lib/shale/error.rb#44 +class Shale::UnknownAttributeError < ::NoMethodError + # Initialize error object + # + # @api private + # @param record [String] + # @param attribute [String] + # @return [UnknownAttributeError] a new instance of UnknownAttributeError + # + # source://shale//lib/shale/error.rb#51 + def initialize(record, attribute); end +end + +# Utitlity functions +# +# @api private +# +# source://shale//lib/shale/utils.rb#7 +module Shale::Utils + class << self + # Convert string to Ruby's class naming convention + # + # @api private + # @example + # Shale::Utils.classify('foobar') + # # => 'Foobar' + # @param val [String] + # + # source://shale//lib/shale/utils.rb#17 + def classify(str); end + + # Return value or nil if value is empty + # + # @api private + # @example + # Shale::Utils.presence('FooBar') # => FooBar + # Shale::Utils.presence('') # => nil + # @param value [String] + # + # source://shale//lib/shale/utils.rb#70 + def presence(value); end + + # Convert string to snake case + # + # @api private + # @example + # Shale::Utils.snake_case('FooBar') + # # => 'foo_bar' + # @param val [String] + # + # source://shale//lib/shale/utils.rb#38 + def snake_case(str); end + + # Convert word to under score + # + # @api private + # @example + # Shale::Utils.underscore('FooBar') # => foo_bar + # Shale::Utils.underscore('Namespace::FooBar') # => foo_bar + # @param word [String] + # + # source://shale//lib/shale/utils.rb#57 + def underscore(str); end + end +end + +# @api private +# +# source://shale//lib/shale/version.rb#5 +Shale::VERSION = T.let(T.unsafe(nil), String) + +# Error message displayed when XML adapter is not set +# +# @api private +# +# source://shale//lib/shale/error.rb#22 +Shale::XML_ADAPTER_NOT_SET_MESSAGE = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/shoulda-context@2.0.0.rbi b/sorbet/rbi/gems/shoulda-context@2.0.0.rbi new file mode 100644 index 0000000..02689c3 --- /dev/null +++ b/sorbet/rbi/gems/shoulda-context@2.0.0.rbi @@ -0,0 +1,563 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `shoulda-context` gem. +# Please instead update this file by running `bin/tapioca gem shoulda-context`. + + +class Minitest::Test < ::Minitest::Runnable + include ::Shoulda::Context::DSL + include ::Shoulda::Context::Assertions + include ::Shoulda::Context::DSL::InstanceMethods + extend ::Shoulda::Context::DSL::ClassMethods +end + +# Stolen straight from ActiveSupport +# +# source://shoulda-context//lib/shoulda/context/proc_extensions.rb#3 +class Proc + # source://shoulda-context//lib/shoulda/context/proc_extensions.rb#4 + def bind(object); end +end + +# source://shoulda-context//lib/shoulda/context/autoload_macros.rb#1 +module Shoulda + class << self + # Call autoload_macros when you want to load test macros automatically in a non-Rails + # project (it's done automatically for Rails projects). + # You don't need to specify ROOT/test/shoulda_macros explicitly. Your custom macros + # are loaded automatically when you call autoload_macros. + # + # The first argument is the path to you application's root directory. + # All following arguments are directories relative to your root, which contain + # shoulda_macros subdirectories. These directories support the same kinds of globs as the + # Dir class. + # + # Basic usage (from a test_helper): + # Shoulda.autoload_macros(File.dirname(__FILE__) + '/..') + # will load everything in + # - your_app/test/shoulda_macros + # + # To load vendored macros as well: + # Shoulda.autoload_macros(APP_ROOT, 'vendor/*') + # will load everything in + # - APP_ROOT/vendor/*/shoulda_macros + # - APP_ROOT/test/shoulda_macros + # + # To load macros in an app with a vendor directory laid out like Rails': + # Shoulda.autoload_macros(APP_ROOT, 'vendor/{plugins,gems}/*') + # or + # Shoulda.autoload_macros(APP_ROOT, 'vendor/plugins/*', 'vendor/gems/*') + # will load everything in + # - APP_ROOT/vendor/plugins/*/shoulda_macros + # - APP_ROOT/vendor/gems/*/shoulda_macros + # - APP_ROOT/test/shoulda_macros + # + # If you prefer to stick testing dependencies away from your production dependencies: + # Shoulda.autoload_macros(APP_ROOT, 'vendor/*', 'test/vendor/*') + # will load everything in + # - APP_ROOT/vendor/*/shoulda_macros + # - APP_ROOT/test/vendor/*/shoulda_macros + # - APP_ROOT/test/shoulda_macros + # + # source://shoulda-context//lib/shoulda/context/autoload_macros.rb#38 + def autoload_macros(root, *dirs); end + end +end + +# source://shoulda-context//lib/shoulda/context/configuration.rb#2 +module Shoulda::Context + class << self + # source://shoulda-context//lib/shoulda/context/world.rb#13 + def add_context(context); end + + # @yield [_self] + # @yieldparam _self [Shoulda::Context] the object that the method was called on + # + # source://shoulda-context//lib/shoulda/context/configuration.rb#3 + def configure; end + + # source://shoulda-context//lib/shoulda/context/world.rb#4 + def contexts; end + + # Sets the attribute contexts + # + # @param value the value to set the attribute contexts to. + # + # source://shoulda-context//lib/shoulda/context/world.rb#7 + def contexts=(_arg0); end + + # source://shoulda-context//lib/shoulda/context/world.rb#9 + def current_context; end + + # source://shoulda-context//lib/shoulda/context/configuration.rb#13 + def extend(mod); end + + # source://shoulda-context//lib/shoulda/context/configuration.rb#7 + def include(mod); end + + # source://shoulda-context//lib/shoulda/context/world.rb#17 + def remove_context; end + + # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#29 + def test_framework_test_cases; end + end +end + +# source://shoulda-context//lib/shoulda/context/assertions.rb#3 +module Shoulda::Context::Assertions + # Asserts that the given matcher returns true when +target+ is passed to + # #matches? + # + # source://shoulda-context//lib/shoulda/context/assertions.rb#50 + def assert_accepts(matcher, target, options = T.unsafe(nil)); end + + # Asserts that the given collection contains item x. If x is a regular expression, ensure that + # at least one element from the collection matches x. +extra_msg+ is appended to the error message if the assertion fails. + # + # assert_contains(['a', '1'], /\d/) => passes + # assert_contains(['a', '1'], 'a') => passes + # assert_contains(['a', '1'], /not there/) => fails + # + # source://shoulda-context//lib/shoulda/context/assertions.rb#24 + def assert_contains(collection, x, extra_msg = T.unsafe(nil)); end + + # Asserts that the given collection does not contain item x. If x is a regular expression, ensure that + # none of the elements from the collection match x. + # + # source://shoulda-context//lib/shoulda/context/assertions.rb#37 + def assert_does_not_contain(collection, x, extra_msg = T.unsafe(nil)); end + + # Asserts that the given matcher returns true when +target+ is passed to + # #does_not_match? or false when +target+ is passed to #matches? if + # #does_not_match? is not implemented + # + # source://shoulda-context//lib/shoulda/context/assertions.rb#68 + def assert_rejects(matcher, target, options = T.unsafe(nil)); end + + # Asserts that two arrays contain the same elements, the same number of times. Essentially ==, but unordered. + # + # assert_same_elements([:a, :b, :c], [:c, :a, :b]) => passes) + # + # source://shoulda-context//lib/shoulda/context/assertions.rb#7 + def assert_same_elements(a1, a2, msg = T.unsafe(nil)); end + + # source://shoulda-context//lib/shoulda/context/assertions.rb#90 + def safe_assert_block(message = T.unsafe(nil), &block); end +end + +# source://shoulda-context//lib/shoulda/context/context.rb#3 +class Shoulda::Context::Context + # @return [Context] a new instance of Context + # + # source://shoulda-context//lib/shoulda/context/context.rb#19 + def initialize(name, parent, &blk); end + + # @return [Boolean] + # + # source://shoulda-context//lib/shoulda/context/context.rb#93 + def am_subcontext?; end + + # source://shoulda-context//lib/shoulda/context/context.rb#190 + def build; end + + # source://shoulda-context//lib/shoulda/context/context.rb#142 + def build_test_name_from(should); end + + # source://shoulda-context//lib/shoulda/context/context.rb#47 + def context(name, &blk); end + + # source://shoulda-context//lib/shoulda/context/context.rb#107 + def create_test_from_should_hash(should); end + + # source://shoulda-context//lib/shoulda/context/context.rb#88 + def full_name; end + + # source://shoulda-context//lib/shoulda/context/context.rb#38 + def merge_block(&blk); end + + # source://shoulda-context//lib/shoulda/context/context.rb#208 + def method_missing(method, *args, &blk); end + + # my name + # + # source://shoulda-context//lib/shoulda/context/context.rb#4 + def name; end + + # my name + # + # source://shoulda-context//lib/shoulda/context/context.rb#4 + def name=(_arg0); end + + # may be another context, or the original test::unit class. + # + # source://shoulda-context//lib/shoulda/context/context.rb#5 + def parent; end + + # may be another context, or the original test::unit class. + # + # source://shoulda-context//lib/shoulda/context/context.rb#5 + def parent=(_arg0); end + + # source://shoulda-context//lib/shoulda/context/context.rb#183 + def print_should_eventuallys; end + + # source://shoulda-context//lib/shoulda/context/context.rb#151 + def run_all_setup_blocks(binding); end + + # source://shoulda-context//lib/shoulda/context/context.rb#171 + def run_all_teardown_blocks(binding); end + + # source://shoulda-context//lib/shoulda/context/context.rb#160 + def run_current_setup_blocks(binding); end + + # source://shoulda-context//lib/shoulda/context/context.rb#156 + def run_parent_setup_blocks(binding); end + + # source://shoulda-context//lib/shoulda/context/context.rb#51 + def setup(&blk); end + + # blocks given via setup methods + # + # source://shoulda-context//lib/shoulda/context/context.rb#7 + def setup_blocks; end + + # blocks given via setup methods + # + # source://shoulda-context//lib/shoulda/context/context.rb#7 + def setup_blocks=(_arg0); end + + # source://shoulda-context//lib/shoulda/context/context.rb#59 + def should(name_or_matcher, options = T.unsafe(nil), &blk); end + + # source://shoulda-context//lib/shoulda/context/context.rb#80 + def should_eventually(name, &blk); end + + # array of hashes representing the should eventually statements + # + # source://shoulda-context//lib/shoulda/context/context.rb#10 + def should_eventuallys; end + + # array of hashes representing the should eventually statements + # + # source://shoulda-context//lib/shoulda/context/context.rb#10 + def should_eventuallys=(_arg0); end + + # source://shoulda-context//lib/shoulda/context/context.rb#74 + def should_not(matcher); end + + # array of hashes representing the should statements + # + # source://shoulda-context//lib/shoulda/context/context.rb#9 + def shoulds; end + + # array of hashes representing the should statements + # + # source://shoulda-context//lib/shoulda/context/context.rb#9 + def shoulds=(_arg0); end + + # array of contexts nested under myself + # + # source://shoulda-context//lib/shoulda/context/context.rb#6 + def subcontexts; end + + # array of contexts nested under myself + # + # source://shoulda-context//lib/shoulda/context/context.rb#6 + def subcontexts=(_arg0); end + + # source://shoulda-context//lib/shoulda/context/context.rb#84 + def subject(&block); end + + # accessor with cache + # + # source://shoulda-context//lib/shoulda/context/context.rb#13 + def subject_block; end + + # Sets the attribute subject_block + # + # @param value the value to set the attribute subject_block to. + # + # source://shoulda-context//lib/shoulda/context/context.rb#17 + def subject_block=(_arg0); end + + # source://shoulda-context//lib/shoulda/context/context.rb#55 + def teardown(&blk); end + + # blocks given via teardown methods + # + # source://shoulda-context//lib/shoulda/context/context.rb#8 + def teardown_blocks; end + + # blocks given via teardown methods + # + # source://shoulda-context//lib/shoulda/context/context.rb#8 + def teardown_blocks=(_arg0); end + + # source://shoulda-context//lib/shoulda/context/context.rb#101 + def test_methods; end + + # source://shoulda-context//lib/shoulda/context/context.rb#200 + def test_name_prefix; end + + # source://shoulda-context//lib/shoulda/context/context.rb#97 + def test_unit_class; end +end + +# source://shoulda-context//lib/shoulda/context/dsl.rb#5 +module Shoulda::Context::DSL + include ::Shoulda::Context::Assertions + include ::Shoulda::Context::DSL::InstanceMethods + + mixes_in_class_methods ::Shoulda::Context::DSL::ClassMethods + + class << self + # @private + # + # source://shoulda-context//lib/shoulda/context/dsl.rb#6 + def included(base); end + end +end + +# source://shoulda-context//lib/shoulda/context/dsl.rb#14 +module Shoulda::Context::DSL::ClassMethods + # == Before statements + # + # Before statements are should statements that run before the current + # context's setup. These are especially useful when setting expectations. + # + # === Example: + # + # class UserControllerTest < Test::Unit::TestCase + # context "the index action" do + # setup do + # @users = [Factory(:user)] + # User.stubs(:find).returns(@users) + # end + # + # context "on GET" do + # setup { get :index } + # + # should respond_with(:success) + # + # # runs before "get :index" + # before_should "find all users" do + # User.expects(:find).with(:all).returns(@users) + # end + # end + # end + # end + # + # source://shoulda-context//lib/shoulda/context/dsl.rb#121 + def before_should(name, &blk); end + + # == Contexts + # + # A context block groups should statements under a common set of setup/teardown methods. + # Context blocks can be arbitrarily nested, and can do wonders for improving the maintainability + # and readability of your test code. + # + # A context block can contain setup, should, should_eventually, and teardown blocks. + # + # class UserTest < Test::Unit::TestCase + # context "A User instance" do + # setup do + # @user = User.find(:first) + # end + # + # should "return its full name" + # assert_equal 'John Doe', @user.full_name + # end + # end + # end + # + # This code will produce the method "test: A User instance should return its full name. ". + # + # Contexts may be nested. Nested contexts run their setup blocks from out to in before each + # should statement. They then run their teardown blocks from in to out after each should statement. + # + # class UserTest < Test::Unit::TestCase + # context "A User instance" do + # setup do + # @user = User.find(:first) + # end + # + # should "return its full name" + # assert_equal 'John Doe', @user.full_name + # end + # + # context "with a profile" do + # setup do + # @user.profile = Profile.find(:first) + # end + # + # should "return true when sent :has_profile?" + # assert @user.has_profile? + # end + # end + # end + # end + # + # This code will produce the following methods + # * "test: A User instance should return its full name. " + # * "test: A User instance with a profile should return true when sent :has_profile?. " + # + # Just like should statements, a context block can exist next to normal def test_the_old_way; end + # tests. This means you do not have to fully commit to the context/should syntax in a test file. + # + # source://shoulda-context//lib/shoulda/context/dsl.rb#188 + def context(name, &blk); end + + # Returns the class being tested, as determined by the test class name. + # + # class UserTest; described_type; end + # # => User + # + # source://shoulda-context//lib/shoulda/context/dsl.rb#201 + def described_type; end + + # == Should statements + # + # Should statements are just syntactic sugar over normal Test::Unit test + # methods. A should block contains all the normal code and assertions + # you're used to seeing, with the added benefit that they can be wrapped + # inside context blocks (see below). + # + # === Example: + # + # class UserTest < Test::Unit::TestCase + # + # def setup + # @user = User.new("John", "Doe") + # end + # + # should "return its full name" + # assert_equal 'John Doe', @user.full_name + # end + # + # end + # + # ...will produce the following test: + # * "test: User should return its full name. " + # + # Note: The part before should in the test name is gleamed from the name of the Test::Unit class. + # + # Should statements can also take a Proc as a :before option. This proc runs after any + # parent context's setups but before the current context's setup. + # + # === Example: + # + # context "Some context" do + # setup { puts("I run after the :before proc") } + # + # should "run a :before proc", :before => lambda { puts("I run before the setup") } do + # assert true + # end + # end + # + # Should statements can also wrap matchers, making virtually any matcher + # usable in a macro style. The matcher's description is used to generate a + # test name and failure message, and the test will pass if the matcher + # matches the subject. + # + # === Example: + # + # should validate_presence_of(:first_name).with_message(/gotta be there/) + # + # source://shoulda-context//lib/shoulda/context/dsl.rb#64 + def should(name_or_matcher, options = T.unsafe(nil), &blk); end + + # Just like should, but never runs, and instead prints an 'X' in the Test::Unit output. + # + # source://shoulda-context//lib/shoulda/context/dsl.rb#126 + def should_eventually(name, options = T.unsafe(nil), &blk); end + + # Allows negative tests using matchers. The matcher's description is used + # to generate a test name and negative failure message, and the test will + # pass unless the matcher matches the subject. + # + # === Example: + # + # should_not set_the_flash + # + # source://shoulda-context//lib/shoulda/context/dsl.rb#83 + def should_not(matcher); end + + # Sets the return value of the subject instance method: + # + # class UserTest < Test::Unit::TestCase + # subject { User.first } + # + # # uses the existing user + # should validate_uniqueness_of(:email) + # end + # + # source://shoulda-context//lib/shoulda/context/dsl.rb#218 + def subject(&block); end + + # source://shoulda-context//lib/shoulda/context/dsl.rb#222 + def subject_block; end +end + +# source://shoulda-context//lib/shoulda/context/dsl.rb#227 +module Shoulda::Context::DSL::InstanceMethods + # source://shoulda-context//lib/shoulda/context/dsl.rb#255 + def get_instance_of(object_or_klass); end + + # source://shoulda-context//lib/shoulda/context/dsl.rb#263 + def instance_variable_name_for(klass); end + + # Returns an instance of the class under test. + # + # class UserTest + # should "be a user" do + # assert_kind_of User, subject # passes + # end + # end + # + # The subject can be explicitly set using the subject class method: + # + # class UserTest + # subject { User.first } + # should "be an existing user" do + # assert !subject.new_record? # uses the first user + # end + # end + # + # The subject is used by all macros that require an instance of the class + # being tested. + # + # source://shoulda-context//lib/shoulda/context/dsl.rb#247 + def subject; end + + # source://shoulda-context//lib/shoulda/context/dsl.rb#251 + def subject_block; end + + private + + # source://shoulda-context//lib/shoulda/context/dsl.rb#269 + def construct_subject; end +end + +# source://shoulda-context//lib/shoulda/context/context.rb#213 +class Shoulda::Context::DuplicateTestError < ::RuntimeError; end + +# source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#3 +module Shoulda::Context::TestFrameworkDetection + class << self + # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#18 + def detected_test_framework_test_cases; end + + # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#4 + def possible_test_frameworks; end + + # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#12 + def resolve_framework(future_framework); end + + # source://shoulda-context//lib/shoulda/context/test_framework_detection.rb#24 + def test_framework_test_cases; end + end +end + +# source://shoulda-context//lib/shoulda/context/version.rb#3 +Shoulda::Context::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/solargraph@0.48.0.rbi b/sorbet/rbi/gems/solargraph@0.48.0.rbi new file mode 100644 index 0000000..dbb84dc --- /dev/null +++ b/sorbet/rbi/gems/solargraph@0.48.0.rbi @@ -0,0 +1,9142 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `solargraph` gem. +# Please instead update this file by running `bin/tapioca gem solargraph`. + + +# source://solargraph//lib/solargraph/converters/dl.rb#1 +module ReverseMarkdown + class << self + # source://reverse_markdown/2.1.1/lib/reverse_markdown.rb#60 + def cleaner; end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown.rb#54 + def config; end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown.rb#37 + def convert(input, options = T.unsafe(nil)); end + end +end + +# source://solargraph//lib/solargraph/converters/dl.rb#2 +module ReverseMarkdown::Converters + class << self + # source://reverse_markdown/2.1.1/lib/reverse_markdown/converters.rb#18 + def default_converter(tag_name); end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown/converters.rb#12 + def lookup(tag_name); end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown/converters.rb#3 + def register(tag_name, converter); end + + # source://reverse_markdown/2.1.1/lib/reverse_markdown/converters.rb#8 + def unregister(tag_name); end + end +end + +# source://solargraph//lib/solargraph/converters/dd.rb#3 +class ReverseMarkdown::Converters::Dd < ::ReverseMarkdown::Converters::Base + # source://solargraph//lib/solargraph/converters/dd.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/converters/dl.rb#3 +class ReverseMarkdown::Converters::Dl < ::ReverseMarkdown::Converters::Base + # source://solargraph//lib/solargraph/converters/dl.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/converters/dt.rb#3 +class ReverseMarkdown::Converters::Dt < ::ReverseMarkdown::Converters::Base + # source://solargraph//lib/solargraph/converters/dt.rb#4 + def convert(node, state = T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/parser/rubyvm.rb#13 +class RubyVM::AbstractSyntaxTree::Node + # source://solargraph//lib/solargraph/parser/rubyvm.rb#18 + def ==(other); end + + # source://solargraph//lib/solargraph/parser/rubyvm.rb#14 + def to_sexp; end + + private + + # source://solargraph//lib/solargraph/parser/rubyvm.rb#27 + def sexp(node, depth = T.unsafe(nil)); end +end + +# The top-level namespace for the Solargraph code mapping, documentation, +# static analysis, and language server libraries. +# +# source://solargraph//lib/solargraph/version.rb#3 +module Solargraph + class << self + # A convenience method for Solargraph::Logging.logger. + # + # @return [Logger] + # + # source://solargraph//lib/solargraph.rb#53 + def logger; end + + # A helper method that runs Bundler.with_unbundled_env or falls back to + # Bundler.with_clean_env for earlier versions of Bundler. + # + # @return [void] + # + # source://solargraph//lib/solargraph.rb#61 + def with_clean_env(&block); end + end +end + +# An aggregate provider for information about workspaces, sources, gems, and +# the Ruby core. +# +# source://solargraph//lib/solargraph/api_map.rb#13 +class Solargraph::ApiMap + include ::Solargraph::ApiMap::SourceToYard + + # @param pins [Array] + # @return [ApiMap] a new instance of ApiMap + # + # source://solargraph//lib/solargraph/api_map.rb#28 + def initialize(pins: T.unsafe(nil)); end + + # True if the specified file was included in a bundle, i.e., it's either + # included in a workspace or open in a library. + # + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map.rb#438 + def bundled?(filename); end + + # Catalog a bench. + # + # @param bench [Bench] + # + # source://solargraph//lib/solargraph/api_map.rb#60 + def catalog(bench); end + + # @param cursor [Source::Cursor] + # @raise [FileNotFoundError] if the cursor's file is not in the ApiMap + # @return [SourceMap::Clip] + # + # source://solargraph//lib/solargraph/api_map.rb#406 + def clip(cursor); end + + # Get a clip by filename and position. + # + # @param filename [String] + # @param position [Position, Array(Integer, Integer)] + # @return [SourceMap::Clip] + # + # source://solargraph//lib/solargraph/api_map.rb#109 + def clip_at(filename, position); end + + # @param filename [String] + # @param position [Position, Array(Integer, Integer)] + # @raise [FileNotFoundError] + # @return [Source::Cursor] + # + # source://solargraph//lib/solargraph/api_map.rb#98 + def cursor_at(filename, position); end + + # Get YARD documentation for the specified path. + # + # @example + # api_map.document('String#split') + # @param path [String] The path to find + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#378 + def document(path); end + + # Get an array of document symbols from a file. + # + # @param filename [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#415 + def document_symbols(filename); end + + # Get an array of class variable pins for a namespace. + # + # @param namespace [String] A fully qualified namespace + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#231 + def get_class_variable_pins(namespace); end + + # Get an array of method pins for a complex type. + # + # The type's namespace and the context should be fully qualified. If the + # context matches the namespace type or is a subclass of the type, + # protected methods are included in the results. If protected methods are + # included and internal is true, private methods are also included. + # + # @example + # api_map = Solargraph::ApiMap.new + # type = Solargraph::ComplexType.parse('String') + # api_map.get_complex_type_methods(type) + # @param complex_type [Solargraph::ComplexType] The complex type of the namespace + # @param context [String] The context from which the type is referenced + # @param internal [Boolean] True to include private methods + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#292 + def get_complex_type_methods(complex_type, context = T.unsafe(nil), internal = T.unsafe(nil)); end + + # Get suggestions for constants in the specified namespace. The result + # may contain both constant and namespace pins. + # + # @param namespace [String] The namespace + # @param contexts [Array] The contexts + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#172 + def get_constants(namespace, *contexts); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#241 + def get_global_variable_pins; end + + # Get an array of instance variable pins defined in specified namespace + # and scope. + # + # @param namespace [String] A fully qualified namespace + # @param scope [Symbol] :instance or :class + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#214 + def get_instance_variable_pins(namespace, scope = T.unsafe(nil)); end + + # Get a stack of method pins for a method name in a namespace. The order + # of the pins corresponds to the ancestry chain, with highest precedence + # first. + # + # @example + # api_map.get_method_stack('Subclass', 'method_name') + # #=> [ , ] + # @param fqns [String] + # @param name [String] + # @param scope [Symbol] :instance or :class + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#329 + def get_method_stack(fqns, name, scope: T.unsafe(nil)); end + + # Get an array of methods available in a particular context. + # + # @param fqns [String] The fully qualified namespace to search for methods + # @param scope [Symbol] :class or :instance + # @param visibility [Array] :public, :protected, and/or :private + # @param deep [Boolean] True to include superclasses, mixins, etc. + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#252 + def get_methods(fqns, scope: T.unsafe(nil), visibility: T.unsafe(nil), deep: T.unsafe(nil)); end + + # Get an array of pins that match the specified path. + # + # @param path [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#348 + def get_path_pins(path); end + + # Get an array of all suggestions that match the specified path. + # + # @deprecated Use #get_path_pins instead. + # @param path [String] The path to find + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#339 + def get_path_suggestions(path); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#236 + def get_symbols; end + + # @return [Environ] + # + # source://solargraph//lib/solargraph/api_map.rb#91 + def implicit; end + + # @param pins [Array] + # @return [self] + # + # source://solargraph//lib/solargraph/api_map.rb#37 + def index(pins); end + + # An array of pins based on Ruby keywords (`if`, `end`, etc.). + # + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map.rb#146 + def keyword_pins; end + + # @param location [Solargraph::Location] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#398 + def locate_pins(location); end + + # Map a single source. + # + # @param source [Source] + # @return [self] + # + # source://solargraph//lib/solargraph/api_map.rb#51 + def map(source); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#25 + def missing_docs; end + + # @param name [String] + # @return [YARD::Tags::MacroDirective, nil] + # + # source://solargraph//lib/solargraph/api_map.rb#82 + def named_macro(name); end + + # True if the namespace exists. + # + # @param name [String] The namespace to match + # @param context [String] The context to search + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map.rb#162 + def namespace_exists?(name, context = T.unsafe(nil)); end + + # An array of namespace names defined in the ApiMap. + # + # @return [Set] + # + # source://solargraph//lib/solargraph/api_map.rb#153 + def namespaces; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#129 + def pins; end + + # Get a fully qualified namespace name. This method will start the search + # in the specified context until it finds a match for the name. + # + # @param namespace [String, nil] The namespace to match + # @param context [String] The context to search + # @return [String] + # + # source://solargraph//lib/solargraph/api_map.rb#195 + def qualify(namespace, context = T.unsafe(nil)); end + + # Get an array of all symbols in the workspace that match the query. + # + # @param query [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#389 + def query_symbols(query); end + + # source://solargraph//lib/solargraph/api_map.rb#133 + def rebindable_method_names; end + + # source://solargraph//lib/solargraph/api_map.rb#86 + def required; end + + # Get a list of documented paths that match the query. + # + # @example + # api_map.query('str') # Results will include `String` and `Struct` + # @param query [String] The text to match + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#359 + def search(query); end + + # Get a source map by filename. + # + # @param filename [String] + # @raise [FileNotFoundError] + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/api_map.rb#429 + def source_map(filename); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#421 + def source_maps; end + + # Check if a class is a superclass of another class. + # + # @param sup [String] The superclass + # @param sub [String] The subclass + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map.rb#447 + def super_and_sub?(sup, sub); end + + # Check if the host class includes the specified module. + # + # @param host [String] The class + # @param mod [String] The module + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map.rb#467 + def type_include?(host, mod); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#22 + def unresolved_requires; end + + # @return [YardMap] + # + # source://solargraph//lib/solargraph/api_map.rb#458 + def yard_map; end + + private + + # @return [Solargraph::ApiMap::Cache] + # + # source://solargraph//lib/solargraph/api_map.rb#484 + def cache; end + + # Get the namespace's type (Class or Module). + # + # @param fqns [String] A fully qualified namespace + # @return [Symbol, nil] :class, :module, or nil + # + # source://solargraph//lib/solargraph/api_map.rb#627 + def get_namespace_type(fqns); end + + # @param fqns [String] + # @param visibility [Array] + # @param skip [Set] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#543 + def inner_get_constants(fqns, visibility, skip); end + + # @param fqns [String] A fully qualified namespace + # @param scope [Symbol] :class or :instance + # @param visibility [Array] :public, :protected, and/or :private + # @param deep [Boolean] + # @param skip [Set] + # @param no_core [Boolean] Skip core classes if true + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#493 + def inner_get_methods(fqns, scope, visibility, deep, skip, no_core = T.unsafe(nil)); end + + # @param name [String] + # @param root [String] + # @param skip [Set] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/api_map.rb#587 + def inner_qualify(name, root, skip); end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map.rb#563 + def path_macros; end + + # Sort an array of pins to put nil or undefined variables last. + # + # @param pins [Array] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#639 + def prefer_non_nil_variables(pins); end + + # @param namespace [String] + # @param context [String] + # @return [String] + # + # source://solargraph//lib/solargraph/api_map.rb#570 + def qualify_lower(namespace, context); end + + # source://solargraph//lib/solargraph/api_map.rb#574 + def qualify_superclass(fqsub); end + + # @param pin [Pin::MethodAlias, Pin::Base] + # @return [Pin::Method] + # + # source://solargraph//lib/solargraph/api_map.rb#667 + def resolve_method_alias(pin); end + + # @param pins [Array] + # @param visibility [Array] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map.rb#655 + def resolve_method_aliases(pins, visibility = T.unsafe(nil)); end + + # A hash of source maps with filename keys. + # + # @return [Hash{String => SourceMap}] + # + # source://solargraph//lib/solargraph/api_map.rb#476 + def source_map_hash; end + + # @return [ApiMap::Store] + # + # source://solargraph//lib/solargraph/api_map.rb#479 + def store; end + + class << self + # Create an ApiMap with a workspace in the specified directory. + # + # @param directory [String] + # @return [ApiMap] + # + # source://solargraph//lib/solargraph/api_map.rb#118 + def load(directory); end + end +end + +# source://solargraph//lib/solargraph/api_map/bundler_methods.rb#6 +module Solargraph::ApiMap::BundlerMethods + private + + # @param directory [String] + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map/bundler_methods.rb#11 + def require_from_bundle(directory); end + + class << self + # @param directory [String] + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map/bundler_methods.rb#11 + def require_from_bundle(directory); end + end +end + +# source://solargraph//lib/solargraph/api_map/cache.rb#5 +class Solargraph::ApiMap::Cache + # @return [Cache] a new instance of Cache + # + # source://solargraph//lib/solargraph/api_map/cache.rb#6 + def initialize; end + + # @return [void] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#54 + def clear; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#62 + def empty?; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#23 + def get_constants(namespace, context); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#14 + def get_methods(fqns, scope, visibility, deep); end + + # @return [String] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#32 + def get_qualified_namespace(name, context); end + + # @return [Pin::Method] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#45 + def get_receiver_definition(path); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map/cache.rb#40 + def receiver_defined?(path); end + + # source://solargraph//lib/solargraph/api_map/cache.rb#27 + def set_constants(namespace, context, value); end + + # source://solargraph//lib/solargraph/api_map/cache.rb#18 + def set_methods(fqns, scope, visibility, deep, value); end + + # source://solargraph//lib/solargraph/api_map/cache.rb#36 + def set_qualified_namespace(name, context, value); end + + # source://solargraph//lib/solargraph/api_map/cache.rb#49 + def set_receiver_definition(path, pin); end +end + +# source://solargraph//lib/solargraph/api_map/source_to_yard.rb#5 +module Solargraph::ApiMap::SourceToYard + # Get the YARD CodeObject at the specified path. + # + # @param path [String] + # @return [YARD::CodeObjects::Base] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#11 + def code_object_at(path); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#16 + def code_object_paths; end + + # @param store [ApiMap::Store] ApiMap pin store + # @return [void] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#22 + def rake_yard(store); end + + private + + # @return [Hash{String => YARD::CodeObjects::Base}] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#71 + def code_object_map; end + + # @return [YARD::CodeObjects::RootObject] + # + # source://solargraph//lib/solargraph/api_map/source_to_yard.rb#76 + def root_code_object; end +end + +# source://solargraph//lib/solargraph/api_map/store.rb#7 +class Solargraph::ApiMap::Store + # @param pins [Enumerable] + # @return [Store] a new instance of Store + # + # source://solargraph//lib/solargraph/api_map/store.rb#12 + def initialize(pins = T.unsafe(nil)); end + + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#135 + def block_pins; end + + # @param fqns [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map/store.rb#112 + def domains(fqns); end + + # @param fqns [String] + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#80 + def get_class_variables(fqns); end + + # @param fqns [String] + # @param visibility [Array] + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#20 + def get_constants(fqns, visibility = T.unsafe(nil)); end + + # @param fqns [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map/store.rb#59 + def get_extends(fqns); end + + # @param fqns [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map/store.rb#47 + def get_includes(fqns); end + + # @param fqns [String] + # @param scope [Symbol] :class or :instance + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#72 + def get_instance_variables(fqns, scope = T.unsafe(nil)); end + + # @param fqns [String] + # @param scope [Symbol] + # @param visibility [Array] + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#30 + def get_methods(fqns, scope: T.unsafe(nil), visibility: T.unsafe(nil)); end + + # @param path [String] + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#65 + def get_path_pins(path); end + + # @param fqns [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map/store.rb#53 + def get_prepends(fqns); end + + # @param fqns [String] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/api_map/store.rb#38 + def get_superclass(fqns); end + + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#85 + def get_symbols; end + + # source://solargraph//lib/solargraph/api_map/store.rb#139 + def inspect; end + + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#106 + def method_pins; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map/store.rb#121 + def named_macros; end + + # @param fqns [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/api_map/store.rb#91 + def namespace_exists?(fqns); end + + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#101 + def namespace_pins; end + + # @return [Set] + # + # source://solargraph//lib/solargraph/api_map/store.rb#96 + def namespaces; end + + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#9 + def pins; end + + # @param klass [Class] + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#146 + def pins_by_class(klass); end + + private + + # source://solargraph//lib/solargraph/api_map/store.rb#206 + def all_instance_variables; end + + # source://solargraph//lib/solargraph/api_map/store.rb#191 + def extend_references; end + + # @param fqns [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/api_map/store.rb#154 + def fqns_pins(fqns); end + + # source://solargraph//lib/solargraph/api_map/store.rb#167 + def fqns_pins_map; end + + # source://solargraph//lib/solargraph/api_map/store.rb#183 + def include_references; end + + # @return [void] + # + # source://solargraph//lib/solargraph/api_map/store.rb#215 + def index; end + + # @param name [String] + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#197 + def namespace_children(name); end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/api_map/store.rb#202 + def namespace_map; end + + # source://solargraph//lib/solargraph/api_map/store.rb#210 + def path_pin_hash; end + + # source://solargraph//lib/solargraph/api_map/store.rb#187 + def prepend_references; end + + # source://solargraph//lib/solargraph/api_map/store.rb#179 + def superclass_references; end + + # @return [Enumerable] + # + # source://solargraph//lib/solargraph/api_map/store.rb#175 + def symbols; end +end + +# A container of source maps and workspace data to be cataloged in an ApiMap. +# +# source://solargraph//lib/solargraph/bench.rb#8 +class Solargraph::Bench + # @param source_maps [Array, Set] + # @param workspace [Workspace] + # @param external_requires [Array, Set] + # @return [Bench] a new instance of Bench + # + # source://solargraph//lib/solargraph/bench.rb#21 + def initialize(source_maps: T.unsafe(nil), workspace: T.unsafe(nil), external_requires: T.unsafe(nil)); end + + # @return [Set] + # + # source://solargraph//lib/solargraph/bench.rb#16 + def external_requires; end + + # @return [Set] + # + # source://solargraph//lib/solargraph/bench.rb#10 + def source_maps; end + + # @return [Workspace] + # + # source://solargraph//lib/solargraph/bench.rb#13 + def workspace; end +end + +# source://solargraph//lib/solargraph.rb#18 +class Solargraph::BundleNotFoundError < ::StandardError; end + +# A container for type data based on YARD type tags. +# +# source://solargraph//lib/solargraph/complex_type.rb#6 +class Solargraph::ComplexType + # @param types [Array] + # @return [ComplexType] a new instance of ComplexType + # + # source://solargraph//lib/solargraph/complex_type.rb#14 + def initialize(types = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/complex_type.rb#57 + def [](index); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#83 + def all?(&block); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#87 + def any?(&block); end + + # @return [Array] + # @yieldparam [UniqueType] + # + # source://solargraph//lib/solargraph/complex_type.rb#39 + def each(&block); end + + # @return [Enumerator] + # @yieldparam [UniqueType] + # + # source://solargraph//lib/solargraph/complex_type.rb#45 + def each_unique_type(&block); end + + # source://solargraph//lib/solargraph/complex_type.rb#29 + def first; end + + # source://solargraph//lib/solargraph/complex_type.rb#53 + def length; end + + # source://solargraph//lib/solargraph/complex_type.rb#33 + def map(&block); end + + # source://solargraph//lib/solargraph/complex_type.rb#69 + def method_missing(name, *args, &block); end + + # source://solargraph//lib/solargraph/complex_type.rb#64 + def namespace; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#104 + def nullable?; end + + # @param api_map [ApiMap] + # @param context [String] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/complex_type.rb#21 + def qualify(api_map, context = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/complex_type.rb#61 + def select(&block); end + + # @param dst [String] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/complex_type.rb#97 + def self_to(dst); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#91 + def selfy?; end + + # source://solargraph//lib/solargraph/complex_type.rb#79 + def to_s; end + + private + + # @param dst [String] + # @return [String] + # @todo This is a quick and dirty hack that forces `self` keywords + # to reference an instance of their class and never the class itself. + # This behavior may change depending on which result is expected + # from YARD conventions. See https://github.com/lsegal/yard/issues/1257 + # + # source://solargraph//lib/solargraph/complex_type.rb#116 + def reduce_class(dst); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type.rb#75 + def respond_to_missing?(name, include_private = T.unsafe(nil)); end + + class << self + # Parse type strings into a ComplexType. + # + # @example + # ComplexType.parse 'String', 'Foo', 'nil' #=> [String, Foo, nil] + # @note The `partial` parameter is used to indicate that the method is + # receiving a string that will be used inside another ComplexType. + # It returns arrays of ComplexTypes instead of a single cohesive one. + # Consumers should not need to use this parameter; it should only be + # used internally. + # @param *strings [Array] The type definitions to parse + # @param partial [Boolean] True if the string is part of a another type + # @return [ComplexType, Array, nil] + # + # source://solargraph//lib/solargraph/complex_type.rb#139 + def parse(*strings, partial: T.unsafe(nil)); end + + # @param strings [Array] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/complex_type.rb#219 + def try_parse(*strings); end + end +end + +# source://solargraph//lib/solargraph/complex_type.rb#233 +Solargraph::ComplexType::BOOLEAN = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph/complex_type.rb#231 +Solargraph::ComplexType::NIL = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph/complex_type.rb#230 +Solargraph::ComplexType::ROOT = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph/complex_type.rb#232 +Solargraph::ComplexType::SELF = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph/complex_type.rb#229 +Solargraph::ComplexType::SYMBOL = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# Methods for accessing type data. +# +# source://solargraph//lib/solargraph/complex_type/type_methods.rb#7 +module Solargraph::ComplexType::TypeMethods + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#89 + def ==(other); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#40 + def defined?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#21 + def duck_type?; end + + # @return [Enumerator] + # @yieldparam [UniqueType] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#131 + def each_unique_type(&block); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#54 + def fixed_parameters?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#59 + def hash_parameters?; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#69 + def key_types; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#49 + def list_parameters?; end + + # @return [String] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#9 + def name; end + + # @return [String] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#74 + def namespace; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#26 + def nil_type?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#32 + def parameters?; end + + # Generate a ComplexType that fully qualifies this type's namespaces. + # + # @param api_map [ApiMap] The ApiMap that performs qualification + # @param context [String] The namespace from which to resolve names + # @return [ComplexType] The generated ComplexType + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#103 + def qualify(api_map, context = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#94 + def rooted?; end + + # @return [Symbol] :class or :instance + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#84 + def scope; end + + # @return [String] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#12 + def substring; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#18 + def subtypes; end + + # @return [String] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#15 + def tag; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#44 + def undefined?; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#64 + def value_types; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/type_methods.rb#36 + def void?; end +end + +# source://solargraph//lib/solargraph/complex_type.rb#228 +Solargraph::ComplexType::UNDEFINED = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# An individual type signature. A complex type can consist of multiple +# unique types. +# +# source://solargraph//lib/solargraph/complex_type/unique_type.rb#8 +class Solargraph::ComplexType::UniqueType + include ::Solargraph::ComplexType::TypeMethods + + # Create a UniqueType with the specified name and an optional substring. + # The substring is the parameter section of a parametrized type, e.g., + # for the type `Array`, the name is `Array` and the substring is + # ``. + # + # @param name [String] The name of the type + # @param substring [String] The substring of the type + # @return [UniqueType] a new instance of UniqueType + # + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#18 + def initialize(name, substring = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#49 + def self_to(dst); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#67 + def selfy?; end + + # source://solargraph//lib/solargraph/complex_type/unique_type.rb#45 + def to_s; end +end + +# source://solargraph//lib/solargraph/complex_type/unique_type.rb#72 +Solargraph::ComplexType::UniqueType::BOOLEAN = T.let(T.unsafe(nil), Solargraph::ComplexType::UniqueType) + +# source://solargraph//lib/solargraph/complex_type/unique_type.rb#71 +Solargraph::ComplexType::UniqueType::UNDEFINED = T.let(T.unsafe(nil), Solargraph::ComplexType::UniqueType) + +# source://solargraph//lib/solargraph/complex_type.rb#227 +Solargraph::ComplexType::VOID = T.let(T.unsafe(nil), Solargraph::ComplexType) + +# source://solargraph//lib/solargraph.rb#16 +class Solargraph::ComplexTypeError < ::StandardError; end + +# Conventions provide a way to modify an ApiMap based on expectations about +# one of its sources. +# +# source://solargraph//lib/solargraph/convention.rb#9 +module Solargraph::Convention + class << self + # @param yard_map [YardMap] + # @return [Environ] + # + # source://solargraph//lib/solargraph/convention.rb#35 + def for_global(yard_map); end + + # @param source_map [SourceMap] + # @return [Environ] + # + # source://solargraph//lib/solargraph/convention.rb#25 + def for_local(source_map); end + + # @param convention [Class] + # @return [void] + # + # source://solargraph//lib/solargraph/convention.rb#19 + def register(convention); end + end +end + +# The base class for Conventions. +# +# A Convention provides Environs that customize ApiMaps with additional +# pins and other information. Subclasses should implement the `local` and +# `global` methods as necessary. +# +# source://solargraph//lib/solargraph/convention/base.rb#11 +class Solargraph::Convention::Base + # The Environ for a YARD map. + # Subclasses can override this method. + # + # @param yard_map [YardMap] + # @return [Environ] + # + # source://solargraph//lib/solargraph/convention/base.rb#28 + def global(yard_map); end + + # The Environ for a source map. + # Subclasses can override this method. + # + # @param source_map [SourceMap] + # @return [Environ] + # + # source://solargraph//lib/solargraph/convention/base.rb#19 + def local(source_map); end +end + +# source://solargraph//lib/solargraph/convention/base.rb#12 +Solargraph::Convention::Base::EMPTY_ENVIRON = T.let(T.unsafe(nil), Solargraph::Environ) + +# source://solargraph//lib/solargraph/convention/gemfile.rb#5 +class Solargraph::Convention::Gemfile < ::Solargraph::Convention::Base + # source://solargraph//lib/solargraph/convention/gemfile.rb#6 + def local(source_map); end +end + +# source://solargraph//lib/solargraph/convention/gemspec.rb#5 +class Solargraph::Convention::Gemspec < ::Solargraph::Convention::Base + # source://solargraph//lib/solargraph/convention/gemspec.rb#6 + def local(source_map); end +end + +# source://solargraph//lib/solargraph/convention/rspec.rb#5 +class Solargraph::Convention::Rspec < ::Solargraph::Convention::Base + # source://solargraph//lib/solargraph/convention/rspec.rb#6 + def local(source_map); end + + private + + # source://solargraph//lib/solargraph/convention/rspec.rb#22 + def extras; end +end + +# The Diagnostics library provides reporters for analyzing problems in code +# and providing the results to language server clients. +# +# source://solargraph//lib/solargraph/diagnostics.rb#7 +module Solargraph::Diagnostics + class << self + # Add a reporter with a name to identify it in .solargraph.yml files. + # + # @param name [String] The name + # @param klass [Class] The class implementation + # @return [void] + # + # source://solargraph//lib/solargraph/diagnostics.rb#22 + def register(name, klass); end + + # Find a reporter by name. + # + # @param name [String] The name with which the reporter was registered + # @return [Class] + # + # source://solargraph//lib/solargraph/diagnostics.rb#37 + def reporter(name); end + + # Get an array of reporter names. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/diagnostics.rb#29 + def reporters; end + + private + + # @return [Hash] + # + # source://solargraph//lib/solargraph/diagnostics.rb#44 + def reporter_hash; end + end +end + +# The base class for diagnostics reporters. +# +# source://solargraph//lib/solargraph/diagnostics/base.rb#7 +class Solargraph::Diagnostics::Base + # @return [Base] a new instance of Base + # + # source://solargraph//lib/solargraph/diagnostics/base.rb#11 + def initialize(*args); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/diagnostics/base.rb#9 + def args; end + + # Perform a diagnosis on a Source within the context of an ApiMap. + # The result is an array of hash objects that conform to the LSP's + # Diagnostic specification. + # + # Subclasses should override this method. + # + # @param source [Solargraph::Source] + # @param api_map [Solargraph::ApiMap] + # @return [Array] + # + # source://solargraph//lib/solargraph/diagnostics/base.rb#24 + def diagnose(source, api_map); end +end + +# RequireNotFound reports required paths that could not be resolved to +# either a file in the workspace or a gem. +# +# source://solargraph//lib/solargraph/diagnostics/require_not_found.rb#8 +class Solargraph::Diagnostics::RequireNotFound < ::Solargraph::Diagnostics::Base + # source://solargraph//lib/solargraph/diagnostics/require_not_found.rb#9 + def diagnose(source, api_map); end + + private + + # @param path [String] + # @param location [Location] + # @return [Hash] + # + # source://solargraph//lib/solargraph/diagnostics/require_not_found.rb#31 + def docs_error(path, location); end + + # @param path [String] + # @param location [Location] + # @return [Hash] + # + # source://solargraph//lib/solargraph/diagnostics/require_not_found.rb#43 + def require_error(path, location); end +end + +# This reporter provides linting through RuboCop. +# +# source://solargraph//lib/solargraph/diagnostics/rubocop.rb#9 +class Solargraph::Diagnostics::Rubocop < ::Solargraph::Diagnostics::Base + include ::Solargraph::Diagnostics::RubocopHelpers + + # @param source [Solargraph::Source] + # @param _api_map [Solargraph::ApiMap] + # @return [Array] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#25 + def diagnose(source, _api_map); end + + private + + # @param resp [Hash] + # @return [Array] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#49 + def make_array(resp); end + + # @param off [Hash] + # @return [Position] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#88 + def offense_ending_position(off); end + + # @param off [Hash] + # @return [Range] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#76 + def offense_range(off); end + + # @param off [Hash] + # @return [Position] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#82 + def offense_start_position(off); end + + # Convert a RuboCop offense to an LSP diagnostic + # + # @param off [Hash] Offense received from Rubocop + # @return [Hash] LSP diagnostic + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#63 + def offense_to_diagnostic(off); end + + # Extracts the rubocop version from _args_ + # + # @return [String] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop.rb#43 + def rubocop_version; end +end + +# Conversion of RuboCop severity names to LSP constants +# +# source://solargraph//lib/solargraph/diagnostics/rubocop.rb#13 +Solargraph::Diagnostics::Rubocop::SEVERITIES = T.let(T.unsafe(nil), Hash) + +# Utility methods for the RuboCop diagnostics reporter. +# +# source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#7 +module Solargraph::Diagnostics::RubocopHelpers + private + + # RuboCop internally uses capitalized drive letters for Windows paths, + # so we need to convert the paths provided to the command. + # + # @param path [String] + # @return [String] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#46 + def fix_drive_letter(path); end + + # Generate command-line options for the specified filename and code. + # + # @param filename [String] + # @param code [String] + # @return [Array(Array, Array)] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#33 + def generate_options(filename, code); end + + # @return [String] + # @todo This is a smelly way to redirect output, but the RuboCop specs do + # the same thing. + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#54 + def redirect_stdout; end + + # Requires a specific version of rubocop, or the latest installed version + # if _version_ is `nil`. + # + # @param version [String] + # @raise [InvalidRubocopVersionError] if _version_ is not installed + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#15 + def require_rubocop(version = T.unsafe(nil)); end + + class << self + # RuboCop internally uses capitalized drive letters for Windows paths, + # so we need to convert the paths provided to the command. + # + # @param path [String] + # @return [String] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#46 + def fix_drive_letter(path); end + + # Generate command-line options for the specified filename and code. + # + # @param filename [String] + # @param code [String] + # @return [Array(Array, Array)] + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#33 + def generate_options(filename, code); end + + # @return [String] + # @todo This is a smelly way to redirect output, but the RuboCop specs do + # the same thing. + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#54 + def redirect_stdout; end + + # Requires a specific version of rubocop, or the latest installed version + # if _version_ is `nil`. + # + # @param version [String] + # @raise [InvalidRubocopVersionError] if _version_ is not installed + # + # source://solargraph//lib/solargraph/diagnostics/rubocop_helpers.rb#15 + def require_rubocop(version = T.unsafe(nil)); end + end +end + +# These severity constants match the DiagnosticSeverity constants in the +# language server protocol. +# +# source://solargraph//lib/solargraph/diagnostics/severities.rb#8 +module Solargraph::Diagnostics::Severities; end + +# source://solargraph//lib/solargraph/diagnostics/severities.rb#9 +Solargraph::Diagnostics::Severities::ERROR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/diagnostics/severities.rb#12 +Solargraph::Diagnostics::Severities::HINT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/diagnostics/severities.rb#11 +Solargraph::Diagnostics::Severities::INFORMATION = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/diagnostics/severities.rb#10 +Solargraph::Diagnostics::Severities::WARNING = T.let(T.unsafe(nil), Integer) + +# TypeCheck reports methods with undefined return types, untagged +# parameters, and invalid param tags. +# +# source://solargraph//lib/solargraph/diagnostics/type_check.rb#8 +class Solargraph::Diagnostics::TypeCheck < ::Solargraph::Diagnostics::Base + # source://solargraph//lib/solargraph/diagnostics/type_check.rb#9 + def diagnose(source, api_map); end + + private + + # @param location [Location] + # @param source [Source] + # @return [Hash] + # + # source://solargraph//lib/solargraph/diagnostics/type_check.rb#31 + def extract_first_line(location, source); end + + # @param position [Solargraph::Position] + # @param source [Solargraph::Source] + # @return [Integer] + # + # source://solargraph//lib/solargraph/diagnostics/type_check.rb#48 + def last_character(position, source); end +end + +# source://solargraph//lib/solargraph/diagnostics/update_errors.rb#5 +class Solargraph::Diagnostics::UpdateErrors < ::Solargraph::Diagnostics::Base + # source://solargraph//lib/solargraph/diagnostics/update_errors.rb#6 + def diagnose(source, api_map); end + + private + + # Combine an array of ranges by their starting lines. + # + # @param code [String] + # @param ranges [Array] + # @return [Array] + # + # source://solargraph//lib/solargraph/diagnostics/update_errors.rb#26 + def combine_ranges(code, ranges); end +end + +# source://solargraph//lib/solargraph.rb#13 +class Solargraph::DiagnosticsError < ::RuntimeError; end + +# source://solargraph//lib/solargraph/documentor.rb#11 +class Solargraph::Documentor + # @return [Documentor] a new instance of Documentor + # + # source://solargraph//lib/solargraph/documentor.rb#17 + def initialize(directory, rebuild: T.unsafe(nil), out: T.unsafe(nil)); end + + # @return [Boolean] True if all specs were found and documented. + # + # source://solargraph//lib/solargraph/documentor.rb#24 + def document; end + + class << self + # @param directory [String] + # @return [Hash] + # + # source://solargraph//lib/solargraph/documentor.rb#60 + def specs_from_bundle(directory); end + end +end + +# source://solargraph//lib/solargraph/documentor.rb#12 +Solargraph::Documentor::RDOC_GEMS = T.let(T.unsafe(nil), Array) + +# A placeholder for the @!domain directive. It doesn't need to do anything +# for yardocs. It's only used for Solargraph API maps. +# +# source://solargraph//lib/yard-solargraph.rb#11 +class Solargraph::DomainDirective < ::YARD::Tags::Directive + # source://solargraph//lib/yard-solargraph.rb#12 + def call; end +end + +# A collection of additional data, such as map pins and required paths, that +# can be added to an ApiMap. +# +# Conventions are used to add Environs. +# +# source://solargraph//lib/solargraph/environ.rb#9 +class Solargraph::Environ + # @param requires [Array] + # @param domains [Array] + # @param pins [Array] + # @return [Environ] a new instance of Environ + # + # source://solargraph//lib/solargraph/environ.rb#22 + def initialize(requires: T.unsafe(nil), domains: T.unsafe(nil), pins: T.unsafe(nil)); end + + # @return [self] + # + # source://solargraph//lib/solargraph/environ.rb#29 + def clear; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/environ.rb#14 + def domains; end + + # @param other [Environ] + # @return [self] + # + # source://solargraph//lib/solargraph/environ.rb#38 + def merge(other); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/environ.rb#17 + def pins; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/environ.rb#11 + def requires; end +end + +# source://solargraph//lib/solargraph.rb#14 +class Solargraph::FileNotFoundError < ::RuntimeError; end + +# source://solargraph//lib/solargraph.rb#12 +class Solargraph::InvalidOffsetError < ::RangeError; end + +# source://solargraph//lib/solargraph.rb#19 +class Solargraph::InvalidRubocopVersionError < ::RuntimeError; end + +# The LanguageServer namespace contains the classes and modules that compose +# concrete implementations of language servers. +# +# source://solargraph//lib/solargraph/language_server/error_codes.rb#4 +module Solargraph::LanguageServer; end + +# The CompletionItemKind constants for the language server protocol. +# +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#7 +module Solargraph::LanguageServer::CompletionItemKinds; end + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#14 +Solargraph::LanguageServer::CompletionItemKinds::CLASS = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#23 +Solargraph::LanguageServer::CompletionItemKinds::COLOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#28 +Solargraph::LanguageServer::CompletionItemKinds::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#11 +Solargraph::LanguageServer::CompletionItemKinds::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#20 +Solargraph::LanguageServer::CompletionItemKinds::ENUM = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#27 +Solargraph::LanguageServer::CompletionItemKinds::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#30 +Solargraph::LanguageServer::CompletionItemKinds::EVENT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#12 +Solargraph::LanguageServer::CompletionItemKinds::FIELD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#24 +Solargraph::LanguageServer::CompletionItemKinds::FILE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#26 +Solargraph::LanguageServer::CompletionItemKinds::FOLDER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#10 +Solargraph::LanguageServer::CompletionItemKinds::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#15 +Solargraph::LanguageServer::CompletionItemKinds::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#21 +Solargraph::LanguageServer::CompletionItemKinds::KEYWORD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#9 +Solargraph::LanguageServer::CompletionItemKinds::METHOD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#16 +Solargraph::LanguageServer::CompletionItemKinds::MODULE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#31 +Solargraph::LanguageServer::CompletionItemKinds::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#17 +Solargraph::LanguageServer::CompletionItemKinds::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#25 +Solargraph::LanguageServer::CompletionItemKinds::REFERENCE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#22 +Solargraph::LanguageServer::CompletionItemKinds::SNIPPET = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#29 +Solargraph::LanguageServer::CompletionItemKinds::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#8 +Solargraph::LanguageServer::CompletionItemKinds::TEXT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#32 +Solargraph::LanguageServer::CompletionItemKinds::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#18 +Solargraph::LanguageServer::CompletionItemKinds::UNIT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#19 +Solargraph::LanguageServer::CompletionItemKinds::VALUE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/completion_item_kinds.rb#13 +Solargraph::LanguageServer::CompletionItemKinds::VARIABLE = T.let(T.unsafe(nil), Integer) + +# The ErrorCode constants for the language server protocol. +# +# source://solargraph//lib/solargraph/language_server/error_codes.rb#7 +module Solargraph::LanguageServer::ErrorCodes; end + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#12 +Solargraph::LanguageServer::ErrorCodes::INTERNAL_ERROR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#11 +Solargraph::LanguageServer::ErrorCodes::INVALID_PARAMS = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#9 +Solargraph::LanguageServer::ErrorCodes::INVALID_REQUEST = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#10 +Solargraph::LanguageServer::ErrorCodes::METHOD_NOT_FOUND = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#8 +Solargraph::LanguageServer::ErrorCodes::PARSE_ERROR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#17 +Solargraph::LanguageServer::ErrorCodes::REQUEST_CANCELLED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#14 +Solargraph::LanguageServer::ErrorCodes::SERVER_ERROR_END = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#13 +Solargraph::LanguageServer::ErrorCodes::SERVER_ERROR_START = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#15 +Solargraph::LanguageServer::ErrorCodes::SERVER_NOT_INITIALIZED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/error_codes.rb#16 +Solargraph::LanguageServer::ErrorCodes::UNKNOWN_ERROR_CODE = T.let(T.unsafe(nil), Integer) + +# The language server protocol's data provider. Hosts are responsible for +# querying the library and processing messages. They also provide thread +# safety for multi-threaded transports. +# +# source://solargraph//lib/solargraph/language_server/host.rb#14 +class Solargraph::LanguageServer::Host + include ::Solargraph::LanguageServer::UriHelpers + include ::Solargraph::Logging + include ::Solargraph::LanguageServer::Host::Dispatch + include ::Observable + + # @return [Host] a new instance of Host + # + # source://solargraph//lib/solargraph/language_server/host.rb#28 + def initialize; end + + # Flag a method as available for dynamic registration. + # + # @param method [String] The method name, e.g., 'textDocument/completion' + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#427 + def allow_registration(method); end + + # True if the specified LSP method can be dynamically registered. + # + # @param method [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#435 + def can_register?(method); end + + # Cancel the method with the specified ID. + # + # @param id [Integer] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#71 + def cancel(id); end + + # True if the host received a request to cancel the method with the + # specified ID. + # + # @param id [Integer] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#80 + def cancel?(id); end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#647 + def catalog; end + + # Update a document from the parameters of a textDocument/didChange + # method. + # + # @param params [Hash] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#250 + def change(params); end + + # Delete the specified ID from the list of cancelled IDs if it exists. + # + # @param id [Integer] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#90 + def clear(id); end + + # source://solargraph//lib/solargraph/language_server/host.rb#652 + def client_capabilities; end + + # Sets the attribute client_capabilities + # + # @param value the value to set the attribute client_capabilities to. + # + # source://solargraph//lib/solargraph/language_server/host.rb#26 + def client_capabilities=(_arg0); end + + # Close the file specified by the URI. + # + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#197 + def close(uri); end + + # @param uri [String] + # @param line [Integer] + # @param column [Integer] + # @return [Solargraph::SourceMap::Completion] + # + # source://solargraph//lib/solargraph/language_server/host.rb#513 + def completions_at(uri, line, column); end + + # Update the configuration options with the provided hash. + # + # @param update [Hash] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#56 + def configure(update); end + + # Respond to a notification that a file was created in the workspace. + # The libraries will determine whether the file should be merged; see + # Solargraph::Library#create_from_disk. + # + # @param uri [String] The file uri. + # @return [Boolean] True if a library accepted the file. + # + # source://solargraph//lib/solargraph/language_server/host.rb#139 + def create(uri); end + + # @return [Hash{String => Object}] + # + # source://solargraph//lib/solargraph/language_server/host.rb#623 + def default_configuration; end + + # @param uri [String] + # @param line [Integer] + # @param column [Integer] + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#527 + def definitions_at(uri, line, column); end + + # Delete the specified file from the library. + # + # @param uri [String] The file uri. + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#153 + def delete(uri); end + + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#205 + def diagnose(uri); end + + # @param query [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#570 + def document(query); end + + # @param uri [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#578 + def document_symbols(uri); end + + # Clear the message buffer and return the most recent data. + # + # @return [String] The most recent data or an empty string. + # + # source://solargraph//lib/solargraph/language_server/host.rb#269 + def flush; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#335 + def folders; end + + # @param uri [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#642 + def folding_ranges(uri); end + + # source://solargraph//lib/solargraph/language_server/host.rb#504 + def formatter_config(uri); end + + # @return [Bool] if has pending completion request + # + # source://solargraph//lib/solargraph/language_server/host.rb#519 + def has_pending_completions?; end + + # Locate multiple pins that match a completion item. The first match is + # based on the corresponding location in a library source if available. + # Subsequent matches are based on path. + # + # @param params [Hash] A hash representation of a completion item + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#473 + def locate_pins(params); end + + # Open the specified file in the library. + # + # @param uri [String] The file uri. + # @param text [String] The contents of the file. + # @param version [Integer] A version number. + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#170 + def open(uri, text, version); end + + # True if the specified file is currently open in the library. + # + # @param uri [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#189 + def open?(uri); end + + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#180 + def open_from_disk(uri); end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/host.rb#63 + def options; end + + # Get a list of IDs for server requests that are waiting for responses + # from the client. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#618 + def pending_requests; end + + # Prepare a library for the specified directory. + # + # @param directory [String] + # @param name [String, nil] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#283 + def prepare(directory, name = T.unsafe(nil)); end + + # Prepare multiple folders. + # + # @param array [Array String}>] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#306 + def prepare_folders(array); end + + # Called by adapter, to handle the request + # + # @param request [Hash] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#97 + def process(request); end + + # @param query [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#554 + def query_symbols(query); end + + # Queue a message to be sent to the client. + # + # @param message [String] The message to send. + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#260 + def queue(message); end + + # @param uri [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/host.rb#498 + def read_text(uri); end + + # Start processing a request from the client. After the message is + # processed, caller is responsible for sending the response. + # + # @param request [Hash] The contents of the message. + # @return [Solargraph::LanguageServer::Message::Base] The message handler. + # + # source://solargraph//lib/solargraph/language_server/host.rb#106 + def receive(request); end + + # @param uri [String] + # @param line [Integer] + # @param column [Integer] + # @param strip [Boolean] Strip special characters from variable names + # @param only [Boolean] If true, search current file only + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#547 + def references_from(uri, line, column, strip: T.unsafe(nil), only: T.unsafe(nil)); end + + # Register the methods as capabilities with the client. + # This method will avoid duplicating registrations and ignore methods + # that were not flagged for dynamic registration by the client. + # + # @param methods [Array] The methods to register + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#390 + def register_capabilities(methods); end + + # True if the specified method has been registered. + # + # @param method [String] The method name, e.g., 'textDocument/completion' + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#443 + def registered?(method); end + + # Remove a directory. + # + # @param directory [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#317 + def remove(directory); end + + # @param array [Array] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#328 + def remove_folders(array); end + + # @param query [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#562 + def search(query); end + + # Send a notification to the client. + # + # @param method [String] The message method + # @param params [Hash] The method parameters + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#344 + def send_notification(method, params); end + + # Send a request to the client and execute the provided block to process + # the response. If an ID is not provided, the host will use an auto- + # incrementing integer. + # + # @param method [String] The message method + # @param params [Hash] The method parameters + # @param block [Proc] The block that processes the response + # @return [void] + # @yieldparam The [Hash] result sent by the client + # + # source://solargraph//lib/solargraph/language_server/host.rb#366 + def send_request(method, params, &block); end + + # Send a notification to the client. + # + # @param text [String] + # @param type [Integer] A MessageType constant + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#591 + def show_message(text, type = T.unsafe(nil)); end + + # Send a notification with optional responses. + # + # @param text [String] + # @param type [Integer] A MessageType constant + # @param actions [Array] Response options for the client + # @param block The block that processes the response + # @return [void] + # @yieldparam The [String] action received from the client + # + # source://solargraph//lib/solargraph/language_server/host.rb#606 + def show_message_request(text, type, actions, &block); end + + # @param uri [String] + # @param line [Integer] + # @param column [Integer] + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host.rb#536 + def signatures_at(uri, line, column); end + + # Start asynchronous process handling. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#43 + def start; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#452 + def stop; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#463 + def stopped?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#447 + def synchronizing?; end + + # Unregister the methods with the client. + # This method will avoid duplicating unregistrations and ignore methods + # that were not flagged for dynamic registration by the client. + # + # @param methods [Array] The methods to unregister + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#410 + def unregister_capabilities(methods); end + + private + + # @param library [Library] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host.rb#805 + def async_library_map(library); end + + # @return [Cataloger] + # + # source://solargraph//lib/solargraph/language_server/host.rb#669 + def cataloger; end + + # @param uri [String] + # @param change [Hash] + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/host.rb#712 + def check_diff(uri, change); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#799 + def client_supports_progress?; end + + # @return [Diagnoser] + # + # source://solargraph//lib/solargraph/language_server/host.rb#664 + def diagnoser; end + + # source://solargraph//lib/solargraph/language_server/host.rb#821 + def do_async_library_map(library, uuid = T.unsafe(nil)); end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/host.rb#740 + def dynamic_capability_options; end + + # @param params [Hash] + # @return [Source::Updater] + # + # source://solargraph//lib/solargraph/language_server/host.rb#690 + def generate_updater(params); end + + # @return [MessageWorker] + # + # source://solargraph//lib/solargraph/language_server/host.rb#659 + def message_worker; end + + # @param path [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/host.rb#683 + def normalize_separators(path); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host.rb#795 + def prepare_rename?; end + + # A hash of client requests by ID. The host uses this to keep track of + # pending responses. + # + # @return [Hash{Integer => Hash}] + # + # source://solargraph//lib/solargraph/language_server/host.rb#677 + def requests; end +end + +# An asynchronous library cataloging handler. +# +# source://solargraph//lib/solargraph/language_server/host/cataloger.rb#8 +class Solargraph::LanguageServer::Host::Cataloger + # @return [Cataloger] a new instance of Cataloger + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#9 + def initialize(host); end + + # Start the catalog thread. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#31 + def start; end + + # Stop the catalog thread. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#17 + def stop; end + + # True if the cataloger is stopped. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#24 + def stopped?; end + + # Perform cataloging. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#45 + def tick; end + + private + + # @return [Host] + # + # source://solargraph//lib/solargraph/language_server/host/cataloger.rb#52 + def host; end +end + +# An asynchronous diagnosis reporter. +# +# source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#8 +class Solargraph::LanguageServer::Host::Diagnoser + # @param host [Host] + # @return [Diagnoser] a new instance of Diagnoser + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#10 + def initialize(host); end + + # Schedule a file to be diagnosed. + # + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#21 + def schedule(uri); end + + # Start the diagnosis thread. + # + # @return [self] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#42 + def start; end + + # Stop the diagnosis thread. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#28 + def stop; end + + # True is the diagnoser is stopped. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#35 + def stopped?; end + + # Perform diagnoses. + # + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#57 + def tick; end + + private + + # @return [Host] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#79 + def host; end + + # @return [Mutex] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#82 + def mutex; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host/diagnoser.rb#85 + def queue; end +end + +# Methods for associating sources with libraries via URIs. +# +# source://solargraph//lib/solargraph/language_server/host/dispatch.rb#8 +module Solargraph::LanguageServer::Host::Dispatch + # Find an explicit library match for the given URI. An explicit match + # means the libary's workspace includes the file. + # + # If a matching library is found, the source corresponding to the URI + # gets attached to it. + # + # @param uri [String] + # @raise [FileNotFoundError] if the source could not be attached. + # @return [Library, nil] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#59 + def explicit_library_for(uri); end + + # @return [Library] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#105 + def generic_library; end + + # Get a generic library for the given URI and attach the corresponding + # source. + # + # @param uri [String] + # @raise [FileNotFoundError] if the source could not be attached. + # @return [Library] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#99 + def generic_library_for(uri); end + + # Find an implicit library match for the given URI. An implicit match + # means the file is located inside the library's workspace directory, + # regardless of whether the workspace is configured to include it. + # + # If a matching library is found, the source corresponding to the URI + # gets attached to it. + # + # @param uri [String] + # @raise [FileNotFoundError] if the source could not be attached. + # @return [Library, nil] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#81 + def implicit_library_for(uri); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#19 + def libraries; end + + # Find the best libary match for the given URI. + # + # @param uri [String] + # @return [Library] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#40 + def library_for(uri); end + + # @return [Sources] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#10 + def sources; end + + # The Sources observer callback that merges a source into the host's + # libraries when it gets updated. + # + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/dispatch.rb#28 + def update_libraries(uri); end +end + +# A serial worker Thread to handle message. +# +# this make check pending message possible, and maybe cancelled to speedup process +# +# source://solargraph//lib/solargraph/language_server/host/message_worker.rb#9 +class Solargraph::LanguageServer::Host::MessageWorker + # @param host [Host] + # @return [MessageWorker] a new instance of MessageWorker + # + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#11 + def initialize(host); end + + # pending handle messages + # + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#19 + def messages; end + + # @param message [Hash] The message should be handle. will pass back to Host#receive + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#33 + def queue(message); end + + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#40 + def start; end + + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#27 + def stop; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#23 + def stopped?; end + + # source://solargraph//lib/solargraph/language_server/host/message_worker.rb#48 + def tick; end +end + +# A Host class for managing sources. +# +# source://solargraph//lib/solargraph/language_server/host/sources.rb#10 +class Solargraph::LanguageServer::Host::Sources + include ::Observable + include ::Solargraph::LanguageServer::UriHelpers + + # @return [Sources] a new instance of Sources + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#14 + def initialize; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#47 + def add_uri(uri); end + + # @param uri [String] + # @param updater [Source::Updater] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#97 + def async_update(uri, updater); end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#133 + def clear; end + + # Close the source with the given URI. + # + # @param uri [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#121 + def close(uri); end + + # Find the source with the given URI. + # + # @param uri [String] + # @raise [FileNotFoundError] if the URI does not match an open source. + # @return [Source] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#113 + def find(uri); end + + # True if a source with given URI is currently open. + # + # @param uri [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#128 + def include?(uri); end + + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#53 + def next_uri; end + + # Open a source. + # + # @param uri [String] + # @param text [String] + # @param version [Integer] + # @return [Source] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#69 + def open(uri, text, version); end + + # source://solargraph//lib/solargraph/language_server/host/sources.rb#75 + def open_from_disk(uri); end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#25 + def start; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#59 + def stop; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#20 + def stopped?; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#34 + def tick; end + + # Update an existing source. + # + # @param uri [String] + # @param updater [Source::Updater] + # @raise [FileNotFoundError] if the URI does not match an open source. + # @return [Source] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#87 + def update(uri, updater); end + + private + + # @return [Mutex] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#145 + def mutex; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#140 + def open_source_hash; end + + # An array of source URIs that are waiting to finish synchronizing. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/language_server/host/sources.rb#150 + def queue; end +end + +# The Message namespace contains classes that implement language server +# protocol methods. +# +# source://solargraph//lib/solargraph/language_server/message.rb#10 +module Solargraph::LanguageServer::Message + class << self + # Register a method name and message for handling by the language + # server. + # + # @example + # Message.register 'initialize', Solargraph::Message::Initialize + # @param path [String] The method name + # @param message_class [Class] The message class + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message.rb#34 + def register(path, message_class); end + + # @param path [String] + # @return [Class] + # + # source://solargraph//lib/solargraph/language_server/message.rb#40 + def select(path); end + + private + + # @return [Hash{String => Class}] + # + # source://solargraph//lib/solargraph/language_server/message.rb#53 + def method_map; end + end +end + +# source://solargraph//lib/solargraph/language_server/message/base.rb#6 +class Solargraph::LanguageServer::Message::Base + # @param host [Solargraph::LanguageServer::Host] + # @param request [Hash] + # @return [Base] a new instance of Base + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#30 + def initialize(host, request); end + + # @return [Hash, nil] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#26 + def error; end + + # @return [Solargraph::LanguageServer::Host] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#8 + def host; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#11 + def id; end + + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#17 + def method; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#20 + def params; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#40 + def post_initialize; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#43 + def process; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#14 + def request; end + + # @return [Hash, Array, nil] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#23 + def result; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#62 + def send_response; end + + # @param code [Integer] See Solargraph::LanguageServer::ErrorCodes + # @param message [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#54 + def set_error(code, message); end + + # @param data [Hash, Array, nil] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/base.rb#47 + def set_result(data); end +end + +# source://solargraph//lib/solargraph/language_server/message/cancel_request.rb#6 +class Solargraph::LanguageServer::Message::CancelRequest < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/cancel_request.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/completion_item.rb#6 +module Solargraph::LanguageServer::Message::CompletionItem; end + +# completionItem/resolve message handler +# +# source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#9 +class Solargraph::LanguageServer::Message::CompletionItem::Resolve < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#10 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#41 + def join_docs(pins); end + + # @param text [String] + # @return [Hash{Symbol => String}] + # + # source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#33 + def markup_content(text); end + + # @param pins [Array] + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/message/completion_item/resolve.rb#19 + def merge(pins); end +end + +# source://solargraph//lib/solargraph/language_server/message/exit_notification.rb#6 +class Solargraph::LanguageServer::Message::ExitNotification < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/exit_notification.rb#7 + def process; end +end + +# Messages in the Extended module are custom to the Solargraph +# implementation of the language server. In the protocol, the method +# names should start with "$/" so clients that don't recognize them can +# ignore them, as per the LSP specification. +# +# source://solargraph//lib/solargraph/language_server/message/extended.rb#11 +module Solargraph::LanguageServer::Message::Extended; end + +# Check if a more recent version of the Solargraph gem is available. +# Notify the client when an update exists. If the `verbose` parameter +# is true, notify the client when the gem is up to date. +# +# source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#13 +class Solargraph::LanguageServer::Message::Extended::CheckGemVersion < ::Solargraph::LanguageServer::Message::Base + # @return [CheckGemVersion] a new instance of CheckGemVersion + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#24 + def initialize(host, request, current: T.unsafe(nil), available: T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#30 + def process; end + + private + + # @return [Gem::Version] + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#69 + def available; end + + # @return [Gem::Version] + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#66 + def current; end + + # @return [String, nil] + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#95 + def error; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#90 + def fetched?; end + + class << self + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#14 + def fetcher; end + + # source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#18 + def fetcher=(obj); end + end +end + +# source://solargraph//lib/solargraph/language_server/message/extended/check_gem_version.rb#22 +Solargraph::LanguageServer::Message::Extended::CheckGemVersion::GEM_ZERO = T.let(T.unsafe(nil), Gem::Version) + +# source://solargraph//lib/solargraph/language_server/message/extended/document.rb#7 +class Solargraph::LanguageServer::Message::Extended::Document < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/document.rb#8 + def process; end +end + +# Update YARD documentation for installed gems. If the `rebuild` +# parameter is true, rebuild existing yardocs. +# +# source://solargraph//lib/solargraph/language_server/message/extended/document_gems.rb#12 +class Solargraph::LanguageServer::Message::Extended::DocumentGems < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/document_gems.rb#13 + def process; end +end + +# Update core Ruby documentation. +# +# source://solargraph//lib/solargraph/language_server/message/extended/download_core.rb#11 +class Solargraph::LanguageServer::Message::Extended::DownloadCore < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/download_core.rb#12 + def process; end +end + +# Update YARD documentation for installed gems. If the `rebuild` +# parameter is true, rebuild existing yardocs. +# +# source://solargraph//lib/solargraph/language_server/message/extended/environment.rb#10 +class Solargraph::LanguageServer::Message::Extended::Environment < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/environment.rb#11 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/extended/search.rb#7 +class Solargraph::LanguageServer::Message::Extended::Search < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/extended/search.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/initialize.rb#6 +class Solargraph::LanguageServer::Message::Initialize < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#7 + def process; end + + private + + # @param section [String] + # @param capability [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#151 + def dynamic_registration_for?(section, capability); end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#64 + def static_code_action; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#54 + def static_completion; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#115 + def static_definitions; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#95 + def static_document_formatting; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#102 + def static_document_symbols; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#135 + def static_folding_range; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#142 + def static_highlights; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#88 + def static_hover; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#79 + def static_on_type_formatting; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#128 + def static_references; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#122 + def static_rename; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#71 + def static_signature_help; end + + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#109 + def static_workspace_symbols; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/language_server/message/initialize.rb#47 + def support_workspace_folders?; end +end + +# source://solargraph//lib/solargraph/language_server/message/initialized.rb#6 +class Solargraph::LanguageServer::Message::Initialized < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/initialized.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/method_not_found.rb#6 +class Solargraph::LanguageServer::Message::MethodNotFound < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/method_not_found.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/method_not_implemented.rb#6 +class Solargraph::LanguageServer::Message::MethodNotImplemented < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/method_not_implemented.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/shutdown.rb#6 +class Solargraph::LanguageServer::Message::Shutdown < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/shutdown.rb#7 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document.rb#6 +module Solargraph::LanguageServer::Message::TextDocument; end + +# source://solargraph//lib/solargraph/language_server/message/text_document/base.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::Base < ::Solargraph::LanguageServer::Message::Base + include ::Solargraph::LanguageServer::UriHelpers + + # Returns the value of attribute filename. + # + # source://solargraph//lib/solargraph/language_server/message/text_document/base.rb#10 + def filename; end + + # source://solargraph//lib/solargraph/language_server/message/text_document/base.rb#12 + def post_initialize; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/completion.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::Completion < ::Solargraph::LanguageServer::Message::TextDocument::Base + # @param incomplete [Boolean] + # @return [Hash] + # + # source://solargraph//lib/solargraph/language_server/message/text_document/completion.rb#49 + def empty_result(incomplete = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/completion.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/definition.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::Definition < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/definition.rb#5 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/text_document/definition.rb#13 + def code_location; end + + # source://solargraph//lib/solargraph/language_server/message/text_document/definition.rb#24 + def require_location; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/did_change.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::DidChange < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/did_change.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/did_close.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::DidClose < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/did_close.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/did_open.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::DidOpen < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/did_open.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/did_save.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::DidSave < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/did_save.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/document_highlight.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::DocumentHighlight < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/document_highlight.rb#5 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/document_symbol.rb#3 +class Solargraph::LanguageServer::Message::TextDocument::DocumentSymbol < ::Solargraph::LanguageServer::Message::Base + include ::Solargraph::LanguageServer::UriHelpers + + # source://solargraph//lib/solargraph/language_server/message/text_document/document_symbol.rb#6 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/folding_range.rb#9 +class Solargraph::LanguageServer::Message::TextDocument::FoldingRange < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/folding_range.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#10 +class Solargraph::LanguageServer::Message::TextDocument::Formatting < ::Solargraph::LanguageServer::Message::TextDocument::Base + include ::Solargraph::Diagnostics::RubocopHelpers + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#13 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#54 + def cli_args(file_uri, config); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#47 + def config_for(file_uri); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#81 + def cop_list(value); end + + # @param original [String] + # @param result [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#90 + def format(original, result); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#71 + def formatter_class(config); end + + # source://solargraph//lib/solargraph/language_server/message/text_document/formatting.rb#36 + def log_corrections(corrections); end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/hover.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::Hover < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/hover.rb#8 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/text_document/hover.rb#40 + def contents_or_nil(contents); end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/on_type_formatting.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::OnTypeFormatting < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/on_type_formatting.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/prepare_rename.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::PrepareRename < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/prepare_rename.rb#5 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/references.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::References < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/references.rb#5 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/rename.rb#4 +class Solargraph::LanguageServer::Message::TextDocument::Rename < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/rename.rb#5 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/text_document/signature_help.rb#7 +class Solargraph::LanguageServer::Message::TextDocument::SignatureHelp < ::Solargraph::LanguageServer::Message::TextDocument::Base + # source://solargraph//lib/solargraph/language_server/message/text_document/signature_help.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/workspace.rb#6 +module Solargraph::LanguageServer::Message::Workspace; end + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_configuration.rb#4 +class Solargraph::LanguageServer::Message::Workspace::DidChangeConfiguration < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_configuration.rb#5 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_configuration.rb#14 + def register_from_options; end +end + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#4 +class Solargraph::LanguageServer::Message::Workspace::DidChangeWatchedFiles < ::Solargraph::LanguageServer::Message::Base + include ::Solargraph::LanguageServer::UriHelpers + + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#11 + def process; end +end + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#6 +Solargraph::LanguageServer::Message::Workspace::DidChangeWatchedFiles::CHANGED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#5 +Solargraph::LanguageServer::Message::Workspace::DidChangeWatchedFiles::CREATED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_watched_files.rb#7 +Solargraph::LanguageServer::Message::Workspace::DidChangeWatchedFiles::DELETED = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb#4 +class Solargraph::LanguageServer::Message::Workspace::DidChangeWorkspaceFolders < ::Solargraph::LanguageServer::Message::Base + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb#5 + def process; end + + private + + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb#12 + def add_folders; end + + # source://solargraph//lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb#17 + def remove_folders; end +end + +# source://solargraph//lib/solargraph/language_server/message/workspace/workspace_symbol.rb#3 +class Solargraph::LanguageServer::Message::Workspace::WorkspaceSymbol < ::Solargraph::LanguageServer::Message::Base + include ::Solargraph::LanguageServer::UriHelpers + + # source://solargraph//lib/solargraph/language_server/message/workspace/workspace_symbol.rb#6 + def process; end +end + +# The MessageType constants from the language server specification. +# +# source://solargraph//lib/solargraph/language_server/message_types.rb#7 +module Solargraph::LanguageServer::MessageTypes; end + +# source://solargraph//lib/solargraph/language_server/message_types.rb#8 +Solargraph::LanguageServer::MessageTypes::ERROR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message_types.rb#10 +Solargraph::LanguageServer::MessageTypes::INFO = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message_types.rb#11 +Solargraph::LanguageServer::MessageTypes::LOG = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/message_types.rb#9 +Solargraph::LanguageServer::MessageTypes::WARNING = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/request.rb#5 +class Solargraph::LanguageServer::Request + # @param id [Integer] + # @param &block The block that processes the client's response + # @return [Request] a new instance of Request + # + # source://solargraph//lib/solargraph/language_server/request.rb#8 + def initialize(id, &block); end + + # @param result [Object] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/request.rb#15 + def process(result); end + + # source://solargraph//lib/solargraph/language_server/request.rb#19 + def send_response; end +end + +# The SymbolKind constants for the language server protocol. +# +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#7 +module Solargraph::LanguageServer::SymbolKinds; end + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#25 +Solargraph::LanguageServer::SymbolKinds::ARRAY = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#24 +Solargraph::LanguageServer::SymbolKinds::BOOLEAN = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#12 +Solargraph::LanguageServer::SymbolKinds::CLASS = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#21 +Solargraph::LanguageServer::SymbolKinds::CONSTANT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#16 +Solargraph::LanguageServer::SymbolKinds::CONSTRUCTOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#17 +Solargraph::LanguageServer::SymbolKinds::ENUM = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#29 +Solargraph::LanguageServer::SymbolKinds::ENUM_MEMBER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#31 +Solargraph::LanguageServer::SymbolKinds::EVENT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#15 +Solargraph::LanguageServer::SymbolKinds::FIELD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#8 +Solargraph::LanguageServer::SymbolKinds::FILE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#19 +Solargraph::LanguageServer::SymbolKinds::FUNCTION = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#18 +Solargraph::LanguageServer::SymbolKinds::INTERFACE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#27 +Solargraph::LanguageServer::SymbolKinds::KEY = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#13 +Solargraph::LanguageServer::SymbolKinds::METHOD = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#9 +Solargraph::LanguageServer::SymbolKinds::MODULE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#10 +Solargraph::LanguageServer::SymbolKinds::NAMESPACE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#28 +Solargraph::LanguageServer::SymbolKinds::NULL = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#23 +Solargraph::LanguageServer::SymbolKinds::NUMBER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#26 +Solargraph::LanguageServer::SymbolKinds::OBJECT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#32 +Solargraph::LanguageServer::SymbolKinds::OPERATOR = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#11 +Solargraph::LanguageServer::SymbolKinds::PACKAGE = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#14 +Solargraph::LanguageServer::SymbolKinds::PROPERTY = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#22 +Solargraph::LanguageServer::SymbolKinds::STRING = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#30 +Solargraph::LanguageServer::SymbolKinds::STRUCT = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#33 +Solargraph::LanguageServer::SymbolKinds::TYPE_PARAMETER = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/language_server/symbol_kinds.rb#20 +Solargraph::LanguageServer::SymbolKinds::VARIABLE = T.let(T.unsafe(nil), Integer) + +# The Transport namespace contains concrete implementations of +# communication protocols for language servers. +# +# source://solargraph//lib/solargraph/language_server/transport.rb#8 +module Solargraph::LanguageServer::Transport; end + +# A common module for running language servers in Backport. +# +# source://solargraph//lib/solargraph/language_server/transport/adapter.rb#10 +module Solargraph::LanguageServer::Transport::Adapter + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#21 + def closing; end + + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#11 + def opening; end + + # @param data [String] + # + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#26 + def receiving(data); end + + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#30 + def update; end + + private + + # @param request [String] + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#43 + def process(request); end + + # source://solargraph//lib/solargraph/language_server/transport/adapter.rb#47 + def shutdown; end +end + +# source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#8 +class Solargraph::LanguageServer::Transport::DataReader + # @return [DataReader] a new instance of DataReader + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#9 + def initialize; end + + # Process raw data received from the client. The data will be parsed + # into messages based on the JSON-RPC protocol. Each message will be + # passed to the block declared via set_message_handler. Incomplete data + # will be buffered and subsequent data will be appended to the buffer. + # + # @param data [String] + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#29 + def receive(data); end + + # Declare a block to be executed for each message received from the + # client. + # + # @yieldparam The [Hash] message received from the client + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#19 + def set_message_handler(&block); end + + private + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#56 + def parse_message_from_buffer; end + + # @return [void] + # + # source://solargraph//lib/solargraph/language_server/transport/data_reader.rb#43 + def prepare_to_parse_message; end +end + +# Methods to handle conversions between file URIs and paths. +# +# source://solargraph//lib/solargraph/language_server/uri_helpers.rb#9 +module Solargraph::LanguageServer::UriHelpers + private + + # Decode text from a URI path component in LSP. + # + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#44 + def decode(text); end + + # Encode text to be used as a URI path component in LSP. + # + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#32 + def encode(text); end + + # Convert a file path to a URI. + # + # @param file [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#24 + def file_to_uri(file); end + + # Convert a file URI to a path. + # + # @param uri [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#16 + def uri_to_file(uri); end + + class << self + # Decode text from a URI path component in LSP. + # + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#44 + def decode(text); end + + # Encode text to be used as a URI path component in LSP. + # + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#32 + def encode(text); end + + # Convert a file path to a URI. + # + # @param file [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#24 + def file_to_uri(file); end + + # Convert a file URI to a path. + # + # @param uri [String] + # @return [String] + # + # source://solargraph//lib/solargraph/language_server/uri_helpers.rb#16 + def uri_to_file(uri); end + end +end + +# A Library handles coordination between a Workspace and an ApiMap. +# +# source://solargraph//lib/solargraph/library.rb#8 +class Solargraph::Library + include ::Solargraph::Logging + + # @param workspace [Solargraph::Workspace] + # @param name [String, nil] + # @return [Library] a new instance of Library + # + # source://solargraph//lib/solargraph/library.rb#22 + def initialize(workspace = T.unsafe(nil), name = T.unsafe(nil)); end + + # Attach a source to the library. + # + # The attached source does not need to be a part of the workspace. The + # library will include it in the ApiMap while it's attached. Only one + # source can be attached to the library at a time. + # + # @param source [Source, nil] + # @return [void] + # + # source://solargraph//lib/solargraph/library.rb#49 + def attach(source); end + + # True if the specified file is currently attached. + # + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#67 + def attached?(filename); end + + # source://solargraph//lib/solargraph/library.rb#385 + def bench; end + + # Update the ApiMap from the library's workspace and open files. + # + # @return [void] + # + # source://solargraph//lib/solargraph/library.rb#371 + def catalog; end + + # Close a file in the library. Closing a file will make it unavailable for + # checkout although it may still exist in the workspace. + # + # @param filename [String] + # @return [void] + # + # source://solargraph//lib/solargraph/library.rb#148 + def close(filename); end + + # Get completion suggestions at the specified file and location. + # + # @param filename [String] The file to analyze + # @param line [Integer] The zero-based line number + # @param column [Integer] The zero-based column number + # @return [SourceMap::Completion] + # @todo Take a Location instead of filename/line/column + # + # source://solargraph//lib/solargraph/library.rb#163 + def completions_at(filename, line, column); end + + # True if the specified file is included in the workspace (but not + # necessarily open). + # + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#87 + def contain?(filename); end + + # Create a source to be added to the workspace. The file is ignored if it is + # neither open in the library nor included in the workspace. + # + # @param filename [String] + # @param text [String] The contents of the file + # @return [Boolean] True if the file was added to the workspace. + # + # source://solargraph//lib/solargraph/library.rb#97 + def create(filename, text); end + + # Create a file source from a file on disk. The file is ignored if it is + # neither open in the library nor included in the workspace. + # + # @param filename [String] + # @return [Boolean] True if the file was added to the workspace. + # + # source://solargraph//lib/solargraph/library.rb#114 + def create_from_disk(filename); end + + # @return [Source, nil] + # + # source://solargraph//lib/solargraph/library.rb#18 + def current; end + + # Get definition suggestions for the expression at the specified file and + # location. + # + # @param filename [String] The file to analyze + # @param line [Integer] The zero-based line number + # @param column [Integer] The zero-based column number + # @return [Array] + # @todo Take filename/position instead of filename/line/column + # + # source://solargraph//lib/solargraph/library.rb#179 + def definitions_at(filename, line, column); end + + # Delete a file from the library. Deleting a file will make it unavailable + # for checkout and optionally remove it from the workspace unless the + # workspace configuration determines that it should still exist. + # + # @param filename [String] + # @return [Boolean] True if the file was deleted + # + # source://solargraph//lib/solargraph/library.rb#133 + def delete(filename); end + + # Detach the specified file if it is currently attached to the library. + # + # @param filename [String] + # @return [Boolean] True if the specified file was detached + # + # source://solargraph//lib/solargraph/library.rb#76 + def detach(filename); end + + # Get diagnostics about a file. + # + # @param filename [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/library.rb#338 + def diagnose(filename); end + + # @param query [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/library.rb#285 + def document(query); end + + # Get an array of document symbols. + # + # Document symbols are composed of namespace, method, and constant pins. + # The results of this query are appropriate for building the response to a + # textDocument/documentSymbol message in the language server protocol. + # + # @param filename [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/library.rb#311 + def document_symbols(filename); end + + # source://solargraph//lib/solargraph/library.rb#465 + def external_requires; end + + # Get an array of foldable ranges for the specified file. + # + # @deprecated The library should not need to handle folding ranges. The + # source itself has all the information it needs. + # @param filename [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/library.rb#400 + def folding_ranges(filename); end + + # Get an array of pins that match a path. + # + # @param path [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/library.rb#279 + def get_path_pins(path); end + + # source://solargraph//lib/solargraph/library.rb#28 + def inspect; end + + # Get the pins at the specified location or nil if the pin does not exist. + # + # @param location [Location] + # @return [Array] + # + # source://solargraph//lib/solargraph/library.rb#256 + def locate_pins(location); end + + # source://solargraph//lib/solargraph/library.rb#260 + def locate_ref(location); end + + # source://solargraph//lib/solargraph/library.rb#453 + def map!; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#433 + def mapped?; end + + # Try to merge a source into the library's workspace. If the workspace is + # not configured to include the source, it gets ignored. + # + # @param source [Source] + # @return [Boolean] True if the source was merged into the workspace. + # + # source://solargraph//lib/solargraph/library.rb#418 + def merge(source); end + + # @return [String, nil] + # + # source://solargraph//lib/solargraph/library.rb#15 + def name; end + + # source://solargraph//lib/solargraph/library.rb#437 + def next_map; end + + # True if the specified file is currently attached. + # + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#67 + def open?(filename); end + + # @param path [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/library.rb#317 + def path_pins(path); end + + # source://solargraph//lib/solargraph/library.rb#461 + def pins; end + + # Get an array of all symbols in the workspace that match the query. + # + # @param query [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/library.rb#299 + def query_symbols(query); end + + # Get the current text of a file in the library. + # + # @param filename [String] + # @return [String] + # + # source://solargraph//lib/solargraph/library.rb#329 + def read_text(filename); end + + # @param filename [String] + # @param line [Integer] + # @param column [Integer] + # @param strip [Boolean] Strip special characters from variable names + # @param only [Boolean] Search for references in the current file only + # @return [Array] + # @todo Take a Location instead of filename/line/column + # + # source://solargraph//lib/solargraph/library.rb#222 + def references_from(filename, line, column, strip: T.unsafe(nil), only: T.unsafe(nil)); end + + # @param query [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/library.rb#291 + def search(query); end + + # Get signature suggestions for the method at the specified file and + # location. + # + # @param filename [String] The file to analyze + # @param line [Integer] The zero-based line number + # @param column [Integer] The zero-based column number + # @return [Array] + # @todo Take filename/position instead of filename/line/column + # + # source://solargraph//lib/solargraph/library.rb#209 + def signatures_at(filename, line, column); end + + # source://solargraph//lib/solargraph/library.rb#429 + def source_map_hash; end + + # source://solargraph//lib/solargraph/library.rb#321 + def source_maps; end + + # True if the ApiMap is up to date with the library's workspace and open + # files. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/library.rb#37 + def synchronized?; end + + # @return [Solargraph::Workspace] + # + # source://solargraph//lib/solargraph/library.rb#12 + def workspace; end + + private + + # @return [ApiMap] + # + # source://solargraph//lib/solargraph/library.rb#494 + def api_map; end + + # source://solargraph//lib/solargraph/library.rb#377 + def catalog_inlock; end + + # @param source_map [SourceMap] + # + # source://solargraph//lib/solargraph/library.rb#476 + def find_external_requires(source_map); end + + # source://solargraph//lib/solargraph/library.rb#512 + def handle_file_not_found(filename, error); end + + # source://solargraph//lib/solargraph/library.rb#521 + def maybe_map(source); end + + # @return [Mutex] + # + # source://solargraph//lib/solargraph/library.rb#489 + def mutex; end + + # Get the source for an open file or create a new source if the file + # exists on disk. Sources created from disk are not added to the open + # workspace files, i.e., the version on disk remains the authoritative + # version. + # + # @param filename [String] + # @raise [FileNotFoundError] if the file does not exist + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/library.rb#506 + def read(filename); end + + # source://solargraph//lib/solargraph/library.rb#471 + def source_map_external_require_hash; end + + class << self + # Create a library from a directory. + # + # @param directory [String] The path to be used for the workspace + # @param name [String, nil] + # @return [Solargraph::Library] + # + # source://solargraph//lib/solargraph/library.rb#409 + def load(directory = T.unsafe(nil), name = T.unsafe(nil)); end + end +end + +# A section of text identified by its filename and range. +# +# source://solargraph//lib/solargraph/location.rb#6 +class Solargraph::Location + # @param filename [String] + # @param range [Solargraph::Range] + # @return [Location] a new instance of Location + # + # source://solargraph//lib/solargraph/location.rb#15 + def initialize(filename, range); end + + # source://solargraph//lib/solargraph/location.rb#28 + def ==(other); end + + # @return [String] + # + # source://solargraph//lib/solargraph/location.rb#8 + def filename; end + + # source://solargraph//lib/solargraph/location.rb#33 + def inspect; end + + # @return [Solargraph::Range] + # + # source://solargraph//lib/solargraph/location.rb#11 + def range; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/location.rb#21 + def to_hash; end +end + +# source://solargraph//lib/solargraph/logging.rb#6 +module Solargraph::Logging + private + + # @return [Logger] + # + # source://solargraph//lib/solargraph/logging.rb#23 + def logger; end + + class << self + # @return [Logger] + # + # source://solargraph//lib/solargraph/logging.rb#23 + def logger; end + end +end + +# source://solargraph//lib/solargraph/logging.rb#7 +Solargraph::Logging::DEFAULT_LOG_LEVEL = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph/logging.rb#9 +Solargraph::Logging::LOG_LEVELS = T.let(T.unsafe(nil), Hash) + +# source://solargraph//lib/solargraph/page.rb#9 +class Solargraph::Page + # @param directory [String] + # @return [Page] a new instance of Page + # + # source://solargraph//lib/solargraph/page.rb#44 + def initialize(directory = T.unsafe(nil)); end + + # @param template [String] + # @param layout [Boolean] + # @param locals [Hash] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#68 + def render(template, layout: T.unsafe(nil), locals: T.unsafe(nil)); end + + class << self + # @param directories [Array] + # @param name [String] + # @raise [FileNotFoundError] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#75 + def select_template(directories, name); end + end +end + +# source://solargraph//lib/solargraph/page.rb#10 +class Solargraph::Page::Binder < ::OpenStruct + # @param locals [Hash] + # @param render_method [Proc] + # @return [Binder] a new instance of Binder + # + # source://solargraph//lib/solargraph/page.rb#13 + def initialize(locals, render_method); end + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#31 + def escape(text); end + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#25 + def htmlify(text); end + + # @param code [String] + # @return [String] + # + # source://solargraph//lib/solargraph/page.rb#37 + def ruby_to_html(code); end +end + +# source://solargraph//lib/solargraph/parser.rb#2 +module Solargraph::Parser + extend ::Solargraph::Parser::Rubyvm::ClassMethods + + class << self + # True if the parser can use RubyVM. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser.rb#15 + def rubyvm?; end + end +end + +# source://solargraph//lib/solargraph/parser/comment_ripper.rb#5 +class Solargraph::Parser::CommentRipper < ::Ripper::SexpBuilderPP + # @return [CommentRipper] a new instance of CommentRipper + # + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#6 + def initialize(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#12 + def on_comment(*args); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#31 + def on_embdoc(*args); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#24 + def on_embdoc_beg(*args); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#38 + def on_embdoc_end(*args); end + + # source://solargraph//lib/solargraph/parser/comment_ripper.rb#45 + def parse; end +end + +# source://solargraph//lib/solargraph/parser/legacy.rb#3 +module Solargraph::Parser::Legacy; end + +# source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#6 +module Solargraph::Parser::Legacy::ClassMethods + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#83 + def chain(*args); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#87 + def chain_string(*args); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#95 + def infer_literal_node_type(node); end + + # @param name [String] + # @param top [AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#74 + def inner_node_references(name, top); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#103 + def is_ast_node?(node); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#42 + def map(source); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#107 + def node_range(node); end + + # @param code [String] + # @param filename [String, nil] + # @param line [Integer] + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#24 + def parse(code, filename = T.unsafe(nil), line = T.unsafe(nil)); end + + # @param code [String] + # @param filename [String] + # @return [Array(Parser::AST::Node, Array)] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#10 + def parse_with_comments(code, filename = T.unsafe(nil)); end + + # @return [Parser::Base] + # + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#33 + def parser; end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#91 + def process_node(*args); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#50 + def references(source, name); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#46 + def returns_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#113 + def string_ranges(node); end + + # source://solargraph//lib/solargraph/parser/legacy/class_methods.rb#99 + def version; end +end + +# A custom builder for source parsers that ignores character encoding +# issues in literal strings. +# +# source://solargraph//lib/solargraph/parser/legacy/flawed_builder.rb#9 +class Solargraph::Parser::Legacy::FlawedBuilder < ::Parser::Builders::Default + # source://solargraph//lib/solargraph/parser/legacy/flawed_builder.rb#10 + def string_value(token); end +end + +# A factory for generating chains from nodes. +# +# source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#8 +class Solargraph::Parser::Legacy::NodeChainer + include ::Solargraph::Parser::Legacy::NodeMethods + + # @param node [Parser::AST::Node] + # @param filename [String] + # @return [NodeChainer] a new instance of NodeChainer + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#14 + def initialize(node, filename = T.unsafe(nil), in_block = T.unsafe(nil)); end + + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#21 + def chain; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#142 + def block_passed?(node); end + + # @param n [Parser::AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#48 + def generate_links(n); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#135 + def hash_is_splatted?(node); end + + class << self + # @param node [Parser::AST::Node] + # @param filename [String] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#30 + def chain(node, filename = T.unsafe(nil), in_block = T.unsafe(nil)); end + + # @param code [String] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#36 + def load_string(code); end + end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_chainer.rb#10 +Solargraph::Parser::Legacy::NodeChainer::Chain = Solargraph::Source::Chain + +# source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#8 +module Solargraph::Parser::Legacy::NodeMethods + private + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#133 + def any_splatted_call?(nodes); end + + # @todo Temporarily here for testing. Move to Solargraph::Parser. + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#138 + def call_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#113 + def const_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#99 + def convert_hash(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#78 + def drill_signature(node, signature); end + + # @param cursor [Solargraph::Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#180 + def find_recipient_node(cursor); end + + # @param node [Parser::AST::Node] + # @return [Position] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#74 + def get_node_end_position(node); end + + # @param node [Parser::AST::Node] + # @return [Position] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#68 + def get_node_start_position(node); end + + # @param node [Parser::AST::Node] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#39 + def infer_literal_node_type(node); end + + # @param node [Parser::AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#19 + def pack_name(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#214 + def repaired_find_recipient_node(cursor); end + + # Find all the nodes within the provided node that potentially return a + # value. + # + # The node parameter typically represents a method's logic, e.g., the + # second child (after the :args node) of a :def node. A simple one-line + # method would typically return itself, while a node with conditions + # would return the resulting node from each conditional branch. Nodes + # that follow a :return node are assumed to be unreachable. Nil values + # are converted to nil node types. + # + # @param node [Parser::AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#175 + def returns_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#128 + def splatted_call?(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#124 + def splatted_hash?(node); end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#13 + def unpack_name(node); end + + class << self + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#133 + def any_splatted_call?(nodes); end + + # @todo Temporarily here for testing. Move to Solargraph::Parser. + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#138 + def call_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#113 + def const_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#99 + def convert_hash(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#78 + def drill_signature(node, signature); end + + # @param cursor [Solargraph::Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#180 + def find_recipient_node(cursor); end + + # @param node [Parser::AST::Node] + # @return [Position] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#74 + def get_node_end_position(node); end + + # @param node [Parser::AST::Node] + # @return [Position] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#68 + def get_node_start_position(node); end + + # @param node [Parser::AST::Node] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#39 + def infer_literal_node_type(node); end + + # @param node [Parser::AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#19 + def pack_name(node); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#214 + def repaired_find_recipient_node(cursor); end + + # Find all the nodes within the provided node that potentially return a + # value. + # + # The node parameter typically represents a method's logic, e.g., the + # second child (after the :args node) of a :def node. A simple one-line + # method would typically return itself, while a node with conditions + # would return the resulting node from each conditional branch. Nodes + # that follow a :return node are assumed to be unreachable. Nil values + # are converted to nil node types. + # + # @param node [Parser::AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#175 + def returns_from(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#128 + def splatted_call?(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#124 + def splatted_hash?(node); end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#13 + def unpack_name(node); end + end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#220 +module Solargraph::Parser::Legacy::NodeMethods::DeepInference + class << self + # @param node [Parser::AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#228 + def get_return_nodes(node); end + + private + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#260 + def get_return_nodes_from_children(parent); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#281 + def get_return_nodes_only(parent); end + + # source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#299 + def reduce_to_value_nodes(nodes); end + end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_methods.rb#111 +Solargraph::Parser::Legacy::NodeMethods::NIL_NODE = T.let(T.unsafe(nil), Parser::AST::Node) + +# source://solargraph//lib/solargraph/parser/legacy/node_processors.rb#8 +module Solargraph::Parser::Legacy::NodeProcessors; end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/alias_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::AliasNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/alias_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/args_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::ArgsNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/args_node.rb#8 + def process; end + + private + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/args_node.rb#28 + def get_decl(node); end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/begin_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::BeginNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/begin_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/block_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::BlockNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/block_node.rb#10 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/block_node.rb#33 + def other_class_eval?; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/casgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::CasgnNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/casgn_node.rb#10 + def process; end + + private + + # @return [String] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/casgn_node.rb#24 + def const_name; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/cvasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::CvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/cvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/def_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::DefNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/def_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/defs_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::DefsNode < ::Solargraph::Parser::Legacy::NodeProcessors::DefNode + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/defs_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/gvasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::GvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/gvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/ivasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::IvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/ivasgn_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/lvasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::LvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/lvasgn_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/namespace_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::NamespaceNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/namespace_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/orasgn_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::OrasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/orasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/resbody_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::ResbodyNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/resbody_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/sclass_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::SclassNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/sclass_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::SendNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Legacy::NodeMethods + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#10 + def process; end + + private + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#230 + def process_alias_method; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#66 + def process_attribute; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#157 + def process_autoload; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#129 + def process_extend; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#101 + def process_include; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#165 + def process_module_function; end + + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#115 + def process_prepend; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#242 + def process_private_class_method; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#220 + def process_private_constant; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#149 + def process_require; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/legacy/node_processors/send_node.rb#45 + def process_visibility; end +end + +# source://solargraph//lib/solargraph/parser/legacy/node_processors/sym_node.rb#7 +class Solargraph::Parser::Legacy::NodeProcessors::SymNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/legacy/node_processors/sym_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser.rb#24 +Solargraph::Parser::NodeMethods = Solargraph::Parser::Rubyvm::NodeMethods + +# The processor classes used by SourceMap::Mapper to generate pins from +# parser nodes. +# +# source://solargraph//lib/solargraph/parser/node_processor.rb#8 +module Solargraph::Parser::NodeProcessor + class << self + # @param node [Parser::AST::Node] + # @param region [Region] + # @param pins [Array] + # @return [Array(Array, Array)] + # + # source://solargraph//lib/solargraph/parser/node_processor.rb#28 + def process(node, region = T.unsafe(nil), pins = T.unsafe(nil), locals = T.unsafe(nil)); end + + # Register a processor for a node type. + # + # @param type [Symbol] + # @param cls [Class] + # @return [Class] + # + # source://solargraph//lib/solargraph/parser/node_processor.rb#19 + def register(type, cls); end + end +end + +# source://solargraph//lib/solargraph/parser/node_processor/base.rb#6 +class Solargraph::Parser::NodeProcessor::Base + # @param node [Parser::AST::Node] + # @param region [Region] + # @param pins [Array] + # @return [Base] a new instance of Base + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#22 + def initialize(node, region, pins, locals); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#17 + def locals; end + + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#8 + def node; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#14 + def pins; end + + # Subclasses should override this method to generate new pins. + # + # @return [void] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#33 + def process; end + + # @return [Region] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#11 + def region; end + + private + + # @todo Candidate for deprecation + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#66 + def block_pin(position); end + + # @todo Candidate for deprecation + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#71 + def closure_pin(position); end + + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#57 + def comments_for(node); end + + # @param node [Parser::AST::Node] + # @return [Solargraph::Location] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#52 + def get_node_location(node); end + + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#61 + def named_path_pin(position); end + + # @param subregion [Region] + # @return [void] + # + # source://solargraph//lib/solargraph/parser/node_processor/base.rb#41 + def process_children(subregion = T.unsafe(nil)); end +end + +# Data used by the parser to track context at various locations in a +# source. +# +# source://solargraph//lib/solargraph/parser/region.rb#8 +class Solargraph::Parser::Region + # @param source [Source] + # @param namespace [String] + # @param scope [Symbol] + # @param visibility [Symbol] + # @return [Region] a new instance of Region + # + # source://solargraph//lib/solargraph/parser/region.rb#28 + def initialize(source: T.unsafe(nil), closure: T.unsafe(nil), scope: T.unsafe(nil), visibility: T.unsafe(nil), lvars: T.unsafe(nil)); end + + # @return [Pin::Closure] + # + # source://solargraph//lib/solargraph/parser/region.rb#10 + def closure; end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/region.rb#61 + def code_for(node); end + + # @return [String] + # + # source://solargraph//lib/solargraph/parser/region.rb#39 + def filename; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/region.rb#22 + def lvars; end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/parser/region.rb#13 + def scope; end + + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/parser/region.rb#19 + def source; end + + # Generate a new Region with the provided attribute changes. + # + # @param closure [Pin::Closure, nil] + # @param scope [Symbol, nil] + # @param visibility [Symbol, nil] + # @return [Region] + # + # source://solargraph//lib/solargraph/parser/region.rb#49 + def update(closure: T.unsafe(nil), scope: T.unsafe(nil), visibility: T.unsafe(nil), lvars: T.unsafe(nil)); end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/parser/region.rb#16 + def visibility; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm.rb#3 +module Solargraph::Parser::Rubyvm; end + +# source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#6 +module Solargraph::Parser::Rubyvm::ClassMethods + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#77 + def chain(*args); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#81 + def chain_string(*args); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#89 + def infer_literal_node_type(node); end + + # @param name [String] + # @param top [AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#56 + def inner_node_references(name, top); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#97 + def is_ast_node?(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#28 + def map(source); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#72 + def match_rubyvm_node_to_ref(top, name); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#105 + def node_range(node); end + + # @param code [String] + # @param filename [String, nil] + # @param line [Integer] + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#22 + def parse(code, filename = T.unsafe(nil), line = T.unsafe(nil)); end + + # @param code [String] + # @param filename [String] + # @return [Array(Parser::AST::Node, Array)] + # + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#10 + def parse_with_comments(code, filename = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#85 + def process_node(*args); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#111 + def recipient_node(tree); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#32 + def references(source, name); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#118 + def string_ranges(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/class_methods.rb#93 + def version; end +end + +# A factory for generating chains from nodes. +# +# source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#8 +class Solargraph::Parser::Rubyvm::NodeChainer + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # @param node [Parser::AST::Node] + # @param filename [String] + # @return [NodeChainer] a new instance of NodeChainer + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#15 + def initialize(node, filename = T.unsafe(nil), in_block = T.unsafe(nil)); end + + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#22 + def chain; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#130 + def block_passed?(node); end + + # @param n [Parser::AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#49 + def generate_links(n); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#123 + def hash_is_splatted?(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#134 + def node_to_argchains(node); end + + class << self + # @param node [Parser::AST::Node] + # @param filename [String] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#31 + def chain(node, filename = T.unsafe(nil), in_block = T.unsafe(nil)); end + + # @param code [String] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#37 + def load_string(code); end + end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_chainer.rb#11 +Solargraph::Parser::Rubyvm::NodeChainer::Chain = Solargraph::Source::Chain + +# source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#4 +module Solargraph::Parser::Rubyvm::NodeMethods + private + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#124 + def any_splatted_call?(nodes); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#73 + def call_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#62 + def const_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#92 + def convert_hash(node); end + + # @param cursor [Solargraph::Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#133 + def find_recipient_node(cursor); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#32 + def infer_literal_node_type(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#128 + def node?(node); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#15 + def pack_name(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#52 + def returns_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#119 + def splatted_call?(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#108 + def splatted_hash?(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#112 + def splatted_node?(node); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#9 + def unpack_name(node); end + + class << self + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#124 + def any_splatted_call?(nodes); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#73 + def call_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#62 + def const_nodes_from(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#92 + def convert_hash(node); end + + # @param cursor [Solargraph::Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#133 + def find_recipient_node(cursor); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [String, nil] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#32 + def infer_literal_node_type(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#128 + def node?(node); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#15 + def pack_name(node); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#52 + def returns_from(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#119 + def splatted_call?(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#108 + def splatted_hash?(node); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#112 + def splatted_node?(node); end + + # @param node [RubyVM::AbstractSyntaxTree::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#9 + def unpack_name(node); end + + protected + + # @param cursor [Source::Cursor] + # @return [Source::Cursor] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#173 + def maybe_adjust_cursor(cursor); end + + # @param cursor [Source::Cursor] + # @return [RubyVM::AbstractSyntaxTree::Node, nil] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#146 + def synchronized_find_recipient_node(cursor); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#178 + def unsynchronized_find_recipient_node(cursor); end + end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#205 +module Solargraph::Parser::Rubyvm::NodeMethods::DeepInference + class << self + # @param node [Parser::AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#213 + def get_return_nodes(node); end + + private + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#242 + def get_return_nodes_from_children(parent); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#265 + def get_return_nodes_only(parent); end + + # source://solargraph//lib/solargraph/parser/rubyvm/node_methods.rb#283 + def reduce_to_value_nodes(nodes); end + end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors.rb#8 +module Solargraph::Parser::Rubyvm::NodeProcessors; end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/alias_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::AliasNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/alias_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/args_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::ArgsNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/args_node.rb#8 + def process; end + + private + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/args_node.rb#74 + def extract_name(var); end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/begin_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::BeginNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/begin_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/block_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::BlockNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/block_node.rb#10 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/block_node.rb#33 + def other_class_eval?; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::CasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb#8 + def process; end + + private + + # @return [String] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb#22 + def const_name; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/cvasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::CvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/cvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/def_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::DefNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/def_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/defs_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::DefsNode < ::Solargraph::Parser::Rubyvm::NodeProcessors::DefNode + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/defs_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/gvasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::GvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/gvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::IvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::KwArgNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb#8 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb#30 + def require_keyword?(node); end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/lit_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::LitNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/lit_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::LvasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/namespace_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::NamespaceNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/namespace_node.rb#10 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::OptArgNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/orasgn_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::OrasgnNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/orasgn_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::ResbodyNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb#10 + def process; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb#36 + def exception_variable?; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/sclass_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::SclassNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/sclass_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/scope_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::ScopeNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/scope_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::SendNode < ::Solargraph::Parser::NodeProcessor::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#10 + def process; end + + private + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#241 + def process_alias_method; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#64 + def process_attribute; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#161 + def process_autoload; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#128 + def process_extend; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#101 + def process_include; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#170 + def process_module_function; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#115 + def process_prepend; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#258 + def process_private_class_method; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#228 + def process_private_constant; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#150 + def process_require; end + + # @return [void] + # + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/send_node.rb#42 + def process_visibility; end +end + +# source://solargraph//lib/solargraph/parser/rubyvm/node_processors/sym_node.rb#7 +class Solargraph::Parser::Rubyvm::NodeProcessors::SymNode < ::Solargraph::Parser::NodeProcessor::Base + # source://solargraph//lib/solargraph/parser/rubyvm/node_processors/sym_node.rb#8 + def process; end +end + +# source://solargraph//lib/solargraph/parser/snippet.rb#3 +class Solargraph::Parser::Snippet + # @return [Snippet] a new instance of Snippet + # + # source://solargraph//lib/solargraph/parser/snippet.rb#7 + def initialize(range, text); end + + # Returns the value of attribute range. + # + # source://solargraph//lib/solargraph/parser/snippet.rb#4 + def range; end + + # Returns the value of attribute text. + # + # source://solargraph//lib/solargraph/parser/snippet.rb#5 + def text; end +end + +# source://solargraph//lib/solargraph/parser.rb#10 +class Solargraph::Parser::SyntaxError < ::StandardError; end + +# The namespace for pins used in maps. +# +# source://solargraph//lib/solargraph/pin.rb#8 +module Solargraph::Pin; end + +# The base class for map pins. +# +# source://solargraph//lib/solargraph/pin/base.rb#7 +class Solargraph::Pin::Base + include ::Solargraph::Pin::Common + include ::Solargraph::Pin::Conversions + include ::Solargraph::Pin::Documenting + + # @param location [Solargraph::Location] + # @param kind [Integer] + # @param closure [Solargraph::Pin::Closure] + # @param name [String] + # @param comments [String] + # @return [Base] a new instance of Base + # + # source://solargraph//lib/solargraph/pin/base.rb#29 + def initialize(location: T.unsafe(nil), closure: T.unsafe(nil), name: T.unsafe(nil), comments: T.unsafe(nil)); end + + # Pin equality is determined using the #nearly? method and also + # requiring both pins to have the same location. + # + # source://solargraph//lib/solargraph/pin/base.rb#69 + def ==(other); end + + # @return [YARD::CodeObjects::Base] + # + # source://solargraph//lib/solargraph/pin/base.rb#13 + def code_object; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/base.rb#37 + def comments; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/base.rb#48 + def completion_item_kind; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#128 + def deprecated?; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/base.rb#104 + def directives; end + + # @return [YARD::Docstring] + # + # source://solargraph//lib/solargraph/pin/base.rb#98 + def docstring; end + + # @return [String, nil] + # + # source://solargraph//lib/solargraph/pin/base.rb#42 + def filename; end + + # source://solargraph//lib/solargraph/pin/base.rb#216 + def identity; end + + # @deprecated Use #typify and/or #probe instead + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#155 + def infer(api_map); end + + # source://solargraph//lib/solargraph/pin/base.rb#220 + def inspect; end + + # @return [Solargraph::Location] + # + # source://solargraph//lib/solargraph/pin/base.rb#16 + def location; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/base.rb#110 + def macros; end + + # Perform a quick check to see if this pin possibly includes YARD + # directives. This method does not require parsing the comments. + # + # After the comments have been parsed, this method will return false if + # no directives were found, regardless of whether it previously appeared + # possible. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#122 + def maybe_directives?; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/base.rb#19 + def name; end + + # True if the specified pin is a near match to this one. A near match + # indicates that the pins contain mostly the same data. Any differences + # between them should not have an impact on the API surface. + # + # @param other [Solargraph::Pin::Base, Object] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#80 + def nearly?(other); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/base.rb#22 + def path; end + + # Infer the pin's return type via static code analysis. + # + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#148 + def probe(api_map); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#186 + def probed?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#182 + def proxied?; end + + # Return a proxy for this pin with the specified return type. Other than + # the return type and the #proxied? setting, the proxy should be a clone + # of the original. + # + # @param return_type [ComplexType] + # @return [self] + # + # source://solargraph//lib/solargraph/pin/base.rb#209 + def proxy(return_type); end + + # @param api_map [ApiMap] + # @return [self] + # + # source://solargraph//lib/solargraph/pin/base.rb#192 + def realize(api_map); end + + # The pin's return type. + # + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#93 + def return_type; end + + # @return [Integer, nil] + # + # source://solargraph//lib/solargraph/pin/base.rb#53 + def symbol_kind; end + + # source://solargraph//lib/solargraph/pin/base.rb#57 + def to_s; end + + # Try to merge data from another pin. Merges are only possible if the + # pins are near matches (see the #nearly? method). The changes should + # not have any side effects on the API surface. + # + # @param pin [Pin::Base] The pin to merge into this one + # @return [Boolean] True if the pins were merged + # + # source://solargraph//lib/solargraph/pin/base.rb#168 + def try_merge!(pin); end + + # Get a fully qualified type from the pin's return type. + # + # The relative type is determined from YARD documentation (@return, + # @param, @type, etc.) and its namespaces are fully qualified using the + # provided ApiMap. + # + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#140 + def typify(api_map); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#62 + def variable?; end + + protected + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#227 + def probed=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#230 + def proxied=(_arg0); end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base.rb#233 + def return_type=(_arg0); end + + private + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/base.rb#289 + def collect_macros; end + + # @param dir1 [Array] + # @param dir2 [Array] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#269 + def compare_directives(dir1, dir2); end + + # True if two docstrings have the same tags, regardless of any other + # differences. + # + # @param d1 [YARD::Docstring] + # @param d2 [YARD::Docstring] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#258 + def compare_docstring_tags(d1, d2); end + + # @param tag1 [YARD::Tags::Tag] + # @param tag2 [YARD::Tags::Tag] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base.rb#280 + def compare_tags(tag1, tag2); end + + # @return [void] + # + # source://solargraph//lib/solargraph/pin/base.rb#238 + def parse_comments; end +end + +# source://solargraph//lib/solargraph/pin/base_variable.rb#5 +class Solargraph::Pin::BaseVariable < ::Solargraph::Pin::Base + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # @param assignment [Parser::AST::Node, nil] + # @return [BaseVariable] a new instance of BaseVariable + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#13 + def initialize(assignment: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#62 + def ==(other); end + + # @return [Parser::AST::Node, nil] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#10 + def assignment; end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#18 + def completion_item_kind; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#31 + def nil_assignment?; end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#39 + def probe(api_map); end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#27 + def return_type; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#23 + def symbol_kind; end + + # source://solargraph//lib/solargraph/pin/base_variable.rb#67 + def try_merge!(pin); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#35 + def variable?; end + + private + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/base_variable.rb#77 + def generate_complex_type; end +end + +# source://solargraph//lib/solargraph/pin/block.rb#5 +class Solargraph::Pin::Block < ::Solargraph::Pin::Closure + # @param args [Array] + # @return [Block] a new instance of Block + # + # source://solargraph//lib/solargraph/pin/block.rb#12 + def initialize(receiver: T.unsafe(nil), args: T.unsafe(nil), context: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/block.rb#25 + def binder; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/block.rb#35 + def parameter_names; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/block.rb#30 + def parameters; end + + # @param api_map [ApiMap] + # @return [void] + # + # source://solargraph//lib/solargraph/pin/block.rb#21 + def rebind(api_map); end + + # The signature of the method that receives this block. + # + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/pin/block.rb#9 + def receiver; end + + private + + # @param api_map [ApiMap] + # @return [ComplexType, nil] + # + # source://solargraph//lib/solargraph/pin/block.rb#43 + def binder_or_nil(api_map); end +end + +# source://solargraph//lib/solargraph/pin/class_variable.rb#5 +class Solargraph::Pin::ClassVariable < ::Solargraph::Pin::BaseVariable; end + +# source://solargraph//lib/solargraph/pin/closure.rb#5 +class Solargraph::Pin::Closure < ::Solargraph::Pin::Base + # @return [Closure] a new instance of Closure + # + # source://solargraph//lib/solargraph/pin/closure.rb#9 + def initialize(scope: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/closure.rb#25 + def binder; end + + # source://solargraph//lib/solargraph/pin/closure.rb#14 + def context; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/closure.rb#30 + def gates; end + + # @return [::Symbol] :class or :instance + # + # source://solargraph//lib/solargraph/pin/closure.rb#7 + def scope; end +end + +# source://solargraph//lib/solargraph/pin/common.rb#5 +module Solargraph::Pin::Common + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#35 + def binder; end + + # @return [Pin::Base, nil] + # + # source://solargraph//lib/solargraph/pin/common.rb#10 + def closure; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/common.rb#40 + def comments; end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#23 + def context; end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#23 + def full_context; end + + # @return [Location] + # + # source://solargraph//lib/solargraph/pin/common.rb#7 + def location; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/common.rb#13 + def name; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/common.rb#30 + def namespace; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/common.rb#45 + def path; end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#18 + def return_type; end + + private + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/common.rb#52 + def find_context; end +end + +# source://solargraph//lib/solargraph/pin/constant.rb#5 +class Solargraph::Pin::Constant < ::Solargraph::Pin::BaseVariable + # @return [Constant] a new instance of Constant + # + # source://solargraph//lib/solargraph/pin/constant.rb#8 + def initialize(visibility: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/constant.rb#17 + def completion_item_kind; end + + # source://solargraph//lib/solargraph/pin/constant.rb#26 + def path; end + + # source://solargraph//lib/solargraph/pin/constant.rb#13 + def return_type; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/constant.rb#22 + def symbol_kind; end + + # Returns the value of attribute visibility. + # + # source://solargraph//lib/solargraph/pin/constant.rb#6 + def visibility; end + + private + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/constant.rb#33 + def generate_complex_type; end +end + +# @todo Move this stuff. It should be the responsibility of the language server. +# +# source://solargraph//lib/solargraph/pin/conversions.rb#8 +module Solargraph::Pin::Conversions + # @return [Hash] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#10 + def completion_item; end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#46 + def detail; end + + # Get a markdown-flavored link to a documentation page. + # + # @return [String] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#60 + def link_documentation; end + + # source://solargraph//lib/solargraph/pin/conversions.rb#70 + def reset_conversions; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#25 + def resolve_completion_item; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#38 + def signature_help; end + + # source://solargraph//lib/solargraph/pin/conversions.rb#64 + def text_documentation; end + + private + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#90 + def escape_brackets(text); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/conversions.rb#81 + def generate_link; end +end + +# A module to add the Pin::Base#documentation method. +# +# source://solargraph//lib/solargraph/pin/documenting.rb#16 +module Solargraph::Pin::Documenting + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#62 + def documentation; end + + private + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#91 + def normalize_indentation(text); end + + # @param line [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#97 + def remove_odd_spaces(line); end +end + +# A documentation formatter that either performs Markdown conversion for +# text, or applies backticks for code blocks. +# +# source://solargraph//lib/solargraph/pin/documenting.rb#20 +class Solargraph::Pin::Documenting::DocSection + # @param code [Boolean] True if this section is a code block + # @return [DocSection] a new instance of DocSection + # + # source://solargraph//lib/solargraph/pin/documenting.rb#25 + def initialize(code); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#30 + def code?; end + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#36 + def concat(text); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#22 + def plaintext; end + + # source://solargraph//lib/solargraph/pin/documenting.rb#40 + def to_s; end + + private + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#49 + def escape_brackets(text); end + + # @param text [String] + # @return [String] + # + # source://solargraph//lib/solargraph/pin/documenting.rb#56 + def unescape_brackets(text); end +end + +# DuckMethod pins are used to add completion items for type tags that +# use duck typing, e.g., `@param file [#read]`. +# +# source://solargraph//lib/solargraph/pin/duck_method.rb#8 +class Solargraph::Pin::DuckMethod < ::Solargraph::Pin::Method; end + +# source://solargraph//lib/solargraph/pin/global_variable.rb#5 +class Solargraph::Pin::GlobalVariable < ::Solargraph::Pin::BaseVariable; end + +# source://solargraph//lib/solargraph/pin/instance_variable.rb#5 +class Solargraph::Pin::InstanceVariable < ::Solargraph::Pin::BaseVariable + # source://solargraph//lib/solargraph/pin/instance_variable.rb#6 + def binder; end + + # source://solargraph//lib/solargraph/pin/instance_variable.rb#14 + def context; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/instance_variable.rb#25 + def nearly?(other); end + + # source://solargraph//lib/solargraph/pin/instance_variable.rb#10 + def scope; end +end + +# source://solargraph//lib/solargraph/pin/keyword.rb#5 +class Solargraph::Pin::Keyword < ::Solargraph::Pin::Base + # @return [Keyword] a new instance of Keyword + # + # source://solargraph//lib/solargraph/pin/keyword.rb#6 + def initialize(name); end + + # source://solargraph//lib/solargraph/pin/keyword.rb#10 + def name; end +end + +# source://solargraph//lib/solargraph/pin/keyword_param.rb#5 +class Solargraph::Pin::KeywordParam < ::Solargraph::Pin::Symbol; end + +# source://solargraph//lib/solargraph/pin/local_variable.rb#5 +class Solargraph::Pin::LocalVariable < ::Solargraph::Pin::BaseVariable + # @return [LocalVariable] a new instance of LocalVariable + # + # source://solargraph//lib/solargraph/pin/local_variable.rb#9 + def initialize(assignment: T.unsafe(nil), presence: T.unsafe(nil), **splat); end + + # @return [Range] + # + # source://solargraph//lib/solargraph/pin/local_variable.rb#7 + def presence; end + + # source://solargraph//lib/solargraph/pin/local_variable.rb#15 + def try_merge!(pin); end + + # @param other_closure [Pin::Closure] + # @param other_loc [Location] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/local_variable.rb#23 + def visible_at?(other_closure, other_loc); end + + private + + # source://solargraph//lib/solargraph/pin/local_variable.rb#43 + def match_named_closure(needle, haystack); end + + # @param tag1 [String] + # @param tag2 [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/local_variable.rb#34 + def match_tags(tag1, tag2); end +end + +# The base class for method and attribute pins. +# +# source://solargraph//lib/solargraph/pin/method.rb#7 +class Solargraph::Pin::Method < ::Solargraph::Pin::Closure + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # @param visibility [::Symbol] :public, :protected, or :private + # @param explicit [Boolean] + # @return [Method] a new instance of Method + # + # source://solargraph//lib/solargraph/pin/method.rb#21 + def initialize(visibility: T.unsafe(nil), explicit: T.unsafe(nil), parameters: T.unsafe(nil), node: T.unsafe(nil), attribute: T.unsafe(nil), **splat); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/method.rb#98 + def attribute?; end + + # source://solargraph//lib/solargraph/pin/method.rb#35 + def completion_item_kind; end + + # source://solargraph//lib/solargraph/pin/method.rb#59 + def documentation; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/method.rb#94 + def explicit?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/method.rb#102 + def nearly?(other); end + + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/pin/method.rb#17 + def node; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/method.rb#120 + def overloads; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/method.rb#31 + def parameter_names; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/method.rb#11 + def parameters; end + + # source://solargraph//lib/solargraph/pin/method.rb#47 + def path; end + + # source://solargraph//lib/solargraph/pin/method.rb#109 + def probe(api_map); end + + # source://solargraph//lib/solargraph/pin/method.rb#43 + def return_type; end + + # source://solargraph//lib/solargraph/pin/method.rb#39 + def symbol_kind; end + + # source://solargraph//lib/solargraph/pin/method.rb#113 + def try_merge!(pin); end + + # source://solargraph//lib/solargraph/pin/method.rb#51 + def typify(api_map); end + + # @return [::Symbol] :public, :private, or :protected + # + # source://solargraph//lib/solargraph/pin/method.rb#14 + def visibility; end + + private + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/method.rb#145 + def generate_complex_type; end + + # source://solargraph//lib/solargraph/pin/method.rb#232 + def infer_from_iv(api_map); end + + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/method.rb#207 + def infer_from_return_nodes(api_map); end + + # @return [Parser::AST::Node, nil] + # + # source://solargraph//lib/solargraph/pin/method.rb#196 + def method_body_node; end + + # When YARD parses an overload tag, it includes rest modifiers in the parameters names. + # + # @param arg [String] + # @return [Array(String, Symbol)] + # + # source://solargraph//lib/solargraph/pin/method.rb#249 + def parse_overload_param(name); end + + # @param ref [String] + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/method.rb#178 + def resolve_reference(ref, api_map); end + + # @param api_map [ApiMap] + # @return [ComplexType, nil] + # + # source://solargraph//lib/solargraph/pin/method.rb#153 + def see_reference(api_map); end + + # @param api_map [ApiMap] + # @return [ComplexType, nil] + # + # source://solargraph//lib/solargraph/pin/method.rb#166 + def typify_from_super(api_map); end +end + +# Use this class to track method aliases for later remapping. Common +# examples that defer mapping are aliases for superclass methods or +# methods from included modules. +# +# source://solargraph//lib/solargraph/pin/method_alias.rb#9 +class Solargraph::Pin::MethodAlias < ::Solargraph::Pin::Method + # @return [MethodAlias] a new instance of MethodAlias + # + # source://solargraph//lib/solargraph/pin/method_alias.rb#16 + def initialize(scope: T.unsafe(nil), original: T.unsafe(nil), **splat); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/method_alias.rb#14 + def original; end + + # source://solargraph//lib/solargraph/pin/method_alias.rb#26 + def path; end + + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/pin/method_alias.rb#11 + def scope; end + + # source://solargraph//lib/solargraph/pin/method_alias.rb#22 + def visibility; end +end + +# source://solargraph//lib/solargraph/pin/namespace.rb#5 +class Solargraph::Pin::Namespace < ::Solargraph::Pin::Closure + # @param type [::Symbol] :class or :module + # @param visibility [::Symbol] :public or :private + # @param gates [Array] + # @return [Namespace] a new instance of Namespace + # + # source://solargraph//lib/solargraph/pin/namespace.rb#15 + def initialize(type: T.unsafe(nil), visibility: T.unsafe(nil), gates: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/namespace.rb#49 + def binder; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#57 + def completion_item_kind; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#74 + def domains; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#45 + def full_context; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#82 + def gates; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#41 + def namespace; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#66 + def path; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#70 + def return_type; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#53 + def scope; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/namespace.rb#62 + def symbol_kind; end + + # @return [::Symbol] :class or :module + # + # source://solargraph//lib/solargraph/pin/namespace.rb#10 + def type; end + + # source://solargraph//lib/solargraph/pin/namespace.rb#78 + def typify(api_map); end + + # @return [::Symbol] :public or :private + # + # source://solargraph//lib/solargraph/pin/namespace.rb#7 + def visibility; end +end + +# source://solargraph//lib/solargraph/pin/parameter.rb#5 +class Solargraph::Pin::Parameter < ::Solargraph::Pin::LocalVariable + # @return [Parameter] a new instance of Parameter + # + # source://solargraph//lib/solargraph/pin/parameter.rb#12 + def initialize(decl: T.unsafe(nil), asgn_code: T.unsafe(nil), **splat); end + + # @return [String] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#10 + def asgn_code; end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#7 + def decl; end + + # source://solargraph//lib/solargraph/pin/parameter.rb#85 + def documentation; end + + # source://solargraph//lib/solargraph/pin/parameter.rb#34 + def full; end + + # The parameter's zero-based location in the block's signature. + # + # @return [Integer] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#75 + def index; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#18 + def keyword?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#22 + def kwrestarg?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#30 + def rest?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#26 + def restarg?; end + + # source://solargraph//lib/solargraph/pin/parameter.rb#53 + def return_type; end + + # source://solargraph//lib/solargraph/pin/parameter.rb#91 + def try_merge!(pin); end + + # @param api_map [ApiMap] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#80 + def typify(api_map); end + + private + + # @return [YARD::Tags::Tag] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#99 + def param_tag; end + + # @param ref [String] + # @param api_map [ApiMap] + # @param skip [Array] + # @return [Array, nil] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#177 + def resolve_reference(ref, api_map, skip); end + + # @param heredoc [YARD::Docstring] + # @param api_map [ApiMap] + # @param skip [Array] + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#164 + def see_reference(heredoc, api_map, skip = T.unsafe(nil)); end + + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#115 + def typify_block_param(api_map); end + + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/pin/parameter.rb#141 + def typify_method_param(api_map); end +end + +# source://solargraph//lib/solargraph/pin/proxy_type.rb#5 +class Solargraph::Pin::ProxyType < ::Solargraph::Pin::Base + # @param return_type [ComplexType] + # @return [ProxyType] a new instance of ProxyType + # + # source://solargraph//lib/solargraph/pin/proxy_type.rb#7 + def initialize(return_type: T.unsafe(nil), **splat); end + + # source://solargraph//lib/solargraph/pin/proxy_type.rb#12 + def context; end + + class << self + # @param return_type [ComplexType] + # @return [ProxyType] + # + # source://solargraph//lib/solargraph/pin/proxy_type.rb#18 + def anonymous(return_type); end + end +end + +# source://solargraph//lib/solargraph/pin.rb#35 +Solargraph::Pin::ROOT_PIN = T.let(T.unsafe(nil), Solargraph::Pin::Namespace) + +# source://solargraph//lib/solargraph/pin/reference.rb#5 +class Solargraph::Pin::Reference < ::Solargraph::Pin::Base; end + +# source://solargraph//lib/solargraph/pin/reference/extend.rb#6 +class Solargraph::Pin::Reference::Extend < ::Solargraph::Pin::Reference; end + +# source://solargraph//lib/solargraph/pin/reference/include.rb#6 +class Solargraph::Pin::Reference::Include < ::Solargraph::Pin::Reference; end + +# source://solargraph//lib/solargraph/pin/reference/override.rb#6 +class Solargraph::Pin::Reference::Override < ::Solargraph::Pin::Reference + # @return [Override] a new instance of Override + # + # source://solargraph//lib/solargraph/pin/reference/override.rb#13 + def initialize(location, name, tags, delete = T.unsafe(nil)); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/reference/override.rb#11 + def delete; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/reference/override.rb#8 + def tags; end + + class << self + # source://solargraph//lib/solargraph/pin/reference/override.rb#23 + def from_comment(name, comment); end + + # source://solargraph//lib/solargraph/pin/reference/override.rb#19 + def method_return(name, *tags, delete: T.unsafe(nil)); end + end +end + +# source://solargraph//lib/solargraph/pin/reference/prepend.rb#6 +class Solargraph::Pin::Reference::Prepend < ::Solargraph::Pin::Reference; end + +# source://solargraph//lib/solargraph/pin/reference/require.rb#6 +class Solargraph::Pin::Reference::Require < ::Solargraph::Pin::Reference + # @return [Require] a new instance of Require + # + # source://solargraph//lib/solargraph/pin/reference/require.rb#7 + def initialize(location, name); end +end + +# source://solargraph//lib/solargraph/pin/reference/superclass.rb#6 +class Solargraph::Pin::Reference::Superclass < ::Solargraph::Pin::Reference; end + +# source://solargraph//lib/solargraph/pin/search.rb#7 +class Solargraph::Pin::Search + # @param pins [Array] + # @param query [String] + # @return [Search] a new instance of Search + # + # source://solargraph//lib/solargraph/pin/search.rb#23 + def initialize(pins, query); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/search.rb#29 + def results; end + + private + + # @return [Array] + # + # source://solargraph//lib/solargraph/pin/search.rb#36 + def do_query; end + + # @param str1 [String] + # @param str2 [String] + # @return [Float] + # + # source://solargraph//lib/solargraph/pin/search.rb#50 + def fuzzy_string_match(str1, str2); end +end + +# source://solargraph//lib/solargraph/pin/search.rb#8 +class Solargraph::Pin::Search::Result + # @return [Result] a new instance of Result + # + # source://solargraph//lib/solargraph/pin/search.rb#15 + def initialize(match, pin); end + + # @return [Float] + # + # source://solargraph//lib/solargraph/pin/search.rb#10 + def match; end + + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/pin/search.rb#13 + def pin; end +end + +# source://solargraph//lib/solargraph/pin/singleton.rb#5 +class Solargraph::Pin::Singleton < ::Solargraph::Pin::Closure + # @return [Singleton] a new instance of Singleton + # + # source://solargraph//lib/solargraph/pin/singleton.rb#6 + def initialize(name: T.unsafe(nil), location: T.unsafe(nil), closure: T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/pin/symbol.rb#5 +class Solargraph::Pin::Symbol < ::Solargraph::Pin::Base + # @param location [Solargraph::Location] + # @param name [String] + # @return [Symbol] a new instance of Symbol + # + # source://solargraph//lib/solargraph/pin/symbol.rb#8 + def initialize(location, name); end + + # source://solargraph//lib/solargraph/pin/symbol.rb#26 + def comments; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#22 + def completion_item_kind; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/pin/symbol.rb#42 + def deprecated?; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#34 + def directives; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#14 + def namespace; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#18 + def path; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#30 + def return_type; end + + # source://solargraph//lib/solargraph/pin/symbol.rb#38 + def visibility; end +end + +# The zero-based line and column numbers of a position in a string. +# +# source://solargraph//lib/solargraph/position.rb#6 +class Solargraph::Position + # @param line [Integer] + # @param character [Integer] + # @return [Position] a new instance of Position + # + # source://solargraph//lib/solargraph/position.rb#17 + def initialize(line, character); end + + # source://solargraph//lib/solargraph/position.rb#95 + def ==(other); end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#11 + def character; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#11 + def column; end + + # source://solargraph//lib/solargraph/position.rb#33 + def inspect; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#8 + def line; end + + # Get a hash of the position. This representation is suitable for use in + # the language server protocol. + # + # @return [Hash] + # + # source://solargraph//lib/solargraph/position.rb#26 + def to_hash; end + + class << self + # Get a position for the specified text and offset. + # + # @param text [String] + # @param offset [Integer] + # @raise [InvalidOffsetError] + # @return [Position] + # + # source://solargraph//lib/solargraph/position.rb#63 + def from_offset(text, offset); end + + # Get a numeric offset for the specified text and a position identified + # by its line and character. + # + # @param text [String] + # @param line [Integer] + # @param character [Integer] + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#54 + def line_char_to_offset(text, line, character); end + + # A helper method for generating positions from arrays of integers. The + # original parameter is returned if it is already a position. + # + # @param object [Position, Array(Integer, Integer)] + # @raise [ArgumentError] if the object cannot be converted to a position. + # @return [Position] + # + # source://solargraph//lib/solargraph/position.rb#89 + def normalize(object); end + + # Get a numeric offset for the specified text and position. + # + # @param text [String] + # @param position [Position] + # @return [Integer] + # + # source://solargraph//lib/solargraph/position.rb#42 + def to_offset(text, position); end + end +end + +# A pair of positions that compose a section of text. +# +# source://solargraph//lib/solargraph/range.rb#6 +class Solargraph::Range + # @param start [Position] + # @param ending [Position] + # @return [Range] a new instance of Range + # + # source://solargraph//lib/solargraph/range.rb#15 + def initialize(start, ending); end + + # source://solargraph//lib/solargraph/range.rb#86 + def ==(other); end + + # True if the specified position is inside the range. + # + # @param position [Position, Array(Integer, Integer)] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/range.rb#35 + def contain?(position); end + + # @return [Position] + # + # source://solargraph//lib/solargraph/range.rb#11 + def ending; end + + # True if the range contains the specified position and the position does not precede it. + # + # @param position [Position, Array(Integer, Integer)] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/range.rb#47 + def include?(position); end + + # source://solargraph//lib/solargraph/range.rb#91 + def inspect; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/range.rb#8 + def start; end + + # Get a hash of the range. This representation is suitable for use in + # the language server protocol. + # + # @return [Hash] + # + # source://solargraph//lib/solargraph/range.rb#24 + def to_hash; end + + class << self + # Get a range from a Parser range, usually found in + # Parser::AST::Node#location#expression. + # + # @param expr [Parser::Source::Range] + # @return [Range] + # + # source://solargraph//lib/solargraph/range.rb#82 + def from_expr(expr); end + + # Get a range from a node. + # + # @param node [RubyVM::AbstractSyntaxTree::Node, Parser::AST::Node] + # @return [Range] + # + # source://solargraph//lib/solargraph/range.rb#67 + def from_node(node); end + + # Create a range from a pair of lines and characters. + # + # @param l1 [Integer] Starting line + # @param c1 [Integer] Starting character + # @param l2 [Integer] Ending line + # @param c2 [Integer] Ending character + # @return [Range] + # + # source://solargraph//lib/solargraph/range.rb#59 + def from_to(l1, c1, l2, c2); end + end +end + +# source://solargraph//lib/solargraph/server_methods.rb#6 +module Solargraph::ServerMethods + # @return [Integer] + # + # source://solargraph//lib/solargraph/server_methods.rb#8 + def available_port; end +end + +# source://solargraph//lib/solargraph/shell.rb#6 +class Solargraph::Shell < ::Thor + include ::Solargraph::ServerMethods + + # source://solargraph//lib/solargraph/shell.rb#97 + def available_cores; end + + # source://solargraph//lib/solargraph/shell.rb#197 + def bundle; end + + # source://solargraph//lib/solargraph/shell.rb#108 + def clear; end + + # source://solargraph//lib/solargraph/shell.rb#52 + def config(directory = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/shell.rb#75 + def download_core(version = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/shell.rb#92 + def list_cores; end + + # source://solargraph//lib/solargraph/shell.rb#202 + def rdoc(gem, version = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/shell.rb#127 + def reporters; end + + # source://solargraph//lib/solargraph/shell.rb#172 + def scan; end + + # source://solargraph//lib/solargraph/shell.rb#19 + def socket; end + + # source://solargraph//lib/solargraph/shell.rb#36 + def stdio; end + + # source://solargraph//lib/solargraph/shell.rb#140 + def typecheck(*files); end + + # @raise [ArgumentError] + # + # source://solargraph//lib/solargraph/shell.rb#116 + def uncache(*gems); end + + # source://solargraph//lib/solargraph/shell.rb#12 + def version; end + + private + + # @param pin [Solargraph::Pin::Base] + # @return [String] + # + # source://solargraph//lib/solargraph/shell.rb#212 + def pin_description(pin); end +end + +# A Ruby file that has been parsed into an AST. +# +# source://solargraph//lib/solargraph/source.rb#8 +class Solargraph::Source + include ::Solargraph::Source::EncodingFixes + + # @param code [String] + # @param filename [String] + # @param version [Integer] + # @return [Source] a new instance of Source + # + # source://solargraph//lib/solargraph/source.rb#38 + def initialize(code, filename = T.unsafe(nil), version = T.unsafe(nil)); end + + # Get a hash of comments grouped by the line numbers of the associated code. + # + # @return [Hash{Integer => Array}] + # + # source://solargraph//lib/solargraph/source.rb#305 + def associated_comments; end + + # @param range [Solargraph::Range] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#58 + def at(range); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#23 + def code; end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#244 + def code_for(node); end + + # @param position [Position] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#222 + def comment_at?(position); end + + # @return [Hash{Integer => Array}] + # + # source://solargraph//lib/solargraph/source.rb#29 + def comments; end + + # @param node [Parser::AST::Node] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#254 + def comments_for(node); end + + # @param position [Position, Array(Integer, Integer)] + # @return [Source::Cursor] + # + # source://solargraph//lib/solargraph/source.rb#167 + def cursor_at(position); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#238 + def error_ranges; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#20 + def filename; end + + # Finish synchronizing a source that was updated via #start_synchronize. + # This method returns self if the source is already synchronized. Otherwise + # it parses the AST and returns a new synchronized Source. + # + # @return [Source] + # + # source://solargraph//lib/solargraph/source.rb#125 + def finish_synchronize; end + + # Get an array of ranges that can be folded, e.g., the range of a class + # definition or an if condition. + # + # See FOLDING_NODE_TYPES for the list of node types that can be folded. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#288 + def folding_ranges; end + + # @param l1 [Integer] + # @param c1 [Integer] + # @param l2 [Integer] + # @param c2 [Integer] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#67 + def from_to(l1, c1, l2, c2); end + + # A location representing the file in its entirety. + # + # @return [Location] + # + # source://solargraph//lib/solargraph/source.rb#265 + def location; end + + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/source.rb#26 + def node; end + + # Get the nearest node that contains the specified index. + # + # @param line [Integer] + # @param column [Integer] + # @return [AST::Node] + # + # source://solargraph//lib/solargraph/source.rb#78 + def node_at(line, column); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#172 + def parsed?; end + + # @param name [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#233 + def references(name); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#176 + def repaired?; end + + # Start synchronizing the source. This method updates the code without + # parsing a new AST. The resulting Source object will be marked not + # synchronized (#synchronized? == false). + # + # @param updater [Source::Updater] + # @return [Source] + # + # source://solargraph//lib/solargraph/source.rb#102 + def start_synchronize(updater); end + + # @param position [Position] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#182 + def string_at?(position); end + + # source://solargraph//lib/solargraph/source.rb#216 + def string_ranges; end + + # Synchronize the Source with an update. This method applies changes to the + # code, parses the new code's AST, and returns the resulting Source object. + # + # @param updater [Source::Updater] + # @return [Source] + # + # source://solargraph//lib/solargraph/source.rb#145 + def synchronize(updater); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#297 + def synchronized?; end + + # Get an array of nodes containing the specified index, starting with the + # nearest node and ending with the root. + # + # @param line [Integer] + # @param column [Integer] + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#88 + def tree_at(line, column); end + + # @return [Integer] + # @todo Deprecate? + # + # source://solargraph//lib/solargraph/source.rb#33 + def version; end + + protected + + # @param val [String] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#462 + def code=(val); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#480 + def comments=(_arg0); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#471 + def error_ranges=(_arg0); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#455 + def filename=(_arg0); end + + # @return [Source::Updater] + # + # source://solargraph//lib/solargraph/source.rb#486 + def last_updater; end + + # @return [Source::Updater] + # + # source://solargraph//lib/solargraph/source.rb#486 + def last_updater=(_arg0); end + + # @return [Parser::AST::Node] + # + # source://solargraph//lib/solargraph/source.rb#468 + def node=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#477 + def parsed=(_arg0); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#474 + def repaired; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#474 + def repaired=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source.rb#483 + def synchronized=(_arg0); end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/source.rb#458 + def version=(_arg0); end + + private + + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#491 + def code_lines; end + + # source://solargraph//lib/solargraph/source.rb#445 + def colonized(range, position, node); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#390 + def comment_ranges; end + + # source://solargraph//lib/solargraph/source.rb#326 + def first_not_empty_from(line); end + + # Get an array of foldable comment block ranges. Blocks are excluded if + # they are less than 3 lines long. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#398 + def foldable_comment_block_ranges; end + + # @param top [Parser::AST::Node] + # @param result [Array] + # @param parent [Symbol] + # @return [void] + # + # source://solargraph//lib/solargraph/source.rb#337 + def inner_folding_ranges(top, result = T.unsafe(nil), parent = T.unsafe(nil)); end + + # @param node [Parser::AST::Node] + # @param position [Position] + # @param stack [Array] + # @return [void] + # + # source://solargraph//lib/solargraph/source.rb#432 + def inner_tree_at(node, position, stack); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#385 + def string_nodes; end + + # @param n [Parser::AST::Node] + # @return [Array] + # + # source://solargraph//lib/solargraph/source.rb#416 + def string_nodes_in(n); end + + # A hash of line numbers and their associated comments. + # + # @return [Hash{Integer => Array}] + # + # source://solargraph//lib/solargraph/source.rb#380 + def stringified_comments; end + + # Get a string representation of an array of comments. + # + # @param comments [String] + # @return [String] + # + # source://solargraph//lib/solargraph/source.rb#357 + def stringify_comment_array(comments); end + + class << self + # @param filename [String] + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/source.rb#498 + def load(filename); end + + # @param code [String] + # @param filename [String] + # @param version [Integer] + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/source.rb#509 + def load_string(code, filename = T.unsafe(nil), version = T.unsafe(nil)); end + + # @param comments [String] + # @return [YARD::DocstringParser] + # + # source://solargraph//lib/solargraph/source.rb#515 + def parse_docstring(comments); end + end +end + +# A chain of constants, variables, and method calls for inferring types of +# values. +# +# source://solargraph//lib/solargraph/source/chain/link.rb#5 +class Solargraph::Source::Chain + # @param links [Array] + # @return [Chain] a new instance of Chain + # + # source://solargraph//lib/solargraph/source/chain.rb#39 + def initialize(links, node = T.unsafe(nil), splat = T.unsafe(nil)); end + + # @return [Chain] + # + # source://solargraph//lib/solargraph/source/chain.rb#53 + def base; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#98 + def constant?; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array] + # @return [Array] + # + # source://solargraph//lib/solargraph/source/chain.rb#61 + def define(api_map, name_pin, locals); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#93 + def defined?; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/source/chain.rb#78 + def infer(api_map, name_pin, locals); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source/chain.rb#34 + def links; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#85 + def literal?; end + + # Returns the value of attribute node. + # + # source://solargraph//lib/solargraph/source/chain.rb#36 + def node; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#106 + def nullable?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#102 + def splat?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain.rb#89 + def undefined?; end + + private + + # @param pins [Array] + # @param api_map [ApiMap] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/source/chain.rb#115 + def infer_first_defined(pins, context, api_map); end + + # @param type [ComplexType] + # + # source://solargraph//lib/solargraph/source/chain.rb#157 + def maybe_nil(type); end +end + +# source://solargraph//lib/solargraph/source/chain/block_variable.rb#6 +class Solargraph::Source::Chain::BlockVariable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/block_variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/call.rb#6 +class Solargraph::Source::Chain::Call < ::Solargraph::Source::Chain::Link + # @param word [String] + # @param arguments [Array] + # @param with_block [Boolean] True if the chain is inside a block + # @param head [Boolean] True if the call is the start of its chain + # @return [Call] a new instance of Call + # + # source://solargraph//lib/solargraph/source/chain/call.rb#17 + def initialize(word, arguments = T.unsafe(nil), with_block = T.unsafe(nil)); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#11 + def arguments; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#30 + def resolve(api_map, name_pin, locals); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#23 + def with_block?; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#8 + def word; end + + private + + # @param arguments [Array] + # @param parameters [Array] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#188 + def arguments_match(arguments, parameters); end + + # @param docstring [YARD::Docstring] + # @param context [ComplexType] + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#176 + def extra_return_type(docstring, context); end + + # @param pins [Array] + # @param api_map [ApiMap] + # @param context [ComplexType] + # @param locals [Pin::LocalVariable] + # @return [Array] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#53 + def inferred_pins(pins, api_map, context, locals); end + + # @param pin [Pin] + # @param macro [YARD::Tags::MacroDirective] + # @param api_map [ApiMap] + # @param context [ComplexType] + # @param locals [Array] + # @return [Pin::ProxyType] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#153 + def inner_process_macro(pin, macro, api_map, context, locals); end + + # @param pin [Pin::Method] + # @param api_map [ApiMap] + # @param context [ComplexType] + # @param locals [Pin::Base] + # @return [Pin::ProxyType] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#137 + def process_directive(pin, api_map, context, locals); end + + # @param pin [Pin::Method] + # @param api_map [ApiMap] + # @param context [ComplexType] + # @param locals [Pin::Base] + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#124 + def process_macro(pin, api_map, context, locals); end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @return [Array] + # + # source://solargraph//lib/solargraph/source/chain/call.rb#200 + def super_pins(api_map, name_pin); end +end + +# source://solargraph//lib/solargraph/source/chain/class_variable.rb#6 +class Solargraph::Source::Chain::ClassVariable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/class_variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/constant.rb#6 +class Solargraph::Source::Chain::Constant < ::Solargraph::Source::Chain::Link + # @return [Constant] a new instance of Constant + # + # source://solargraph//lib/solargraph/source/chain/constant.rb#7 + def initialize(word); end + + # source://solargraph//lib/solargraph/source/chain/constant.rb#11 + def resolve(api_map, name_pin, locals); end + + private + + # source://solargraph//lib/solargraph/source/chain/constant.rb#38 + def crawl_gates(pin); end + + # source://solargraph//lib/solargraph/source/chain/constant.rb#62 + def deep_constant_type(gate, api_map); end + + # source://solargraph//lib/solargraph/source/chain/constant.rb#51 + def first_pin_type(pins, api_map); end +end + +# source://solargraph//lib/solargraph/source/chain/global_variable.rb#6 +class Solargraph::Source::Chain::GlobalVariable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/global_variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/hash.rb#6 +class Solargraph::Source::Chain::Hash < ::Solargraph::Source::Chain::Literal + # @param type [String] + # @param splatted [Boolean] + # @return [Hash] a new instance of Hash + # + # source://solargraph//lib/solargraph/source/chain/hash.rb#9 + def initialize(type, splatted = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/source/chain/hash.rb#18 + def resolve(api_map, name_pin, locals); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/hash.rb#22 + def splatted?; end + + # source://solargraph//lib/solargraph/source/chain/hash.rb#14 + def word; end +end + +# Chain::Head is a link for ambiguous words, e.g.; `String` can refer to +# either a class (`String`) or a function (`Kernel#String`). +# +# @note Chain::Head is only intended to handle `self` and `super`. +# +# source://solargraph//lib/solargraph/source/chain/head.rb#10 +class Solargraph::Source::Chain::Head < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/head.rb#11 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/instance_variable.rb#6 +class Solargraph::Source::Chain::InstanceVariable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/instance_variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/link.rb#6 +class Solargraph::Source::Chain::Link + # @return [Link] a new instance of Link + # + # source://solargraph//lib/solargraph/source/chain/link.rb#12 + def initialize(word = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/source/chain/link.rb#36 + def ==(other); end + + # Make a copy of this link unmarked as the head of a chain + # + # @return [self] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#50 + def clone_body; end + + # Make a copy of this link marked as the head of a chain + # + # @return [self] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#43 + def clone_head; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#20 + def constant?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#32 + def head?; end + + # Returns the value of attribute last_context. + # + # source://solargraph//lib/solargraph/source/chain/link.rb#10 + def last_context; end + + # Sets the attribute last_context + # + # @param value the value to set the attribute last_context to. + # + # source://solargraph//lib/solargraph/source/chain/link.rb#10 + def last_context=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#54 + def nullable?; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array] + # @return [Array] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#28 + def resolve(api_map, name_pin, locals); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#16 + def undefined?; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#8 + def word; end + + protected + + # Mark whether this link is the head of a chain + # + # @param bool [Boolean] + # @return [self] + # + # source://solargraph//lib/solargraph/source/chain/link.rb#64 + def mark_head(bool); end +end + +# source://solargraph//lib/solargraph/source/chain/literal.rb#6 +class Solargraph::Source::Chain::Literal < ::Solargraph::Source::Chain::Link + # @param type [String] + # @return [Literal] a new instance of Literal + # + # source://solargraph//lib/solargraph/source/chain/literal.rb#12 + def initialize(type); end + + # source://solargraph//lib/solargraph/source/chain/literal.rb#17 + def resolve(api_map, name_pin, locals); end + + # source://solargraph//lib/solargraph/source/chain/literal.rb#7 + def word; end +end + +# source://solargraph//lib/solargraph/source/chain/or.rb#6 +class Solargraph::Source::Chain::Or < ::Solargraph::Source::Chain::Link + # @param type [String] + # @return [Or] a new instance of Or + # + # source://solargraph//lib/solargraph/source/chain/or.rb#12 + def initialize(links); end + + # source://solargraph//lib/solargraph/source/chain/or.rb#16 + def resolve(api_map, name_pin, locals); end + + # source://solargraph//lib/solargraph/source/chain/or.rb#7 + def word; end +end + +# source://solargraph//lib/solargraph/source/chain/q_call.rb#4 +class Solargraph::Source::Chain::QCall < ::Solargraph::Source::Chain::Call + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/chain/q_call.rb#5 + def nullable?; end +end + +# source://solargraph//lib/solargraph/source/chain.rb#30 +Solargraph::Source::Chain::UNDEFINED_CALL = T.let(T.unsafe(nil), Solargraph::Source::Chain::Call) + +# source://solargraph//lib/solargraph/source/chain.rb#31 +Solargraph::Source::Chain::UNDEFINED_CONSTANT = T.let(T.unsafe(nil), Solargraph::Source::Chain::Constant) + +# source://solargraph//lib/solargraph/source/chain/variable.rb#6 +class Solargraph::Source::Chain::Variable < ::Solargraph::Source::Chain::Link + # source://solargraph//lib/solargraph/source/chain/variable.rb#7 + def resolve(api_map, name_pin, locals); end +end + +# source://solargraph//lib/solargraph/source/chain/z_super.rb#6 +class Solargraph::Source::Chain::ZSuper < ::Solargraph::Source::Chain::Call + # @param word [String] + # @param arguments [Array] + # @param with_block [Boolean] True if the chain is inside a block + # @param head [Boolean] True if the call is the start of its chain + # @return [ZSuper] a new instance of ZSuper + # + # source://solargraph//lib/solargraph/source/chain/z_super.rb#17 + def initialize(word, with_block = T.unsafe(nil)); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source/chain/z_super.rb#11 + def arguments; end + + # @param api_map [ApiMap] + # @param name_pin [Pin::Base] + # @param locals [Array] + # + # source://solargraph//lib/solargraph/source/chain/z_super.rb#24 + def resolve(api_map, name_pin, locals); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/chain/z_super.rb#8 + def word; end +end + +# A change to be applied to text. +# +# source://solargraph//lib/solargraph/source/change.rb#7 +class Solargraph::Source::Change + include ::Solargraph::Source::EncodingFixes + + # @param range [Range] The starting and ending positions of the change. + # If nil, the original text will be overwritten. + # @param new_text [String] The text to be changed. + # @return [Change] a new instance of Change + # + # source://solargraph//lib/solargraph/source/change.rb#19 + def initialize(range, new_text); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/change.rb#14 + def new_text; end + + # @return [Range] + # + # source://solargraph//lib/solargraph/source/change.rb#11 + def range; end + + # Repair an update by replacing the new text with similarly formatted + # whitespace. + # + # @param text [String] The text to be changed. + # @return [String] The updated text. + # + # source://solargraph//lib/solargraph/source/change.rb#55 + def repair(text); end + + # Write the change to the specified text. + # + # @param text [String] The text to be changed. + # @param nullable [Boolean] If true, minor changes that could generate + # syntax errors will be repaired. + # @return [String] The updated text. + # + # source://solargraph//lib/solargraph/source/change.rb#30 + def write(text, nullable = T.unsafe(nil)); end + + private + + # source://solargraph//lib/solargraph/source/change.rb#72 + def commit(text, insert); end +end + +# Information about a position in a source, including the word located +# there. +# +# source://solargraph//lib/solargraph/source/cursor.rb#8 +class Solargraph::Source::Cursor + # @param source [Source] + # @param position [Position, Array(Integer, Integer)] + # @return [Cursor] a new instance of Cursor + # + # source://solargraph//lib/solargraph/source/cursor.rb#17 + def initialize(source, position); end + + # True if the statement at the cursor is an argument to a previous + # method. + # + # Given the code `process(foo)`, a cursor pointing at `foo` would + # identify it as an argument being passed to the `process` method. + # + # If #argument? is true, the #recipient method will return a cursor that + # points to the method receiving the argument. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/cursor.rb#91 + def argument?; end + + # @return [Chain] + # + # source://solargraph//lib/solargraph/source/cursor.rb#77 + def chain; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/cursor.rb#97 + def comment?; end + + # The part of the word after the current position. Given the text + # `foo.bar`, the end_of_word at position (0,6) is `r`. + # + # @return [String] + # + # source://solargraph//lib/solargraph/source/cursor.rb#53 + def end_of_word; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/cursor.rb#23 + def filename; end + + # source://solargraph//lib/solargraph/source/cursor.rb#118 + def node; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/source/cursor.rb#123 + def node_position; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/source/cursor.rb#143 + def offset; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/source/cursor.rb#10 + def position; end + + # The range of the word at the current position. + # + # @return [Range] + # + # source://solargraph//lib/solargraph/source/cursor.rb#68 + def range; end + + # Get a cursor pointing to the method that receives the current statement + # as an argument. + # + # @return [Cursor, nil] + # + # source://solargraph//lib/solargraph/source/cursor.rb#110 + def receiver; end + + # Get a cursor pointing to the method that receives the current statement + # as an argument. + # + # @return [Cursor, nil] + # + # source://solargraph//lib/solargraph/source/cursor.rb#110 + def recipient; end + + # source://solargraph//lib/solargraph/source/cursor.rb#138 + def recipient_node; end + + # @return [Source] + # + # source://solargraph//lib/solargraph/source/cursor.rb#13 + def source; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/cursor.rb#61 + def start_of_constant?; end + + # The part of the word before the current position. Given the text + # `foo.bar`, the start_of_word at position(0, 6) is `ba`. + # + # @return [String] + # + # source://solargraph//lib/solargraph/source/cursor.rb#39 + def start_of_word; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/cursor.rb#102 + def string?; end + + # The whole word at the current position. Given the text `foo.bar`, the + # word at position(0,6) is `bar`. + # + # @return [String] + # + # source://solargraph//lib/solargraph/source/cursor.rb#31 + def word; end + + private + + # A regular expression to find the end of a word from an offset. + # + # @return [Regexp] + # + # source://solargraph//lib/solargraph/source/cursor.rb#159 + def end_word_pattern; end + + # A regular expression to find the start of a word from an offset. + # + # @return [Regexp] + # + # source://solargraph//lib/solargraph/source/cursor.rb#152 + def start_word_pattern; end +end + +# source://solargraph//lib/solargraph/source/encoding_fixes.rb#5 +module Solargraph::Source::EncodingFixes + private + + # Convert strings to normalized UTF-8. + # + # @param string [String] + # @return [String] + # + # source://solargraph//lib/solargraph/source/encoding_fixes.rb#12 + def normalize(string); end + + class << self + # Convert strings to normalized UTF-8. + # + # @param string [String] + # @return [String] + # + # source://solargraph//lib/solargraph/source/encoding_fixes.rb#12 + def normalize(string); end + end +end + +# source://solargraph//lib/solargraph/source.rb#272 +Solargraph::Source::FOLDING_NODE_TYPES = T.let(T.unsafe(nil), Array) + +# Information about a location in a source, including the location's word +# and signature, literal values at the base of signatures, and whether the +# location is inside a string or comment. ApiMaps use Fragments to provide +# results for completion and definition queries. +# +# source://solargraph//lib/solargraph/source/source_chainer.rb#10 +class Solargraph::Source::SourceChainer + # @param source [Source] + # @param position [Position] + # @return [SourceChainer] a new instance of SourceChainer + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#26 + def initialize(source, position); end + + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#33 + def chain; end + + private + + # @return [String] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#98 + def end_of_phrase; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#88 + def fixed_phrase; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#93 + def fixed_position; end + + # @param line [Integer] + # @param column [Integer] + # @return [Integer] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#125 + def get_offset(line, column); end + + # source://solargraph//lib/solargraph/source/source_chainer.rb#133 + def get_signature_data_at(index); end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#118 + def offset; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#83 + def phrase; end + + # @return [Position] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#77 + def position; end + + # source://solargraph//lib/solargraph/source/source_chainer.rb#129 + def signature_data; end + + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#80 + def source; end + + # True if the current offset is inside a string. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#112 + def string?; end + + class << self + # @param source [Source] + # @param position [Position] + # @return [Source::Chain] + # + # source://solargraph//lib/solargraph/source/source_chainer.rb#19 + def chain(source, position); end + + private + + def new(*_arg0); end + end +end + +# Updaters contain changes to be applied to a source. The source applies +# the update via the Source#synchronize method. +# +# source://solargraph//lib/solargraph/source/updater.rb#8 +class Solargraph::Source::Updater + # @param filename [String] The file to update. + # @param version [Integer] A version number associated with this update. + # @param changes [Array] The changes. + # @return [Updater] a new instance of Updater + # + # source://solargraph//lib/solargraph/source/updater.rb#21 + def initialize(filename, version, changes); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source/updater.rb#16 + def changes; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/updater.rb#10 + def filename; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source/updater.rb#46 + def repair(text); end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/source/updater.rb#13 + def version; end + + # @param text [String] + # @param nullable [Boolean] + # @return [String] + # + # source://solargraph//lib/solargraph/source/updater.rb#33 + def write(text, nullable = T.unsafe(nil)); end +end + +# An index of pins and other ApiMap-related data for a Source. +# +# source://solargraph//lib/solargraph/source_map.rb#10 +class Solargraph::SourceMap + # @param source [Source] + # @param pins [Array] + # @param locals [Array] + # @return [SourceMap] a new instance of SourceMap + # + # source://solargraph//lib/solargraph/source_map.rb#27 + def initialize(source, pins, locals); end + + # @return [String] + # + # source://solargraph//lib/solargraph/source_map.rb#54 + def code; end + + # @param position [Position] + # @return [Source::Cursor] + # + # source://solargraph//lib/solargraph/source_map.rb#83 + def cursor_at(position); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map.rb#69 + def document_symbols; end + + # @return [Environ] + # + # source://solargraph//lib/solargraph/source_map.rb#64 + def environ; end + + # @return [String] + # + # source://solargraph//lib/solargraph/source_map.rb#49 + def filename; end + + # @param path [String] + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/source_map.rb#89 + def first_pin(path); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map.rb#22 + def locals; end + + # @param location [Location] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map.rb#130 + def locals_at(location); end + + # source://solargraph//lib/solargraph/source_map.rb#104 + def locate_block_pin(line, character); end + + # source://solargraph//lib/solargraph/source_map.rb#100 + def locate_named_path_pin(line, character); end + + # @param location [Solargraph::Location] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map.rb#95 + def locate_pins(location); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map.rb#19 + def pins; end + + # source://solargraph//lib/solargraph/source_map.rb#37 + def pins_by_class(klass); end + + # @param query [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map.rb#77 + def query_symbols(query); end + + # source://solargraph//lib/solargraph/source_map.rb#41 + def rebindable_method_names; end + + # @param name [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map.rb#124 + def references(name); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map.rb#59 + def requires; end + + # @return [Source] + # + # source://solargraph//lib/solargraph/source_map.rb#16 + def source; end + + # @param other_map [SourceMap] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source_map.rb#110 + def try_merge!(other_map); end + + private + + # @param line [Integer] + # @param character [Integer] + # @param klasses [Array] + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/source_map.rb#166 + def _locate_pin(line, character, *klasses); end + + class << self + # @param filename [String] + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/source_map.rb#139 + def load(filename); end + + # @param code [String] + # @param filename [String, nil] + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/source_map.rb#147 + def load_string(code, filename = T.unsafe(nil)); end + + # @param source [Source] + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/source_map.rb#154 + def map(source); end + end +end + +# A static analysis tool for obtaining definitions, completions, +# signatures, and type inferences from a cursor. +# +# source://solargraph//lib/solargraph/source_map/clip.rb#8 +class Solargraph::SourceMap::Clip + # @param api_map [ApiMap] + # @param cursor [Source::Cursor] + # @return [Clip] a new instance of Clip + # + # source://solargraph//lib/solargraph/source_map/clip.rb#11 + def initialize(api_map, cursor); end + + # @return [Completion] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#25 + def complete; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#17 + def define; end + + # source://solargraph//lib/solargraph/source_map/clip.rb#59 + def gates; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#63 + def in_block?; end + + # @return [ComplexType] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#44 + def infer; end + + # Get an array of all the locals that are visible from the cursors's + # position. Locals can be local variables, method parameters, or block + # parameters. The array starts with the nearest local pin. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#55 + def locals; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#37 + def signify; end + + # @param phrase [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#73 + def translate(phrase); end + + private + + # @return [ApiMap] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#81 + def api_map; end + + # @return [Solargraph::Pin::Base] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#96 + def block; end + + # source://solargraph//lib/solargraph/source_map/clip.rb#175 + def code_complete; end + + # @return [Array] + # @return [Completion] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#148 + def package_completions(result); end + + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#87 + def source_map; end + + # source://solargraph//lib/solargraph/source_map/clip.rb#157 + def tag_complete; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/clip.rb#108 + def yielded_self_pins; end +end + +# The result of a completion request containing the pins that describe +# completion options and the range to be replaced. +# +# source://solargraph//lib/solargraph/source_map/completion.rb#8 +class Solargraph::SourceMap::Completion + # @param pins [Array] + # @param range [Solargraph::Range] + # @return [Completion] a new instance of Completion + # + # source://solargraph//lib/solargraph/source_map/completion.rb#17 + def initialize(pins, range); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/completion.rb#10 + def pins; end + + # @return [Solargraph::Range] + # + # source://solargraph//lib/solargraph/source_map/completion.rb#13 + def range; end +end + +# The Mapper generates pins and other data for SourceMaps. +# +# This class is used internally by the SourceMap class. Users should not +# normally need to call it directly. +# +# source://solargraph//lib/solargraph/source_map/mapper.rb#10 +class Solargraph::SourceMap::Mapper + # @param position [Solargraph::Position] + # @return [Solargraph::Pin::Closure] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#61 + def closure_at(position); end + + # @param comment [String] + # @return [Integer] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#81 + def find_directive_line_number(comment, tag, start); end + + # Generate the data. + # + # @param source [Source] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#21 + def map(source); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#202 + def no_empty_lines?(line1, line2); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#55 + def pins; end + + # source://solargraph//lib/solargraph/source_map/mapper.rb#65 + def process_comment(source_position, comment_position, comment); end + + # @return [void] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#226 + def process_comment_directives; end + + # @param source_position [Position] + # @param comment_position [Position] + # @param directive [YARD::Tags::Directive] + # @return [void] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#96 + def process_directive(source_position, comment_position, directive); end + + # source://solargraph//lib/solargraph/source_map/mapper.rb#206 + def remove_inline_comment_hashes(comment); end + + # @param filename [String] + # @param code [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#38 + def unmap(filename, code); end + + class << self + # @param source [Source] + # @return [Array] + # + # source://solargraph//lib/solargraph/source_map/mapper.rb#48 + def map(source); end + + private + + def new(*_arg0); end + end +end + +# source://solargraph//lib/solargraph/source_map/mapper.rb#15 +Solargraph::SourceMap::Mapper::MACRO_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://solargraph//lib/solargraph.rb#15 +class Solargraph::SourceNotAvailableError < ::StandardError; end + +# A static analysis tool for validating data types. +# +# source://solargraph//lib/solargraph/type_checker.rb#6 +class Solargraph::TypeChecker + include ::Solargraph::TypeChecker::Checks + include ::Solargraph::Parser::Rubyvm::NodeMethods + + # @param filename [String] + # @param api_map [ApiMap] + # @param level [Symbol] + # @return [TypeChecker] a new instance of TypeChecker + # + # source://solargraph//lib/solargraph/type_checker.rb#27 + def initialize(filename, api_map: T.unsafe(nil), level: T.unsafe(nil)); end + + # @return [ApiMap] + # + # source://solargraph//lib/solargraph/type_checker.rb#22 + def api_map; end + + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker.rb#16 + def filename; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/type_checker.rb#41 + def problems; end + + # @return [Rules] + # + # source://solargraph//lib/solargraph/type_checker.rb#19 + def rules; end + + # @return [SourceMap] + # + # source://solargraph//lib/solargraph/type_checker.rb#36 + def source_map; end + + private + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#511 + def abstract?(pin); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/type_checker.rb#201 + def all_variables; end + + # source://solargraph//lib/solargraph/type_checker.rb#257 + def argument_problems_for(chain, api_map, block_pin, locals, location); end + + # @param pin [Pin::Method] + # + # source://solargraph//lib/solargraph/type_checker.rb#421 + def arity_problems_for(pin, arguments, location); end + + # source://solargraph//lib/solargraph/type_checker.rb#223 + def call_problems; end + + # source://solargraph//lib/solargraph/type_checker.rb#205 + def const_problems; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#393 + def declared_externally?(pin); end + + # @param pin [Pin::Base] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#389 + def external?(pin); end + + # source://solargraph//lib/solargraph/type_checker.rb#516 + def fake_args_for(pin); end + + # @param [Array] + # @return [Hash] + # + # source://solargraph//lib/solargraph/type_checker.rb#370 + def first_param_hash(pins); end + + # source://solargraph//lib/solargraph/type_checker.rb#158 + def ignored_pins; end + + # @param pin [Pin::Base] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#379 + def internal?(pin); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#384 + def internal_or_core?(pin); end + + # source://solargraph//lib/solargraph/type_checker.rb#310 + def kwarg_problems_for(argchain, api_map, block_pin, locals, location, pin, params, first); end + + # source://solargraph//lib/solargraph/type_checker.rb#339 + def kwrestarg_problems_for(api_map, block_pin, locals, location, pin, params, kwargs); end + + # @param pin [Pin::Method] + # @return [Array] + # + # source://solargraph//lib/solargraph/type_checker.rb#137 + def method_param_type_problems_for(pin); end + + # @param pin [Pin::Method] + # @return [Array] + # + # source://solargraph//lib/solargraph/type_checker.rb#88 + def method_return_type_problems_for(pin); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/type_checker.rb#76 + def method_tag_problems; end + + # @param pin [Pin::Method] + # + # source://solargraph//lib/solargraph/type_checker.rb#502 + def optional_param_count(pin); end + + # @param [Pin::Method] + # @return [Hash] + # + # source://solargraph//lib/solargraph/type_checker.rb#354 + def param_hash(pin); end + + # @param pin [Pin::Method] + # + # source://solargraph//lib/solargraph/type_checker.rb#430 + def pin_arity_problems_for(pin, arguments, location); end + + # @param pin [Pin::Method] + # + # source://solargraph//lib/solargraph/type_checker.rb#497 + def required_param_count(pin); end + + # @param pin [Pin::Base] + # @return [Boolean] + # @todo This is not optimal. A better solution would probably be to mix + # namespace alias into types at the ApiMap level. + # + # source://solargraph//lib/solargraph/type_checker.rb#122 + def resolved_constant?(pin); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/type_checker.rb#163 + def variable_type_tag_problems; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker.rb#131 + def virtual_pin?(pin); end + + # source://solargraph//lib/solargraph/type_checker.rb#536 + def without_ignored(problems); end + + class << self + # @param filename [String] + # @return [self] + # + # source://solargraph//lib/solargraph/type_checker.rb#55 + def load(filename, level = T.unsafe(nil)); end + + # @param code [String] + # @param filename [String, nil] + # @return [self] + # + # source://solargraph//lib/solargraph/type_checker.rb#65 + def load_string(code, filename = T.unsafe(nil), level = T.unsafe(nil)); end + end +end + +# Helper methods for performing type checks +# +# source://solargraph//lib/solargraph/type_checker/checks.rb#7 +module Solargraph::TypeChecker::Checks + private + + # @param api_map [ApiMap] + # @param inferred [ComplexType] + # @param expected [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#68 + def all_types_match?(api_map, inferred, expected); end + + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#52 + def any_types_match?(api_map, expected, inferred); end + + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#81 + def duck_types_match?(api_map, expected, inferred); end + + # @param api_map [ApiMap] + # @param cls1 [ComplexType::UniqueType] + # @param cls2 [ComplexType::UniqueType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#105 + def either_way?(api_map, cls1, cls2); end + + # @param type [ComplexType::UniqueType] + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#93 + def fuzz(type); end + + # Compare an expected type with an inferred type. Common usage is to + # check if the type declared in a method's @return tag matches the type + # inferred from static analysis of the code. + # + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#18 + def types_match?(api_map, expected, inferred); end + + class << self + # @param api_map [ApiMap] + # @param inferred [ComplexType] + # @param expected [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#68 + def all_types_match?(api_map, inferred, expected); end + + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#52 + def any_types_match?(api_map, expected, inferred); end + + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @raise [ArgumentError] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#81 + def duck_types_match?(api_map, expected, inferred); end + + # @param api_map [ApiMap] + # @param cls1 [ComplexType::UniqueType] + # @param cls2 [ComplexType::UniqueType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#105 + def either_way?(api_map, cls1, cls2); end + + # @param type [ComplexType::UniqueType] + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#93 + def fuzz(type); end + + # Compare an expected type with an inferred type. Common usage is to + # check if the type declared in a method's @return tag matches the type + # inferred from static analysis of the code. + # + # @param api_map [ApiMap] + # @param expected [ComplexType] + # @param inferred [ComplexType] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/checks.rb#18 + def types_match?(api_map, expected, inferred); end + end +end + +# Data about a method parameter definition. This is the information from +# the args list in the def call, not the `@param` tags. +# +# source://solargraph//lib/solargraph/type_checker/param_def.rb#8 +class Solargraph::TypeChecker::ParamDef + # @return [ParamDef] a new instance of ParamDef + # + # source://solargraph//lib/solargraph/type_checker/param_def.rb#15 + def initialize(name, type); end + + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker/param_def.rb#10 + def name; end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/type_checker/param_def.rb#13 + def type; end + + class << self + # Get an array of ParamDefs from a method pin. + # + # @param pin [Solargraph::Pin::Method] + # @return [Array] + # + # source://solargraph//lib/solargraph/type_checker/param_def.rb#25 + def from(pin); end + end +end + +# A problem reported by TypeChecker. +# +# source://solargraph//lib/solargraph/type_checker/problem.rb#7 +class Solargraph::TypeChecker::Problem + # @param location [Solargraph::Location] + # @param message [String] + # @param pin [Solargraph::Pin::Base, nil] + # @param suggestion [String, nil] + # @return [Problem] a new instance of Problem + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#24 + def initialize(location, message, pin: T.unsafe(nil), suggestion: T.unsafe(nil)); end + + # @return [Solargraph::Location] + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#9 + def location; end + + # @return [String] + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#12 + def message; end + + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#15 + def pin; end + + # @return [String, nil] + # + # source://solargraph//lib/solargraph/type_checker/problem.rb#18 + def suggestion; end +end + +# Definitions of type checking rules to be performed at various levels +# +# source://solargraph//lib/solargraph/type_checker/rules.rb#7 +class Solargraph::TypeChecker::Rules + # @param level [Symbol] + # @return [Rules] a new instance of Rules + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#22 + def initialize(level); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#32 + def ignore_all_undefined?; end + + # @return [Symbol] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#16 + def level; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#48 + def must_tag_or_infer?; end + + # @return [Integer] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#19 + def rank; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#44 + def require_type_tags?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#40 + def validate_calls?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#36 + def validate_consts?; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/type_checker/rules.rb#52 + def validate_tags?; end +end + +# source://solargraph//lib/solargraph/type_checker/rules.rb#8 +Solargraph::TypeChecker::Rules::LEVELS = T.let(T.unsafe(nil), Hash) + +# source://solargraph//lib/solargraph/version.rb#4 +Solargraph::VERSION = T.let(T.unsafe(nil), String) + +# source://solargraph//lib/solargraph.rb#48 +Solargraph::VIEWS_PATH = T.let(T.unsafe(nil), String) + +# A workspace consists of the files in a project's directory and the +# project's configuration. It provides a Source for each file to be used +# in an associated Library or ApiMap. +# +# source://solargraph//lib/solargraph/workspace.rb#12 +class Solargraph::Workspace + # @param directory [String] + # @param config [Config, nil] + # @return [Workspace] a new instance of Workspace + # + # source://solargraph//lib/solargraph/workspace.rb#29 + def initialize(directory = T.unsafe(nil), config = T.unsafe(nil)); end + + # @return [Solargraph::Workspace::Config] + # + # source://solargraph//lib/solargraph/workspace.rb#39 + def config; end + + # @return [String] + # + # source://solargraph//lib/solargraph/workspace.rb#16 + def directory; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace.rb#81 + def filenames; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace.rb#24 + def gemnames; end + + # True if the workspace contains at least one gemspec file. + # + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace.rb#118 + def gemspec?; end + + # Get an array of all gemspec files in the workspace. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace.rb#125 + def gemspecs; end + + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace.rb#92 + def has_file?(filename); end + + # Merge the source. A merge will update the existing source for the file + # or add it to the sources if the workspace is configured to include it. + # The source is ignored if the configuration excludes it. + # + # @param source [Solargraph::Source] + # @return [Boolean] True if the source was added to the workspace + # + # source://solargraph//lib/solargraph/workspace.rb#49 + def merge(source); end + + # Remove a source from the workspace. The source will not be removed if + # its file exists and the workspace is configured to include it. + # + # @param filename [String] + # @return [Boolean] True if the source was removed from the workspace + # + # source://solargraph//lib/solargraph/workspace.rb#74 + def remove(filename); end + + # The require paths associated with the workspace. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace.rb#21 + def require_paths; end + + # Get a source by its filename. + # + # @param filename [String] + # @return [Solargraph::Source] + # + # source://solargraph//lib/solargraph/workspace.rb#100 + def source(filename); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace.rb#24 + def source_gems; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace.rb#86 + def sources; end + + # Synchronize the workspace from the provided updater. + # + # @param updater [Source::Updater] + # @return [void] + # + # source://solargraph//lib/solargraph/workspace.rb#136 + def synchronize!(updater); end + + # Determine whether a file would be merged into the workspace. + # + # @param filename [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace.rb#63 + def would_merge?(filename); end + + # True if the path resolves to a file in the workspace's require paths. + # + # @param path [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace.rb#108 + def would_require?(path); end + + private + + # Get additional require paths defined in the configuration. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace.rb#199 + def configured_require_paths; end + + # Generate require paths from gemspecs if they exist or assume the default + # lib directory. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace.rb#167 + def generate_require_paths; end + + # @return [void] + # + # source://solargraph//lib/solargraph/workspace.rb#148 + def load_sources; end + + # source://solargraph//lib/solargraph/workspace.rb#205 + def require_plugins; end + + # @return [Hash{String => Solargraph::Source}] + # + # source://solargraph//lib/solargraph/workspace.rb#143 + def source_hash; end +end + +# Configuration data for a workspace. +# +# source://solargraph//lib/solargraph/workspace/config.rb#9 +class Solargraph::Workspace::Config + # @param directory [String] + # @return [Config] a new instance of Config + # + # source://solargraph//lib/solargraph/workspace/config.rb#21 + def initialize(directory = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace/config.rb#44 + def allow?(filename); end + + # The calculated array of (included - excluded) files in the workspace. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#53 + def calculated; end + + # @return [String] + # + # source://solargraph//lib/solargraph/workspace/config.rb#15 + def directory; end + + # An array of domains configured for the workspace. + # A domain is a namespace that the ApiMap should include in the global + # namespace. It's typically used to identify available DSLs. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#63 + def domains; end + + # An array of files excluded from the workspace. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#39 + def excluded; end + + # A hash of options supported by the formatter + # + # @return [Hash] + # + # source://solargraph//lib/solargraph/workspace/config.rb#91 + def formatter; end + + # An array of files included in the workspace (before calculating excluded files). + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#31 + def included; end + + # The maximum number of files to parse from the workspace. + # + # @return [Integer] + # + # source://solargraph//lib/solargraph/workspace/config.rb#105 + def max_files; end + + # An array of plugins to require. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#98 + def plugins; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/workspace/config.rb#18 + def raw_data; end + + # An array of reporters to use for diagnostics. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#84 + def reporters; end + + # An array of load paths for required paths. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#77 + def require_paths; end + + # An array of required paths to add to the workspace. + # + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#70 + def required; end + + private + + # @return [Hash] + # + # source://solargraph//lib/solargraph/workspace/config.rb#124 + def config_data; end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/workspace/config.rb#147 + def default_config; end + + # source://solargraph//lib/solargraph/workspace/config.rb#224 + def excluded_directories; end + + # True if the glob translates to a whole directory. + # + # @example + # glob_is_directory?('path/to/dir') # => true + # glob_is_directory?('path/to/dir/**/*) # => true + # glob_is_directory?('path/to/file.txt') # => false + # glob_is_directory?('path/to/*.txt') # => false + # @param glob [String] + # @return [Boolean] + # + # source://solargraph//lib/solargraph/workspace/config.rb#209 + def glob_is_directory?(glob); end + + # Translate a glob to a base directory if applicable + # + # @example + # glob_to_directory('path/to/dir/**/*') # => 'path/to/dir' + # @param glob [String] + # @return [String] + # + # source://solargraph//lib/solargraph/workspace/config.rb#220 + def glob_to_directory(glob); end + + # @return [String] + # + # source://solargraph//lib/solargraph/workspace/config.rb#112 + def global_config_path; end + + # Modify the included files based on excluded directories and get an + # array of additional files to exclude. + # + # @param globs [Array] + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#186 + def process_exclusions(globs); end + + # Get an array of files from the provided globs. + # + # @param globs [Array] + # @return [Array] + # + # source://solargraph//lib/solargraph/workspace/config.rb#172 + def process_globs(globs); end + + # Read a .solargraph yaml config + # + # @param directory [String] + # @return [Hash, nil] + # + # source://solargraph//lib/solargraph/workspace/config.rb#140 + def read_config(config_path = T.unsafe(nil)); end + + # @return [String] + # + # source://solargraph//lib/solargraph/workspace/config.rb#118 + def workspace_config_path; end +end + +# The maximum number of files that can be added to a workspace. +# The workspace's .solargraph.yml can override this value. +# +# source://solargraph//lib/solargraph/workspace/config.rb#12 +Solargraph::Workspace::Config::MAX_FILES = T.let(T.unsafe(nil), Integer) + +# source://solargraph//lib/solargraph.rb#17 +class Solargraph::WorkspaceTooLargeError < ::RuntimeError; end + +# source://solargraph//lib/solargraph.rb#46 +Solargraph::YARDOC_PATH = T.let(T.unsafe(nil), String) + +# source://solargraph//lib/solargraph.rb#47 +Solargraph::YARD_EXTENSION_FILE = T.let(T.unsafe(nil), String) + +# The YardMap provides access to YARD documentation for the Ruby core, the +# stdlib, and gems. +# +# source://solargraph//lib/solargraph/yard_map.rb#12 +class Solargraph::YardMap + include ::Solargraph::ApiMap::BundlerMethods + + # @param required [Array, Set] + # @param directory [String] + # @param source_gems [Array, Set] + # @param with_dependencies [Boolean] + # @return [YardMap] a new instance of YardMap + # + # source://solargraph//lib/solargraph/yard_map.rb#51 + def initialize(required: T.unsafe(nil), directory: T.unsafe(nil), source_gems: T.unsafe(nil), with_dependencies: T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/yard_map.rb#162 + def base_required; end + + # @param new_requires [Set] Required paths to use for loading gems + # @param new_directory [String] The workspace directory + # @param new_source_gems [Set] Gems under local development (i.e., part of the workspace) + # @return [Boolean] + # + # source://solargraph//lib/solargraph/yard_map.rb#70 + def change(new_requires, new_directory, new_source_gems); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map.rb#130 + def core_pins; end + + # source://solargraph//lib/solargraph/yard_map.rb#166 + def directory; end + + # @param y [String] + # @return [YARD::Registry] + # + # source://solargraph//lib/solargraph/yard_map.rb#117 + def load_yardoc(y); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map.rb#111 + def missing_docs; end + + # @param path [String] + # @return [Pin::Base] + # + # source://solargraph//lib/solargraph/yard_map.rb#137 + def path_pin(path); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map.rb#57 + def pins; end + + # @return [Set] + # + # source://solargraph//lib/solargraph/yard_map.rb#87 + def rebindable_method_names; end + + # Get the location of a file referenced by a require path. + # + # @param path [String] + # @return [Location] + # + # source://solargraph//lib/solargraph/yard_map.rb#145 + def require_reference(path); end + + # @return [Set] + # + # source://solargraph//lib/solargraph/yard_map.rb#101 + def required; end + + # source://solargraph//lib/solargraph/yard_map.rb#29 + def stdlib_paths; end + + # source://solargraph//lib/solargraph/yard_map.rb#158 + def stdlib_pins; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map.rb#106 + def unresolved_requires; end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/yard_map.rb#45 + def with_dependencies=(_arg0); end + + # @return [Boolean] + # + # source://solargraph//lib/solargraph/yard_map.rb#61 + def with_dependencies?; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map.rb#96 + def yardocs; end + + private + + # @return [YardMap::Cache] + # + # source://solargraph//lib/solargraph/yard_map.rb#173 + def cache; end + + # source://solargraph//lib/solargraph/yard_map.rb#359 + def load_core_pins; end + + # source://solargraph//lib/solargraph/yard_map.rb#401 + def load_stdlib_pins(base); end + + # @return [Hash] + # + # source://solargraph//lib/solargraph/yard_map.rb#178 + def pin_class_hash; end + + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map.rb#183 + def pins_by_class(klass); end + + # @param r [String] + # + # source://solargraph//lib/solargraph/yard_map.rb#254 + def pins_for_require(r, already_errored); end + + # source://solargraph//lib/solargraph/yard_map.rb#233 + def process_error(req, result, already_errored, yd = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/yard_map.rb#248 + def process_gemsets; end + + # @return [void] + # + # source://solargraph//lib/solargraph/yard_map.rb#199 + def process_requires; end + + # @param y [String, nil] + # @param spec [Gem::Specification, nil] + # @raise [NoYardocError] + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map.rb#288 + def process_yardoc(y, spec = T.unsafe(nil)); end + + # source://solargraph//lib/solargraph/yard_map.rb#379 + def read_core_and_save_cache(yd, ser); end + + # source://solargraph//lib/solargraph/yard_map.rb#425 + def read_stdlib_and_save_cache(base, ser); end + + # @param ns [YARD::CodeObjects::NamespaceObject] + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map.rb#189 + def recurse_namespace_object(ns); end + + # @param path [String] + # @return [Gem::Specification] + # + # source://solargraph//lib/solargraph/yard_map.rb#342 + def spec_for_require(path); end + + # @param spec [Gem::Specification] + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map.rb#330 + def yardoc_file_for_spec(spec); end +end + +# source://solargraph//lib/solargraph/yard_map/cache.rb#5 +class Solargraph::YardMap::Cache + # @return [Cache] a new instance of Cache + # + # source://solargraph//lib/solargraph/yard_map/cache.rb#6 + def initialize; end + + # source://solargraph//lib/solargraph/yard_map/cache.rb#14 + def get_path_pins(path); end + + # source://solargraph//lib/solargraph/yard_map/cache.rb#10 + def set_path_pins(path, pins); end +end + +# Tools for managing core documentation. +# +# source://solargraph//lib/solargraph/yard_map/core_docs.rb#12 +module Solargraph::YardMap::CoreDocs + class << self + # Get a list of core documentation versions that are available for + # download. + # + # @raise [SourceNotAvailableError] + # @return [Array] The version numbers + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#80 + def available; end + + # Get the version number of core documentation available for download + # that is the closest match for the current Ruby version. + # + # @param current [String] The version to compare + # @return [String] The version number of the best match + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#93 + def best_download(current = T.unsafe(nil)); end + + # Get the version number of the installed core documentation that is + # the closest match for the current Ruby version. + # + # @return [String] The closest match + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#67 + def best_match; end + + # The directory where core documentation is installed. + # + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#23 + def cache_dir; end + + # Reset the core documentation cache to the minimum requirement. + # + # @return [void] + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#141 + def clear; end + + # Download the specified version of core documentation. + # + # @param version [String] + # @return [void] + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#124 + def download(version); end + + # Ensure installation of minimum documentation. + # + # @return [void] + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#32 + def require_minimum; end + + # True if core documentation is installed for the specified version + # number. + # + # @param ver [String] The version number to check + # @return [Boolean] + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#44 + def valid?(ver); end + + # Get a list of version numbers for currently installed core + # documentation. + # + # @return [Array] The installed version numbers + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#56 + def versions; end + + # Get the path to a yardoc file for Ruby core documentation. + # + # @param ver [String] The version number (best match is default) + # @raise [ArgumentError] + # @return [String] The path to the yardoc + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#106 + def yardoc_file(ver = T.unsafe(nil)); end + + # Get the path to a yardoc file for Ruby stdlib documentation. + # + # @param ver [String] The version number (best match is default) + # @raise [ArgumentError] + # @return [String] The path to the yardoc + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#115 + def yardoc_stdlib_file(ver = T.unsafe(nil)); end + + private + + # Extract the specified archive to the core cache directory. + # + # @param filename [String] + # @return [void] + # + # source://solargraph//lib/solargraph/yard_map/core_docs.rb#152 + def install_archive(filename); end + end +end + +# The default core documentation version +# +# source://solargraph//lib/solargraph/yard_map/core_docs.rb#17 +Solargraph::YardMap::CoreDocs::DEFAULT = T.let(T.unsafe(nil), String) + +# The URL for downloading core documentation +# +# source://solargraph//lib/solargraph/yard_map/core_docs.rb#14 +Solargraph::YardMap::CoreDocs::SOURCE = T.let(T.unsafe(nil), String) + +# source://solargraph//lib/solargraph/yard_map/core_fills.rb#3 +module Solargraph::YardMap::CoreFills; end + +# source://solargraph//lib/solargraph/yard_map/core_fills.rb#205 +Solargraph::YardMap::CoreFills::ALL = T.let(T.unsafe(nil), Array) + +# source://solargraph//lib/solargraph/yard_map/core_fills.rb#6 +Solargraph::YardMap::CoreFills::KEYWORDS = T.let(T.unsafe(nil), Array) + +# source://solargraph//lib/solargraph/yard_map/core_fills.rb#22 +Solargraph::YardMap::CoreFills::OVERRIDES = T.let(T.unsafe(nil), Array) + +# source://solargraph//lib/solargraph/yard_map/core_fills.rb#4 +Solargraph::YardMap::CoreFills::Override = Solargraph::Pin::Reference::Override + +# source://solargraph//lib/solargraph/yard_map/core_fills.rb#185 +Solargraph::YardMap::CoreFills::PINS = T.let(T.unsafe(nil), Array) + +# Tools for generating core documentation. +# +# source://solargraph//lib/solargraph/yard_map/core_gen.rb#13 +module Solargraph::YardMap::CoreGen + class << self + # Generate documentation from the specified Ruby source directory. + # + # @param ruby_dir [String] The Ruby source directory + # @param dest_dir [String] The destination directory for the yardocs + # @return [void] + # + # source://solargraph//lib/solargraph/yard_map/core_gen.rb#20 + def generate_docs(ruby_dir, dest_dir); end + + # Generate a gzip of documentation from the specified Ruby source + # directory. + # + # This method is designed to generate the directory architecture that + # YardMap core docs expect. + # + # @param ruby_dir [String] The Ruby source directory + # @param ver_name [String, nil] The version name + # @param dest_dir [String] The destination directory + # @return [void] + # + # source://solargraph//lib/solargraph/yard_map/core_gen.rb#41 + def generate_gzip(ruby_dir, ver_name = T.unsafe(nil), dest_dir = T.unsafe(nil)); end + + private + + # @param dir [String] The directory to compress + # @param dst [String] The destination file + # + # source://solargraph//lib/solargraph/yard_map/core_gen.rb#58 + def gzip(dir, dst); end + end +end + +# source://solargraph//lib/solargraph/yard_map/helpers.rb#3 +module Solargraph::YardMap::Helpers + private + + # @param code_object [YARD::CodeObjects::Base] + # @param spec [Gem::Specification] + # @return [Solargraph::Location, nil] + # + # source://solargraph//lib/solargraph/yard_map/helpers.rb#9 + def object_location(code_object, spec); end + + class << self + # @param code_object [YARD::CodeObjects::Base] + # @param spec [Gem::Specification] + # @return [Solargraph::Location, nil] + # + # source://solargraph//lib/solargraph/yard_map/helpers.rb#9 + def object_location(code_object, spec); end + end +end + +# source://solargraph//lib/solargraph/yard_map/mapper.rb#5 +class Solargraph::YardMap::Mapper + # @param code_objects [Array] + # @param spec [Gem::Specification] + # @return [Mapper] a new instance of Mapper + # + # source://solargraph//lib/solargraph/yard_map/mapper.rb#12 + def initialize(code_objects, spec = T.unsafe(nil)); end + + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map/mapper.rb#20 + def map; end + + private + + # @param code_object [YARD::CodeObjects::Base] + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map/mapper.rb#34 + def generate_pins(code_object); end +end + +# source://solargraph//lib/solargraph/yard_map/mapper/to_constant.rb#6 +module Solargraph::YardMap::Mapper::ToConstant + extend ::Solargraph::YardMap::Helpers + + class << self + # source://solargraph//lib/solargraph/yard_map/mapper/to_constant.rb#9 + def make(code_object, closure = T.unsafe(nil), spec = T.unsafe(nil)); end + end +end + +# source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#6 +module Solargraph::YardMap::Mapper::ToMethod + extend ::Solargraph::YardMap::Helpers + + class << self + # source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#9 + def make(code_object, name = T.unsafe(nil), scope = T.unsafe(nil), visibility = T.unsafe(nil), closure = T.unsafe(nil), spec = T.unsafe(nil)); end + + private + + # @param a [Array] + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#53 + def arg_name(a); end + + # @param a [Array] + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#59 + def arg_type(a); end + + # @param code_object [YARD::CodeObjects::Base] + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map/mapper/to_method.rb#33 + def get_parameters(code_object, location, comments); end + end +end + +# source://solargraph//lib/solargraph/yard_map/mapper/to_namespace.rb#6 +module Solargraph::YardMap::Mapper::ToNamespace + extend ::Solargraph::YardMap::Helpers + + class << self + # source://solargraph//lib/solargraph/yard_map/mapper/to_namespace.rb#9 + def make(code_object, spec, closure = T.unsafe(nil)); end + end +end + +# source://solargraph//lib/solargraph/yard_map.rb#13 +class Solargraph::YardMap::NoYardocError < ::StandardError; end + +# source://solargraph//lib/solargraph/yard_map/rdoc_to_yard.rb#10 +module Solargraph::YardMap::RdocToYard + extend ::Solargraph::ApiMap::SourceToYard + + class << self + # source://solargraph//lib/solargraph/yard_map/rdoc_to_yard.rb#104 + def base_name(mod); end + + # @param cmnt [RDoc::Comment] + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map/rdoc_to_yard.rb#110 + def commentary(cmnt); end + + # source://solargraph//lib/solargraph/yard_map/rdoc_to_yard.rb#131 + def find_file(obj); end + + # @param obj [RDoc::Context] + # + # source://solargraph//lib/solargraph/yard_map/rdoc_to_yard.rb#121 + def locate(obj); end + + # @param spec [Gem::Specification] + # @param cache_dir [String] + # @return [void] + # + # source://solargraph//lib/solargraph/yard_map/rdoc_to_yard.rb#16 + def run(spec, cache_dir: T.unsafe(nil)); end + end +end + +# source://solargraph//lib/solargraph/yard_map/stdlib_fills.rb#3 +module Solargraph::YardMap::StdlibFills + class << self + # @param path [String] + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map/stdlib_fills.rb#38 + def get(path); end + end +end + +# source://solargraph//lib/solargraph/yard_map/stdlib_fills.rb#6 +Solargraph::YardMap::StdlibFills::LIBS = T.let(T.unsafe(nil), Hash) + +# source://solargraph//lib/solargraph/yard_map/stdlib_fills.rb#4 +Solargraph::YardMap::StdlibFills::Override = Solargraph::Pin::Reference::Override + +# source://solargraph//lib/solargraph/yard_map/to_method.rb#5 +class Solargraph::YardMap::ToMethod + extend ::Solargraph::YardMap::Helpers + + # source://solargraph//lib/solargraph/yard_map/to_method.rb#59 + def make(code_object, name = T.unsafe(nil), scope = T.unsafe(nil), visibility = T.unsafe(nil), closure = T.unsafe(nil), spec = T.unsafe(nil)); end +end + +# source://solargraph//lib/solargraph/yard_map/to_method.rb#6 +module Solargraph::YardMap::ToMethod::InnerMethods + private + + # @param a [Array] + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#31 + def arg_name(a); end + + # @param a [Array] + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#37 + def arg_type(a); end + + # @param code_object [YARD::CodeObjects::Base] + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#11 + def get_parameters(code_object, location, comments); end + + class << self + # @param a [Array] + # @return [String] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#31 + def arg_name(a); end + + # @param a [Array] + # @return [::Symbol] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#37 + def arg_type(a); end + + # @param code_object [YARD::CodeObjects::Base] + # @return [Array] + # + # source://solargraph//lib/solargraph/yard_map/to_method.rb#11 + def get_parameters(code_object, location, comments); end + end +end diff --git a/sorbet/rbi/gems/spoom@1.3.2.rbi b/sorbet/rbi/gems/spoom@1.3.2.rbi new file mode 100644 index 0000000..26702ad --- /dev/null +++ b/sorbet/rbi/gems/spoom@1.3.2.rbi @@ -0,0 +1,4421 @@ +# 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/deadcode.rb#8 +class Spoom::Cli::Deadcode < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/deadcode.rb#52 + sig { params(paths: ::String).void } + def deadcode(*paths); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/deadcode.rb#150 + def remove(location_string); end +end + +# 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#139 + sig { params(string: ::String).returns(::String) } + def blue(string); end + + # Is the `--color` option true? + # + # source://spoom//lib/spoom/cli/helper.rb#103 + sig { returns(T::Boolean) } + def color?; end + + # Colorize a string if `color?` + # + # source://spoom//lib/spoom/cli/helper.rb#132 + 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#71 + 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#77 + sig { returns(::Spoom::Context) } + def context_requiring_sorbet!; end + + # source://spoom//lib/spoom/cli/helper.rb#144 + sig { params(string: ::String).returns(::String) } + def cyan(string); end + + # Return the path specified through `--path` + # + # source://spoom//lib/spoom/cli/helper.rb#92 + sig { returns(::String) } + def exec_path; end + + # source://spoom//lib/spoom/cli/helper.rb#149 + sig { params(string: ::String).returns(::String) } + def gray(string); end + + # source://spoom//lib/spoom/cli/helper.rb#154 + sig { params(string: ::String).returns(::String) } + def green(string); end + + # source://spoom//lib/spoom/cli/helper.rb#108 + sig { params(string: ::String).returns(::String) } + def highlight(string); end + + # source://spoom//lib/spoom/cli/helper.rb#159 + 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 + + # Print `message` on `$stderr` + # + # The message is prefixed by a status (default: `Warning`). + # + # source://spoom//lib/spoom/cli/helper.rb#59 + sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } + def say_warning(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/helper.rb#164 + sig { params(string: ::String).returns(::String) } + def yellow(string); end +end + +# source://spoom//lib/spoom/cli.rb#12 +class Spoom::Cli::Main < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli.rb#101 + def __print_version; end + + # source://spoom//lib/spoom/cli.rb#58 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli.rb#65 + def coverage(*args); end + + # source://thor/1.2.1/lib/thor.rb#239 + def deadcode(*args); end + + # source://spoom//lib/spoom/cli.rb#75 + def lsp(*args); end + + # source://thor/1.2.1/lib/thor.rb#239 + def srb(*args); end + + # source://spoom//lib/spoom/cli.rb#94 + def tc(*paths_to_select); end + + class << self + # @return [Boolean] + # + # source://spoom//lib/spoom/cli.rb#108 + def exit_on_failure?; end + end +end + +# source://spoom//lib/spoom/cli.rb#81 +Spoom::Cli::Main::SORT_CODE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli.rb#83 +Spoom::Cli::Main::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/cli.rb#82 +Spoom::Cli::Main::SORT_LOC = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/bump.rb#9 +module Spoom::Cli::Srb; end + +# source://spoom//lib/spoom/cli/srb/bump.rb#10 +class Spoom::Cli::Srb::Bump < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/bump.rb#50 + 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/srb/bump.rb#171 + 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/srb/bump.rb#193 + def undo_changes(files, from_strictness); end +end + +# source://spoom//lib/spoom/cli/srb/coverage.rb#10 +class Spoom::Cli::Srb::Coverage < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/coverage.rb#199 + def bundle_install(path, sha); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#211 + def message_no_data(file); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#174 + def open(file = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#190 + def parse_time(string, option); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#143 + def report; end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#21 + def snapshot; end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#43 + def timeline; end +end + +# source://spoom//lib/spoom/cli/srb/coverage.rb#13 +Spoom::Cli::Srb::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/lsp.rb#11 +class Spoom::Cli::Srb::LSP < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#45 + def defs(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#55 + 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/srb/lsp.rb#31 + def hover(file, line, col); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#16 + def list; end + + # source://spoom//lib/spoom/cli/srb/lsp.rb#104 + def lsp_client; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#75 + def refs(file, line, col); end + + # source://spoom//lib/spoom/cli/srb/lsp.rb#127 + def run(&block); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#85 + def sigs(file, line, col); end + + # source://spoom//lib/spoom/cli/srb/lsp.rb#119 + def symbol_printer; end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#65 + def symbols(file); end + + # source://spoom//lib/spoom/cli/srb/lsp.rb#152 + def to_uri(path); end + + # TODO: options, filter, limit, kind etc.. filter rbi + # + # source://spoom//lib/spoom/cli/srb/lsp.rb#95 + def types(file, line, col); end +end + +# source://spoom//lib/spoom/cli/srb.rb#12 +class Spoom::Cli::Srb::Main < ::Thor + # source://thor/1.2.1/lib/thor.rb#239 + def bump(*args); end + + # source://thor/1.2.1/lib/thor.rb#239 + def coverage(*args); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); 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 +end + +# source://spoom//lib/spoom/cli/srb/tc.rb#7 +class Spoom::Cli::Srb::Tc < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/tc.rb#132 + def colorize_message(message); end + + # source://spoom//lib/spoom/cli/srb/tc.rb#123 + def format_error(error, format); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/tc.rb#27 + def tc(*paths_to_select); end +end + +# source://spoom//lib/spoom/cli/srb/tc.rb#16 +Spoom::Cli::Srb::Tc::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/tc.rb#12 +Spoom::Cli::Srb::Tc::SORT_CODE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/tc.rb#14 +Spoom::Cli::Srb::Tc::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/cli/srb/tc.rb#13 +Spoom::Cli::Srb::Tc::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 uncommitted 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.11372/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.11372/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/visitor.rb#5 +module Spoom::Deadcode + class << self + # source://spoom//lib/spoom/deadcode.rb#81 + 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#67 + sig do + params( + index: ::Spoom::Deadcode::Index, + node: ::Prism::Node, + ruby: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_node(index, node, ruby, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode.rb#75 + 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#75 + sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + def load_custom_plugins(context); end + + # source://spoom//lib/spoom/deadcode.rb#43 + sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) } + def parse_ruby(ruby, file:); end + + # source://spoom//lib/spoom/deadcode/plugins.rb#61 + 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#26 +Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/deadcode/plugins.rb#28 +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 + + # Utils + # + # source://spoom//lib/spoom/deadcode/definition.rb#100 + sig { params(args: T.untyped).returns(::String) } + def to_json(*args); end + + class << self + # source://sorbet-runtime/0.5.11372/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#21 +class Spoom::Deadcode::Error < ::Spoom::Error + abstract! +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 < ::Spoom::Deadcode::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 + + # Context + # + # source://spoom//lib/spoom/deadcode/indexer.rb#408 + sig { returns(::Prism::Node) } + def current_node; end + + # Definition indexing + # + # source://spoom//lib/spoom/deadcode/indexer.rb#322 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_attr_reader(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#334 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_attr_writer(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#346 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_class(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#358 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_constant(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#370 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_method(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#382 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } + def define_module(name, full_name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#13 + sig { returns(::Spoom::Deadcode::Index) } + def index; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#453 + sig { returns(T.nilable(::String)) } + def last_sig; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#427 + sig { returns(T.nilable(::Prism::BlockNode)) } + def nesting_block; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#432 + sig { returns(T.nilable(::Prism::CallNode)) } + def nesting_call; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#422 + sig { returns(T.nilable(::Prism::ClassNode)) } + def nesting_class; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#437 + sig { returns(T.nilable(::String)) } + def nesting_class_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#445 + sig { returns(T.nilable(::String)) } + def nesting_class_superclass_name; end + + # source://spoom//lib/spoom/deadcode/indexer.rb#413 + sig { type_parameters(:N).params(type: T::Class[T.type_parameter(:N)]).returns(T.nilable(T.type_parameter(:N))) } + def nesting_node(type); end + + # Node utils + # + # source://spoom//lib/spoom/deadcode/indexer.rb#464 + sig { params(node: ::Prism::Node).returns(::Spoom::Deadcode::Location) } + def node_location(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#396 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_constant(name, node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#401 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_method(name, node); end + + # Visit + # + # source://spoom//lib/spoom/deadcode/indexer.rb#35 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#45 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#50 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#56 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#67 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#91 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#75 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#83 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#104 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#137 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#143 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#149 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#155 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#173 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#178 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#186 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#194 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#202 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#210 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#218 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#224 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#254 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#268 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#274 + sig { params(send: ::Spoom::Deadcode::Send).void } + def visit_send(send); end +end + +# source://spoom//lib/spoom/deadcode.rb#29 +class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error + # source://spoom//lib/spoom/deadcode.rb#33 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +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 + # source://spoom//lib/spoom/deadcode/location.rb#34 + sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Deadcode::Location) } + def from_prism(file, location); end + + # @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 + 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#36 +Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) + +# source://spoom//lib/spoom/deadcode.rb#27 +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/action_mailer_preview.rb#7 +class Spoom::Deadcode::Plugins::ActionMailerPreview < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#13 + 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/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 + # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#22 + 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_support.rb#19 +Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) + +# @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 = send.args.first.slice.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#43 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::Prism::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#34 + 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.11372/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 do + params( + kind: T.nilable(::Spoom::Deadcode::Definition::Kind), + location: ::Spoom::Deadcode::Location + ).returns(::String) + end + 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#372 +class Spoom::Deadcode::Remover::NodeContext + # source://spoom//lib/spoom/deadcode/remover.rb#392 + sig do + params( + source: ::String, + comments: T::Hash[::Integer, ::Prism::Comment], + node: ::Prism::Node, + nesting: T::Array[::Prism::Node] + ).void + end + def initialize(source, comments, node, nesting); end + + # source://spoom//lib/spoom/deadcode/remover.rb#506 + sig { params(node: ::Prism::Node).returns(T::Array[::Prism::Comment]) } + def attached_comments(node); end + + # source://spoom//lib/spoom/deadcode/remover.rb#534 + sig { returns(T.nilable(::Prism::CallNode)) } + def attached_sig; end + + # source://spoom//lib/spoom/deadcode/remover.rb#521 + sig { returns(T::Array[::Prism::Node]) } + def attached_sigs; end + + # source://spoom//lib/spoom/deadcode/remover.rb#376 + sig { returns(T::Hash[::Integer, ::Prism::Comment]) } + def comments; end + + # source://spoom//lib/spoom/deadcode/remover.rb#494 + sig { params(start_line: ::Integer, end_line: ::Integer).returns(T::Array[::Prism::Comment]) } + def comments_between_lines(start_line, end_line); end + + # source://spoom//lib/spoom/deadcode/remover.rb#382 + sig { returns(T::Array[::Prism::Node]) } + def nesting; end + + # @return [Array] + # + # source://spoom//lib/spoom/deadcode/remover.rb#382 + def nesting=(_arg0); end + + # source://spoom//lib/spoom/deadcode/remover.rb#444 + sig { returns(T.nilable(::Prism::Node)) } + def next_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#433 + sig { returns(T::Array[::Prism::Node]) } + def next_nodes; end + + # source://spoom//lib/spoom/deadcode/remover.rb#379 + sig { returns(::Prism::Node) } + def node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#408 + sig { returns(::Spoom::Deadcode::Remover::NodeContext) } + def parent_context; end + + # source://spoom//lib/spoom/deadcode/remover.rb#400 + sig { returns(::Prism::Node) } + def parent_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#428 + sig { returns(T.nilable(::Prism::Node)) } + def previous_node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#417 + sig { returns(T::Array[::Prism::Node]) } + def previous_nodes; end + + # source://spoom//lib/spoom/deadcode/remover.rb#449 + sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) } + def sclass_context; end + + # source://spoom//lib/spoom/deadcode/remover.rb#482 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def sorbet_extend_sig?(node); end + + # source://spoom//lib/spoom/deadcode/remover.rb#477 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def sorbet_signature?(node); end +end + +# source://spoom//lib/spoom/deadcode/remover.rb#549 +class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Deadcode::Visitor + # source://spoom//lib/spoom/deadcode/remover.rb#621 + sig { params(location: ::Spoom::Deadcode::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void } + def initialize(location, kind); end + + # source://spoom//lib/spoom/deadcode/remover.rb#615 + sig { returns(T.nilable(::Prism::Node)) } + def node; end + + # source://spoom//lib/spoom/deadcode/remover.rb#618 + sig { returns(T::Array[::Prism::Node]) } + def nodes_nesting; end + + # source://spoom//lib/spoom/deadcode/remover.rb#630 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end + + class << self + # source://spoom//lib/spoom/deadcode/remover.rb#556 + sig do + params( + source: ::String, + location: ::Spoom::Deadcode::Location, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) + ).returns(::Spoom::Deadcode::Remover::NodeContext) + end + def find(source, location, kind); end + + # source://spoom//lib/spoom/deadcode/remover.rb#590 + sig { params(node: ::Prism::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: T.nilable(::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#153 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_attr_accessor(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#331 + sig { params(start_char: ::Integer, end_char: ::Integer).void } + def delete_chars(start_char, end_char); end + + # source://spoom//lib/spoom/deadcode/remover.rb#73 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_constant_assignment(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#324 + sig { params(start_line: ::Integer, end_line: ::Integer).void } + def delete_lines(start_line, end_line); end + + # source://spoom//lib/spoom/deadcode/remover.rb#261 + sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } + def delete_node_and_comments_and_sigs(context); end + + # source://spoom//lib/spoom/deadcode/remover.rb#218 + sig do + params( + node: ::Prism::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#336 + 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#341 + sig do + params( + node: ::Prism::CallNode, + name: ::String, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) + ).returns(::String) + end + def transform_sig(node, name:, kind:); end +end + +# An abstraction to simplify handling of Prism::CallNode nodes. +# +# source://spoom//lib/spoom/deadcode/send.rb#7 +class Spoom::Deadcode::Send < ::T::Struct + const :node, ::Prism::CallNode + const :name, ::String + const :recv, T.nilable(::Prism::Node), default: T.unsafe(nil) + const :args, T::Array[::Prism::Node], default: T.unsafe(nil) + const :block, T.nilable(::Prism::Node), default: T.unsafe(nil) + + # source://spoom//lib/spoom/deadcode/send.rb#21 + 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#28 + sig { params(block: T.proc.params(key: ::Prism::Node, value: T.nilable(::Prism::Node)).void).void } + def each_arg_assoc(&block); end + + class << self + # source://sorbet-runtime/0.5.11372/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://spoom//lib/spoom/deadcode/visitor.rb#6 +class Spoom::Deadcode::Visitor < ::Prism::Visitor + # source://spoom//lib/spoom/deadcode/visitor.rb#15 + sig { override.params(node: ::Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#20 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#25 + sig { override.params(node: ::Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#30 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#35 + sig { override.params(node: ::Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#40 + sig { override.params(node: ::Prism::ArrayNode).void } + def visit_array_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#45 + sig { override.params(node: ::Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#50 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#55 + sig { override.params(node: ::Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#60 + sig { override.params(node: ::Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#65 + sig { override.params(node: ::Prism::BeginNode).void } + def visit_begin_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#70 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#75 + sig { override.params(node: ::Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#80 + sig { override.params(node: ::Prism::BlockNode).void } + def visit_block_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#85 + sig { override.params(node: ::Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#90 + sig { override.params(node: ::Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#95 + sig { override.params(node: ::Prism::BreakNode).void } + def visit_break_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#100 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#105 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#110 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#115 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#120 + sig { override.params(node: ::Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#125 + sig { override.params(node: ::Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#130 + sig { override.params(node: ::Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#135 + sig { override.params(node: ::Prism::CaseNode).void } + def visit_case_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#10 + sig { override.params(node: ::Prism::Node).void } + def visit_child_nodes(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#140 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#145 + sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#150 + sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#155 + sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#160 + sig { override.params(node: ::Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#165 + sig { override.params(node: ::Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#170 + sig { override.params(node: ::Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#175 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#180 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#185 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#190 + sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#195 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#200 + sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#205 + sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#210 + sig { override.params(node: ::Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#215 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#220 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#225 + sig { override.params(node: ::Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#230 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#235 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#240 + sig { override.params(node: ::Prism::DefinedNode).void } + def visit_defined_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#245 + sig { override.params(node: ::Prism::ElseNode).void } + def visit_else_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#250 + sig { override.params(node: ::Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#255 + sig { override.params(node: ::Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#260 + sig { override.params(node: ::Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#265 + sig { override.params(node: ::Prism::FalseNode).void } + def visit_false_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#270 + sig { override.params(node: ::Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#275 + sig { override.params(node: ::Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#280 + sig { override.params(node: ::Prism::FloatNode).void } + def visit_float_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#285 + sig { override.params(node: ::Prism::ForNode).void } + def visit_for_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#290 + sig { override.params(node: ::Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#295 + sig { override.params(node: ::Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#300 + sig { override.params(node: ::Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#305 + sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#310 + sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#315 + sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#320 + sig { override.params(node: ::Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#325 + sig { override.params(node: ::Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#330 + sig { override.params(node: ::Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#335 + sig { override.params(node: ::Prism::HashNode).void } + def visit_hash_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#340 + sig { override.params(node: ::Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#345 + sig { override.params(node: ::Prism::IfNode).void } + def visit_if_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#350 + sig { override.params(node: ::Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#355 + sig { override.params(node: ::Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#360 + sig { override.params(node: ::Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#365 + sig { override.params(node: ::Prism::InNode).void } + def visit_in_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#370 + sig { override.params(node: ::Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#375 + sig { override.params(node: ::Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#380 + sig { override.params(node: ::Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#385 + sig { override.params(node: ::Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#390 + sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#395 + sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#400 + sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#405 + sig { override.params(node: ::Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#410 + sig { override.params(node: ::Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#415 + sig { override.params(node: ::Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#420 + sig { override.params(node: ::Prism::IntegerNode).void } + def visit_integer_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#425 + sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#430 + sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#435 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#440 + sig { override.params(node: ::Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#445 + sig { override.params(node: ::Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#450 + sig { override.params(node: ::Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#455 + sig { override.params(node: ::Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#460 + sig { override.params(node: ::Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#465 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#470 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#475 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#480 + sig { override.params(node: ::Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#485 + sig { override.params(node: ::Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#490 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#495 + sig { override.params(node: ::Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#500 + sig { override.params(node: ::Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#505 + sig { override.params(node: ::Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#510 + sig { override.params(node: ::Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#515 + sig { override.params(node: ::Prism::MissingNode).void } + def visit_missing_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#520 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#525 + sig { override.params(node: ::Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#530 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#535 + sig { override.params(node: ::Prism::NextNode).void } + def visit_next_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#540 + sig { override.params(node: ::Prism::NilNode).void } + def visit_nil_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#545 + sig { override.params(node: ::Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#550 + sig { override.params(node: ::Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#555 + sig { override.params(node: ::Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#560 + sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#565 + sig { override.params(node: ::Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#570 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#575 + sig { override.params(node: ::Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#580 + sig { override.params(node: ::Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#585 + sig { override.params(node: ::Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#590 + sig { override.params(node: ::Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#595 + sig { override.params(node: ::Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#600 + sig { override.params(node: ::Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#605 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#610 + sig { override.params(node: ::Prism::RangeNode).void } + def visit_range_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#615 + sig { override.params(node: ::Prism::RationalNode).void } + def visit_rational_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#620 + sig { override.params(node: ::Prism::RedoNode).void } + def visit_redo_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#625 + sig { override.params(node: ::Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#630 + sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#635 + sig { override.params(node: ::Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#640 + sig { override.params(node: ::Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#645 + sig { override.params(node: ::Prism::RescueNode).void } + def visit_rescue_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#650 + sig { override.params(node: ::Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#655 + sig { override.params(node: ::Prism::RetryNode).void } + def visit_retry_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#660 + sig { override.params(node: ::Prism::ReturnNode).void } + def visit_return_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#665 + sig { override.params(node: ::Prism::SelfNode).void } + def visit_self_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#670 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#675 + sig { override.params(node: ::Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#680 + sig { override.params(node: ::Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#685 + sig { override.params(node: ::Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#690 + sig { override.params(node: ::Prism::SplatNode).void } + def visit_splat_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#695 + sig { override.params(node: ::Prism::StatementsNode).void } + def visit_statements_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#700 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#705 + sig { override.params(node: ::Prism::SuperNode).void } + def visit_super_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#710 + sig { override.params(node: ::Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#715 + sig { override.params(node: ::Prism::TrueNode).void } + def visit_true_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#720 + sig { override.params(node: ::Prism::UndefNode).void } + def visit_undef_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#725 + sig { override.params(node: ::Prism::UnlessNode).void } + def visit_unless_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#730 + sig { override.params(node: ::Prism::UntilNode).void } + def visit_until_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#735 + sig { override.params(node: ::Prism::WhenNode).void } + def visit_when_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#740 + sig { override.params(node: ::Prism::WhileNode).void } + def visit_while_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#745 + sig { override.params(node: ::Prism::XStringNode).void } + def visit_x_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#750 + sig { override.params(node: ::Prism::YieldNode).void } + def visit_yield_node(node); 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.11372/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#59 + sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def nodes_strictness_scores(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#67 + sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } + def paths_strictness_scores(context); end + + # source://spoom//lib/spoom/file_tree.rb#72 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } + def print(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#124 +class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#131 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/file_tree.rb#128 + sig { returns(T::Array[::Spoom::FileTree::Node]) } + def nodes; end + + # source://spoom//lib/spoom/file_tree.rb#137 + 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#167 +class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses + # source://spoom//lib/spoom/file_tree.rb#174 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/file_tree.rb#171 + sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } + def scores; end + + # source://spoom//lib/spoom/file_tree.rb#181 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # source://spoom//lib/spoom/file_tree.rb#190 + sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } + def node_score(node); end + + # source://spoom//lib/spoom/file_tree.rb#199 + 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#144 +class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#151 + sig { params(context: ::Spoom::Context).void } + def initialize(context); end + + # source://spoom//lib/spoom/file_tree.rb#148 + sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } + def strictnesses; end + + # source://spoom//lib/spoom/file_tree.rb#158 + 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#78 +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#92 + sig { returns(::String) } + def path; end + + class << self + # source://sorbet-runtime/0.5.11372/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#212 +class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor + # source://spoom//lib/spoom/file_tree.rb#222 + 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#230 + sig { override.params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + private + + # source://spoom//lib/spoom/file_tree.rb#255 + 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#101 +class Spoom::FileTree::Visitor + abstract! + + # source://spoom//lib/spoom/file_tree.rb#113 + sig { params(node: ::Spoom::FileTree::Node).void } + def visit_node(node); end + + # source://spoom//lib/spoom/file_tree.rb#118 + sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } + def visit_nodes(nodes); end + + # source://spoom//lib/spoom/file_tree.rb#108 + 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.11372/lib/types/struct.rb#13 + def inherited(s); end + + # Parse a line formatted 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 :information, ::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.11372/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.11372/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.11372/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.11372/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.11372/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.11372/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.11372/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/tapioca@0.14.1.rbi b/sorbet/rbi/gems/tapioca@0.14.1.rbi new file mode 100644 index 0000000..759a554 --- /dev/null +++ b/sorbet/rbi/gems/tapioca@0.14.1.rbi @@ -0,0 +1,3541 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tapioca` gem. +# Please instead update this file by running `bin/tapioca gem tapioca`. + + +class Bundler::Dependency < ::Gem::Dependency + include ::Tapioca::BundlerExt::AutoRequireHook +end + +# source://tapioca//lib/tapioca/helpers/git_attributes.rb#4 +class GitAttributes + class << self + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#9 + sig { params(path: ::Pathname).void } + def create_generated_attribute_file(path); end + + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#16 + sig { params(path: ::Pathname).void } + def create_vendored_attribute_file(path); end + + private + + # source://tapioca//lib/tapioca/helpers/git_attributes.rb#25 + sig { params(path: ::Pathname, content: ::String).void } + def create_gitattributes_file(path, content); end + end +end + +# We need to do the alias-method-chain dance since Bootsnap does the same, +# and prepended modules and alias-method-chain don't play well together. +# +# So, why does Bootsnap do alias-method-chain and not prepend? Glad you asked! +# 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#68 +class Module + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#101 + def append_features(constant); end + + # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#71 + def autoload(const_name, path); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#111 + def extend_object(obj); end + + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#91 + def prepend_features(constant); end +end + +# source://tapioca//lib/tapioca/rbi_ext/model.rb#4 +module RBI; end + +# source://tapioca//lib/tapioca/rbi_ext/model.rb#5 +class RBI::Tree < ::RBI::NodeWithComments + # source://rbi/0.1.13/lib/rbi/model.rb#119 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi/0.1.13/lib/rbi/model.rb#126 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi/0.1.13/lib/rbi/printer.rb#226 + sig { override.params(v: ::RBI::Printer).void } + def accept_printer(v); end + + # source://rbi/0.1.13/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.1.13/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//lib/tapioca/rbi_ext/model.rb#38 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + block: T.nilable(T.proc.params(scope: ::RBI::Scope).void) + ).returns(::RBI::Scope) + end + def create_class(name, superclass_name: T.unsafe(nil), &block); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#45 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#55 + sig { params(name: ::String).void } + def create_extend(name); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#50 + sig { params(name: ::String).void } + def create_include(name); end + + # 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, + 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), comments: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#113 + sig do + params( + name: ::String, + sigs: T::Array[::RBI::Sig], + parameters: T::Array[::RBI::Param], + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method_with_sigs(name, sigs:, parameters: 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 } + def create_mixes_in_class_methods(name); end + + # source://tapioca//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//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//lib/tapioca/rbi_ext/model.rb#135 + sig do + params( + parameters: T::Hash[T.any(::String, ::Symbol), ::String], + type_parameters: T::Array[::String], + return_type: ::String + ).returns(::RBI::Sig) + end + def create_sig(parameters:, type_parameters: T.unsafe(nil), return_type: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#74 + sig do + params( + name: ::String, + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).void + 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.1.13/lib/rbi/rewriters/deannotate.rb#41 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # source://rbi/0.1.13/lib/rbi/model.rb#132 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi/0.1.13/lib/rbi/rewriters/filter_versions.rb#118 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # source://rbi/0.1.13/lib/rbi/rewriters/group_nodes.rb#38 + sig { void } + def group_nodes!; end + + # source://rbi/0.1.13/lib/rbi/index.rb#68 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi/0.1.13/lib/rbi/rewriters/merge_trees.rb#324 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi/0.1.13/lib/rbi/rewriters/nest_non_public_methods.rb#46 + sig { void } + def nest_non_public_methods!; end + + # source://rbi/0.1.13/lib/rbi/rewriters/nest_singleton_methods.rb#36 + sig { void } + def nest_singleton_methods!; end + + # source://rbi/0.1.13/lib/rbi/model.rb#110 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi/0.1.13/lib/rbi/printer.rb#233 + sig { override.returns(T::Boolean) } + def oneline?; end + + # source://rbi/0.1.13/lib/rbi/rewriters/sort_nodes.rb#119 + sig { void } + def sort_nodes!; end + + private + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#150 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # source://tapioca//lib/tapioca/rbi_ext/model.rb#145 + sig { returns(T::Hash[::String, ::RBI::Node]) } + def nodes_cache; end +end + +# source://tapioca//lib/tapioca/rbi_ext/model.rb#160 +class RBI::TypedParam < ::T::Struct + const :param, ::RBI::Param + const :type, ::String + + class << self + # source://sorbet-runtime/0.5.11372/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# 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#47 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 + def type_member(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end +end + +# This module intercepts calls to generic type instantiations and type variable definitions. +# Tapioca stores the data from those calls in a `GenericTypeRegistry` which can then be used +# to look up the original call details when we are trying to do code generation. +# +# We are interested in the data of the `[]`, `type_member` and `type_template` calls which +# are all needed to generate good generic information at runtime. +# +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#12 +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#47 + def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21 + def type_member(variance = T.unsafe(nil), &bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34 + def type_template(variance = T.unsafe(nil), &bounds_proc); end +end + +# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#28 +module T::Private::Methods + class << self + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30 + def finalize_proc(decl); end + end +end + +class T::Private::Methods::Declaration < ::Struct + def bind; end + def bind=(_); end + def checked; end + def checked=(_); end + def finalized; end + def finalized=(_); end + def mod; end + def mod=(_); end + def mode; end + def mode=(_); end + def on_failure; end + def on_failure=(_); end + def override_allow_incompatible; end + def override_allow_incompatible=(_); end + def params; end + def params=(_); end + def raw; end + def raw=(_); end + def returns; end + def returns=(_); end + def type_parameters; end + def type_parameters=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +class T::Private::Methods::DeclarationBlock < ::Struct + def blk; end + def blk=(_); end + def final; end + def final=(_); end + def loc; end + def loc=(_); end + def mod; end + def mod=(_); end + def raw; end + def raw=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# 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::Types::Proc < ::T::Types::Base; end + +# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#6 +module T::Types::ProcBindPatch + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#7 + def initialize(arg_types, returns, bind = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#15 + def name; end +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#70 + def name; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#65 +module T::Types::Simple::GenericPatch + # This method intercepts calls to the `name` method for simple types, so that + # it can ask the name to the type if the type is generic, since, by this point, + # we've created a clone of that type with the `name` method returning the + # appropriate name for that specific concrete type. + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#70 + def name; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#7 +module T::Types::Simple::NamePatch + # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#10 + def name; end + + # source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#16 + def qualified_name_of(constant); end +end + +# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8 +T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#87 +module T::Utils::Private + class << self + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89 + def coerce_and_check_module_types(val, check_val, check_module_type); end + end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#88 +module T::Utils::Private::PrivateCoercePatch + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89 + def coerce_and_check_module_types(val, check_val, check_module_type); end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 +module Tapioca + class << self + # source://tapioca//lib/tapioca.rb#19 + sig do + type_parameters(:Result) + .params( + blk: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def silence_warnings(&blk); end + end +end + +# source://tapioca//lib/tapioca.rb#37 +Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) + +# 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#59 +Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#58 +Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/cli.rb#5 +class Tapioca::Cli < ::Thor + include ::Tapioca::CliHelper + include ::Tapioca::ConfigHelper + include ::Tapioca::EnvHelper + + # source://tapioca//lib/tapioca/cli.rb#361 + def __print_version; end + + # source://tapioca//lib/tapioca/cli.rb#343 + def annotations; end + + # source://tapioca//lib/tapioca/cli.rb#315 + def check_shims; end + + # source://tapioca//lib/tapioca/cli.rb#46 + def configure; end + + # source://tapioca//lib/tapioca/cli.rb#143 + def dsl(*constant_or_paths); end + + # @raise [MalformattedArgumentError] + # + # source://tapioca//lib/tapioca/cli.rb#259 + def gem(*gems); end + + # source://tapioca//lib/tapioca/cli.rb#27 + def init; end + + # source://tapioca//lib/tapioca/cli.rb#57 + def require; end + + # source://tapioca//lib/tapioca/cli.rb#74 + def todo; end + + private + + # source://tapioca//lib/tapioca/cli.rb#375 + def print_init_next_steps; end + + class << self + # source://tapioca//lib/tapioca/cli.rb#367 + def exit_on_failure?; end + end +end + +# source://tapioca//lib/tapioca/cli.rb#10 +Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/cli_helper.rb#5 +module Tapioca::CliHelper + requires_ancestor { Thor::Shell } + + # source://tapioca//lib/tapioca/helpers/cli_helper.rb#33 + sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T.nilable(::String)) } + def netrc_file(options); end + + # source://tapioca//lib/tapioca/helpers/cli_helper.rb#26 + sig { params(options: T::Hash[::Symbol, T.untyped]).returns(::Tapioca::RBIFormatter) } + def rbi_formatter(options); end + + # source://tapioca//lib/tapioca/helpers/cli_helper.rb#12 + sig { params(message: ::String, color: T.any(::Symbol, T::Array[::Symbol])).void } + def say_error(message = T.unsafe(nil), *color); end +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#32 + 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, + skip_constant: T::Array[::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:, skip_constant: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + + private + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#97 + sig { returns(T::Array[::String]) } + def all_requested_constants; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#289 + 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#213 + 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#150 + 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#173 + 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#349 + sig { returns(T::Array[::String]) } + def constants_from_requested_paths; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#120 + sig { returns(::Tapioca::Dsl::Pipeline) } + def create_pipeline; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#252 + sig { params(constant_name: ::String).returns(::Pathname) } + def dsl_rbi_filename(constant_name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#136 + 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#344 + sig { params(constant: ::String).returns(::String) } + def generate_command_for(constant); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#73 + 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#110 + sig { void } + def load_application; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#231 + sig { params(dir: ::Pathname).void } + def perform_dsl_verification(dir); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#105 + sig { returns(::Tapioca::Dsl::Pipeline) } + def pipeline; end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#240 + sig { params(files: T::Set[::Pathname]).void } + def purge_stale_dsl_rbi_files(files); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#339 + sig { params(constant: ::String).returns(::String) } + def rbi_filename_for(constant); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#320 + sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } + def rbi_files_in(path); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.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/abstract_dsl.rb#193 + 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#327 + sig { params(class_name: ::String).returns(::String) } + def underscore(class_name); end + + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#257 + 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#223 + sig { returns(T::Array[::String]) } + def added_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.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_gem.rb#110 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } + def compile_gem_rbi(gem); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#218 + sig { params(gem_name: ::String).returns(::Pathname) } + def existing_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#266 + sig { returns(T::Hash[::String, ::String]) } + def existing_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#230 + sig { params(gem_name: ::String).returns(::Pathname) } + def expected_rbi(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#272 + 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#235 + sig { params(gem_name: ::String).returns(T::Boolean) } + def gem_rbi_exists?(gem_name); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#279 + 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#289 + 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#260 + sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } + def move(old_filename, new_filename); end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#170 + sig { void } + def perform_additions; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#143 + sig { void } + def perform_removals; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#213 + sig { returns(T::Array[::String]) } + def removed_rbis; end + + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#240 + sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } + def report_diff_and_exit_if_out_of_date(diff, command); end +end + +# source://tapioca//lib/tapioca/commands/annotations.rb#6 +class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker + # source://tapioca//lib/tapioca/commands/annotations.rb#18 + sig do + params( + central_repo_root_uris: T::Array[::String], + auth: T.nilable(::String), + netrc_file: T.nilable(::String), + central_repo_index_path: ::String, + typed_overrides: T::Hash[::String, ::String] + ).void + 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 + + private + + # 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#213 + sig { params(name: ::String, content: ::String).returns(::String) } + def apply_typed_override(name, content); end + + # 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#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#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#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#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#81 + sig { returns(T::Hash[::String, Tapioca::RepoIndex]) } + def fetch_indexes; end + + # 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#50 + sig { returns(T::Array[::String]) } + def list_gemfile_gems; end + + # 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#60 + sig { params(project_gems: T::Array[::String]).void } + def remove_expired_annotations(project_gems); end + + # 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#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#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::CommandWithoutTracker + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIFilesHelper + + # source://tapioca//lib/tapioca/commands/check_shims.rb#22 + sig do + params( + gem_rbi_dir: ::String, + dsl_rbi_dir: ::String, + annotations_rbi_dir: ::String, + shim_rbi_dir: ::String, + todo_rbi_file: ::String, + payload: T::Boolean, + number_of_workers: T.nilable(::Integer) + ).void + end + def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:, number_of_workers:); end + + private + + # source://tapioca//lib/tapioca/commands/check_shims.rb#44 + sig { override.void } + def execute; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/commands/command.rb#6 +class Tapioca::Commands::Command + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + include ::Tapioca::CliHelper + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + abstract! + + # source://tapioca//lib/tapioca/commands/command.rb#20 + sig { void } + def initialize; end + + # source://thor/1.2.1/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#53 + sig do + params( + path: T.any(::Pathname, ::String), + content: ::String, + force: T::Boolean, + skip: T::Boolean, + verbose: T::Boolean + ).void + 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#37 + sig { params(command: ::Symbol, args: ::String).returns(::String) } + def default_command(command, *args); end + + # @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 + +# source://tapioca//lib/tapioca/commands/command.rb#10 +class Tapioca::Commands::Command::FileWriter < ::Thor + include ::Thor::Actions + 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::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 + + private + + # source://tapioca//lib/tapioca/commands/configure.rb#79 + sig { void } + def create_binstub; end + + # source://tapioca//lib/tapioca/commands/configure.rb#69 + sig { void } + def create_post_require; end + + # source://tapioca//lib/tapioca/commands/configure.rb#40 + sig { void } + def create_sorbet_config; end + + # source://tapioca//lib/tapioca/commands/configure.rb#50 + sig { void } + def create_tapioca_config; end + + # source://tapioca//lib/tapioca/commands/configure.rb#32 + sig { override.void } + def execute; end + + # source://tapioca//lib/tapioca/commands/configure.rb#92 + sig { returns(::Bundler::Installer) } + def installer; end + + # 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_compiler_list.rb#6 +class Tapioca::Commands::DslCompilerList < ::Tapioca::Commands::AbstractDsl + private + + # source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/dsl_generate.rb#6 +class Tapioca::Commands::DslGenerate < ::Tapioca::Commands::AbstractDsl + private + + # source://tapioca//lib/tapioca/commands/dsl_generate.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/dsl_verify.rb#6 +class Tapioca::Commands::DslVerify < ::Tapioca::Commands::AbstractDsl + private + + # source://tapioca//lib/tapioca/commands/dsl_verify.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/gem_generate.rb#6 +class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem + private + + # source://tapioca//lib/tapioca/commands/gem_generate.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/gem_sync.rb#6 +class Tapioca::Commands::GemSync < ::Tapioca::Commands::AbstractGem + private + + # source://tapioca//lib/tapioca/commands/gem_sync.rb#10 + sig { override.void } + def execute; end +end + +# source://tapioca//lib/tapioca/commands/gem_verify.rb#6 +class Tapioca::Commands::GemVerify < ::Tapioca::Commands::AbstractGem + private + + # 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::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 + + 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::CommandWithoutTracker + include ::Tapioca::SorbetHelper + + # 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#34 + sig { void } + def run_with_deprecation; end + + private + + # 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#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 } + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#18 + sig { params(args: T.untyped, local_options: T.untyped, config: T.untyped).void } + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#12 + sig { returns(::String) } + def command_name; end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#15 + sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } + def defaults; end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#34 + sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) } + def options; end + + private + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#151 + sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) } + def build_error(msg); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#176 + sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).returns(::String) } + def build_error_message(config_file, errors); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#56 + sig do + params( + options: ::Thor::CoreExt::HashWithIndifferentAccess + ).returns(::Thor::CoreExt::HashWithIndifferentAccess) + end + def config_options(options); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#46 + sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void } + def filter_defaults(options); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#194 + sig do + params( + options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess) + ).returns(::Thor::CoreExt::HashWithIndifferentAccess) + end + def merge_options(*options); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#70 + sig { params(config_file: ::String, config: T::Hash[T.untyped, T.untyped]).void } + def validate_config!(config_file, config); end + + # source://tapioca//lib/tapioca/helpers/config_helper.rb#102 + sig do + params( + command_options: T::Hash[::Symbol, ::Thor::Option], + config_key: ::String, + config_options: T::Hash[T.untyped, T.untyped] + ).returns(T::Array[::Tapioca::ConfigHelper::ConfigError]) + end + def validate_config_options(command_options, config_key, config_options); end +end + +# source://tapioca//lib/tapioca/helpers/config_helper.rb#146 +class Tapioca::ConfigHelper::ConfigError < ::T::Struct + const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] + + class << self + # source://sorbet-runtime/0.5.11372/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 :message, ::String + const :colors, T::Array[::Symbol] + + class << self + # source://sorbet-runtime/0.5.11372/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://tapioca//lib/tapioca.rb#44 +Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#40 +Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#56 +Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#41 +Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#46 +Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) + +# source://tapioca//lib/tapioca.rb#38 +Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#39 +Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/rbi_formatter.rb#31 +Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) + +# source://tapioca//lib/tapioca.rb#55 +Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://tapioca//lib/tapioca.rb#42 +Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#43 +Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/dsl/compilers.rb#5 +module Tapioca::Dsl; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/dsl/compiler.rb#6 +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#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#81 + sig { params(error: ::String).void } + def add_error(error); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#72 + sig { params(compiler_name: ::String).returns(T::Boolean) } + def compiler_enabled?(compiler_name); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#20 + sig { returns(ConstantType) } + def constant; end + + # @abstract + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#77 + sig { abstract.void } + def decorate; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#23 + sig { returns(::RBI::Tree) } + def root; end + + private + + # 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#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#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#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 + + class << self + # @abstract + # + # source://tapioca//lib/tapioca/dsl/compiler.rb#34 + sig { abstract.returns(T::Enumerable[::Module]) } + def gather_constants; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#29 + sig { params(constant: ::Module).returns(T::Boolean) } + def handles?(constant); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#37 + sig { returns(T::Set[::Module]) } + def processable_constants; end + + private + + # source://tapioca//lib/tapioca/dsl/compiler.rb#47 + sig { returns(T::Enumerable[T::Class[T.anything]]) } + def all_classes; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#55 + sig { returns(T::Enumerable[::Module]) } + def all_modules; end + end +end + +# source://tapioca//lib/tapioca/dsl/compilers.rb#6 +module Tapioca::Dsl::Compilers; end + +# DSL compilers are either built-in to Tapioca and live under the +# `Tapioca::Dsl::Compilers` namespace (i.e. this namespace), and +# can be referred to by just using the class name, or they live in +# a different namespace and can only be referred to using their fully +# qualified name. This constant encapsulates that dual lookup when +# a compiler needs to be resolved by name. +# +# source://tapioca//lib/tapioca/dsl/compilers.rb#13 +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#38 + 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, + skipped_constants: T::Array[::Module], + number_of_workers: T.nilable(::Integer) + ).void + 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), skipped_constants: 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#99 + sig { params(error: ::String).void } + def add_error(error); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#104 + sig { params(compiler_name: ::String).returns(T::Boolean) } + def compiler_enabled?(compiler_name); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#113 + sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } + def compilers; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 + sig { returns(T.proc.params(error: ::String).void) } + def error_handler; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#25 + sig { returns(T::Array[::String]) } + def errors; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#13 + sig { returns(T::Array[::Module]) } + def requested_constants; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#16 + sig { returns(T::Array[::Pathname]) } + def requested_paths; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#64 + sig do + type_parameters(:T) + .params( + blk: T.proc.params(constant: ::Module, rbi: ::RBI::File).returns(T.type_parameter(:T)) + ).returns(T::Array[T.type_parameter(:T)]) + end + def run(&blk); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 + sig { returns(T::Array[::Module]) } + def skipped_constants; end + + private + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#220 + sig { void } + def abort_if_pending_migrations!; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#165 + 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#130 + sig do + params( + requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], + excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)] + ).returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) + end + def gather_active_compilers(requested_compilers, excluded_compilers); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#144 + sig do + params( + requested_constants: T::Array[::Module], + requested_paths: T::Array[::Pathname], + skipped_constants: T::Array[::Module] + ).returns(T::Set[::Module]) + end + def gather_constants(requested_constants, requested_paths, skipped_constants); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#194 + sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } + def rbi_for_constant(constant); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#213 + sig { params(error: ::String).returns(T.noreturn) } + def report_error(error); end +end + +# source://tapioca//lib/tapioca/helpers/env_helper.rb#5 +module Tapioca::EnvHelper + requires_ancestor { Thor } + + # source://tapioca//lib/tapioca/helpers/env_helper.rb#12 + sig { params(options: T::Hash[::Symbol, T.untyped]).void } + def set_environment(options); end +end + +class Tapioca::Error < ::StandardError; end + +# source://tapioca//lib/tapioca/executor.rb#5 +class Tapioca::Executor + # source://tapioca//lib/tapioca/executor.rb#11 + sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(::Integer)).void } + def initialize(queue, number_of_workers: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/executor.rb#28 + sig do + type_parameters(:T) + .params( + block: T.proc.params(item: T.untyped).returns(T.type_parameter(:T)) + ).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 +Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer) + +# source://tapioca//lib/tapioca/gem/events.rb#5 +module Tapioca::Gem; end + +# source://tapioca//lib/tapioca/gem/events.rb#77 +class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded + # source://tapioca//lib/tapioca/gem/events.rb#84 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } + def initialize(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/events.rb#81 + sig { returns(::RBI::Const) } + def node; end +end + +# source://tapioca//lib/tapioca/gem/events.rb#26 +class Tapioca::Gem::ConstantFound < ::Tapioca::Gem::Event + # source://tapioca//lib/tapioca/gem/events.rb#36 + sig { params(symbol: ::String, constant: ::BasicObject).void } + def initialize(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/events.rb#33 + sig { returns(::BasicObject) } + def constant; end + + # source://tapioca//lib/tapioca/gem/events.rb#30 + sig { returns(::String) } + def symbol; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/gem/events.rb#6 +class Tapioca::Gem::Event + abstract! +end + +# source://tapioca//lib/tapioca/gem/events.rb#43 +class Tapioca::Gem::ForeignConstantFound < ::Tapioca::Gem::ConstantFound + # source://tapioca//lib/tapioca/gem/events.rb#52 + sig { params(symbol: ::String, constant: ::Module).void } + def initialize(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/events.rb#47 + sig { override.returns(::Module) } + def constant; end +end + +# source://tapioca//lib/tapioca/gem/events.rb#103 +class Tapioca::Gem::ForeignScopeNodeAdded < ::Tapioca::Gem::ScopeNodeAdded; end + +# source://tapioca//lib/tapioca/gem/listeners/base.rb#6 +module Tapioca::Gem::Listeners; end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/gem/listeners/base.rb#7 +class Tapioca::Gem::Listeners::Base + abstract! + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#14 + sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } + def initialize(pipeline); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#19 + sig { params(event: ::Tapioca::Gem::NodeAdded).void } + def dispatch(event); end + + private + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#49 + sig { params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#37 + sig { params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#45 + sig { params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/base.rb#41 + sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +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 + + # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#31 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +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#60 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#55 + sig { params(location: ::String).returns(T::Boolean) } + def mixed_in_by_gem?(location); end + + # source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/methods.rb#7 +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#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#71 + sig do + params( + tree: ::RBI::Tree, + symbol_name: ::String, + constant: ::Module, + method: T.nilable(::UnboundMethod), + visibility: ::RBI::Visibility + ).void + end + def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#211 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#204 + sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } + def initialize_method_for(constant); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#172 + sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } + def method_names_by_visibility(mod); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#196 + sig { params(attached_class: T.nilable(::Module), method_name: ::Symbol).returns(T.nilable(T::Boolean)) } + def method_new_in_abstract_class?(attached_class, method_name); end + + # Check whether the method is defined by the constant. + # + # In most cases, it works to check that the constant is the method owner. However, + # in the case that a method is also defined in a module prepended to the constant, it + # will be owned by the prepended module, not the constant. + # + # This method implements a better way of checking whether a constant defines a method. + # 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#158 + sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) } + def method_owned_by_constant?(method, constant); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#16 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end + + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#181 + sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) } + def struct_method?(constant, method_name); end +end + +# 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 + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#42 + sig do + params( + tree: ::RBI::Tree, + constant: ::Module, + mods: T::Array[::Module], + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type + ).void + end + def add_mixins(tree, constant, mods, mixin_type); end + + # 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#91 + sig { params(constant: ::Module).returns(T::Array[::Module]) } + def interesting_ancestors_of(constant); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#75 + sig do + params( + constant: ::Module, + mixin: ::Module, + mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type + ).returns(T::Boolean) + end + def mixed_in_by_gem?(constant, mixin, mixin_type); end + + # source://tapioca//lib/tapioca/gem/listeners/mixins.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +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 + + # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#20 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#7 +class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#25 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#13 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +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#27 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#7 +class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base + include ::Tapioca::SorbetHelper + include ::Tapioca::RBIHelper + + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#33 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#14 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#7 +class Tapioca::Gem::Listeners::SorbetRequiredAncestors < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#23 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#13 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +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 + + private + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#26 + sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) } + def compile_signature(signature, parameters); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#79 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#18 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#68 + sig { params(signature: T.untyped).returns(T::Boolean) } + def signature_final?(signature); end +end + +# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#13 +Tapioca::Gem::Listeners::SorbetSignatures::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp) + +# 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 + + # source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#27 + 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#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 +end + +# source://tapioca//lib/tapioca/gem/listeners/source_location.rb#7 +class Tapioca::Gem::Listeners::SourceLocation < ::Tapioca::Gem::Listeners::Base + private + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#41 + sig { params(node: ::RBI::NodeWithComments, file: T.nilable(::String), line: T.nilable(::Integer)).void } + def add_source_location_comment(node, file, line); end + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#13 + sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void } + def on_const(event); end + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#35 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/source_location.rb#19 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +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 + + # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#36 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#15 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +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#27 + sig { params(pipeline: ::Tapioca::Gem::Pipeline).void } + def initialize(pipeline); end + + private + + # 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#99 + sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } + def ignore?(event); end + + # 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#46 + sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void } + def on_method(event); end + + # source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#41 + sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void } + def on_scope(event); end +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#24 +Tapioca::Gem::Listeners::YardDoc::IGNORED_SIG_TAGS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gem/events.rb#105 +class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded + # source://tapioca//lib/tapioca/gem/events.rb#130 + sig do + params( + symbol: ::String, + constant: ::Module, + method: ::UnboundMethod, + node: ::RBI::Method, + signature: T.untyped, + parameters: T::Array[[::Symbol, ::String]] + ).void + end + def initialize(symbol, constant, method, node, signature, parameters); end + + # source://tapioca//lib/tapioca/gem/events.rb#109 + sig { returns(::UnboundMethod) } + def method; end + + # source://tapioca//lib/tapioca/gem/events.rb#112 + sig { returns(::RBI::Method) } + def node; end + + # source://tapioca//lib/tapioca/gem/events.rb#118 + sig { returns(T::Array[[::Symbol, ::String]]) } + def parameters; end + + # source://tapioca//lib/tapioca/gem/events.rb#115 + sig { returns(T.untyped) } + def signature; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/gem/events.rb#57 +class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event + abstract! + + # source://tapioca//lib/tapioca/gem/events.rb#70 + sig { params(symbol: ::String, constant: ::Module).void } + def initialize(symbol, constant); end + + # source://tapioca//lib/tapioca/gem/events.rb#67 + sig { returns(::Module) } + def constant; end + + # source://tapioca//lib/tapioca/gem/events.rb#64 + sig { returns(::String) } + def symbol; end +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 + + # source://tapioca//lib/tapioca/gem/pipeline.rb#17 + sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean, include_loc: T::Boolean).void } + def initialize(gem, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#48 + 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#137 + sig { params(method: ::UnboundMethod).returns(T::Boolean) } + def method_in_gem?(method); end + + # 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#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#61 + sig { params(symbol: ::String, constant: ::BasicObject).void } + def push_constant(symbol, constant); end + + # 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#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#99 + sig do + params( + symbol: ::String, + constant: ::Module, + method: ::UnboundMethod, + node: ::RBI::Method, + signature: T.untyped, + parameters: T::Array[[::Symbol, ::String]] + ).void + end + def push_method(symbol, constant, method, node, signature, parameters); end + + # 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 + + # Events handling + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#56 + sig { params(symbol: ::String).void } + def push_symbol(symbol); end + + # 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#440 + sig { params(name: ::String).void } + def add_to_alias_namespace(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#445 + sig { params(name: ::String).returns(T::Boolean) } + def alias_namespaced?(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#244 + sig { params(name: ::String, constant: ::Module).void } + def compile_alias(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#230 + sig { params(symbol: ::String, constant: ::BasicObject).void } + def compile_constant(symbol, constant); end + + # Compiling + # + # 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#298 + sig { params(name: ::String, constant: ::Module).void } + def compile_module(name, constant); end + + # 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#309 + sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } + def compile_scope(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#323 + sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } + def compile_superclass(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#421 + sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } + def defined_in_gem?(constant, strict: T.unsafe(nil)); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#177 + sig { params(event: ::Tapioca::Gem::Event).void } + def dispatch(event); end + + # Helpers + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#464 + sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } + def generic_name_of(constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#433 + sig { params(constant: ::Module).returns(T::Set[::String]) } + def get_file_candidates(constant); end + + # 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#480 + sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } + def name_of_proxy_target(constant, class_name); end + + # 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#200 + sig { params(event: ::Tapioca::Gem::ConstantFound).void } + def on_constant(event); end + + # 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#191 + sig { params(event: ::Tapioca::Gem::SymbolFound).void } + def on_symbol(event); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#452 + sig { params(name: ::String).void } + def seen!(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#457 + sig { params(name: ::String).returns(T::Boolean) } + def seen?(name); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#391 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_alias?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#379 + sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } + def skip_constant?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#408 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_foreign_constant?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#413 + sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } + def skip_module?(name, constant); end + + # source://tapioca//lib/tapioca/gem/pipeline.rb#400 + sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) } + def skip_object?(name, constant); end + + # Constants and properties filtering + # + # source://tapioca//lib/tapioca/gem/pipeline.rb#374 + sig { params(name: ::String).returns(T::Boolean) } + def skip_symbol?(name); end +end + +# this looks something like: +# "(eval at /path/to/file.rb:123)" +# and we are just interested in the "/path/to/file.rb" part +# +# source://tapioca//lib/tapioca/gem/pipeline.rb#116 +Tapioca::Gem::Pipeline::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://tapioca//lib/tapioca/gem/pipeline.rb#11 +Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array) + +# source://tapioca//lib/tapioca/gem/events.rb#90 +class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded + # source://tapioca//lib/tapioca/gem/events.rb#97 + sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } + def initialize(symbol, constant, node); end + + # source://tapioca//lib/tapioca/gem/events.rb#94 + sig { returns(::RBI::Scope) } + def node; end +end + +# source://tapioca//lib/tapioca/gem/events.rb#13 +class Tapioca::Gem::SymbolFound < ::Tapioca::Gem::Event + # source://tapioca//lib/tapioca/gem/events.rb#20 + sig { params(symbol: ::String).void } + def initialize(symbol); end + + # source://tapioca//lib/tapioca/gem/events.rb#17 + sig { returns(::String) } + def symbol; end +end + +# source://tapioca//lib/tapioca/helpers/gem_helper.rb#5 +module Tapioca::GemHelper + # source://tapioca//lib/tapioca/helpers/gem_helper.rb#9 + 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#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#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#7 +class Tapioca::Gemfile + # 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#18 + sig { returns(::Bundler::Definition) } + def definition; end + + # source://tapioca//lib/tapioca/gemfile.rb#21 + sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) } + def dependencies; end + + # 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#24 + sig { returns(T::Array[::String]) } + def missing_specs; end + + # source://tapioca//lib/tapioca/gemfile.rb#45 + sig { void } + def require_bundle; end + + private + + # source://tapioca//lib/tapioca/gemfile.rb#92 + sig { returns(::String) } + def dir; end + + # source://tapioca//lib/tapioca/gemfile.rb#54 + sig { returns(::File) } + def gemfile; end + + # source://tapioca//lib/tapioca/gemfile.rb#87 + sig { returns(T::Array[::Symbol]) } + def groups; end + + # 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#54 + def lockfile; end + + # 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#82 + sig { returns(::Bundler::Runtime) } + def runtime; end +end + +# source://tapioca//lib/tapioca/gemfile.rb#96 +class Tapioca::Gemfile::GemSpec + include ::Tapioca::GemHelper + + # source://tapioca//lib/tapioca/gemfile.rb#136 + sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } + def initialize(spec); end + + # source://tapioca//lib/tapioca/gemfile.rb#146 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://tapioca//lib/tapioca/gemfile.rb#171 + sig { params(path: ::String).returns(T::Boolean) } + def contains_path?(path); end + + # source://tapioca//lib/tapioca/gemfile.rb#161 + sig { returns(T::Array[::Gem::Dependency]) } + def dependencies; end + + # source://tapioca//lib/tapioca/gemfile.rb#201 + sig { returns(T::Boolean) } + def export_rbi_files?; end + + # source://tapioca//lib/tapioca/gemfile.rb#196 + sig { returns(T::Array[::String]) } + def exported_rbi_files; end + + # source://tapioca//lib/tapioca/gemfile.rb#206 + sig { returns(::RBI::MergeTree) } + def exported_rbi_tree; end + + # source://tapioca//lib/tapioca/gemfile.rb#133 + sig { returns(T::Array[::Pathname]) } + def files; end + + # source://tapioca//lib/tapioca/gemfile.rb#130 + sig { returns(::String) } + def full_gem_path; end + + # source://tapioca//lib/tapioca/gemfile.rb#151 + sig { params(gemfile_dir: ::String).returns(T::Boolean) } + def ignore?(gemfile_dir); end + + # source://tapioca//lib/tapioca/gemfile.rb#156 + sig { returns(::String) } + def name; end + + # source://tapioca//lib/tapioca/gemfile.rb#180 + sig { void } + def parse_yard_docs; end + + # source://tapioca//lib/tapioca/gemfile.rb#166 + sig { returns(::String) } + def rbi_file_name; end + + # source://tapioca//lib/tapioca/gemfile.rb#218 + sig { params(file: ::Pathname).returns(::Pathname) } + def relative_path_for(file); end + + # @return [String] + # + # source://tapioca//lib/tapioca/gemfile.rb#130 + def version; end + + private + + # source://tapioca//lib/tapioca/gemfile.rb#229 + sig { returns(T::Array[::Pathname]) } + def collect_files; end + + # source://tapioca//lib/tapioca/gemfile.rb#244 + sig { returns(T.nilable(T::Boolean)) } + def default_gem?; end + + # source://tapioca//lib/tapioca/gemfile.rb#303 + sig { returns(T::Boolean) } + def gem_ignored?; end + + # source://tapioca//lib/tapioca/gemfile.rb#282 + sig { params(path: ::String).returns(T::Boolean) } + def has_parent_gemspec?(path); end + + # source://tapioca//lib/tapioca/gemfile.rb#249 + sig { returns(::Regexp) } + def require_paths_prefix_matcher; end + + # source://tapioca//lib/tapioca/gemfile.rb#261 + sig { params(file: ::String).returns(::Pathname) } + def resolve_to_ruby_lib_dir(file); end + + # source://tapioca//lib/tapioca/gemfile.rb#275 + sig { returns(::String) } + def version_string; end + + class << self + # 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#116 +Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) + +# 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 +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#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#27 + sig { override.void } + def load; end + + protected + + # source://tapioca//lib/tapioca/loaders/dsl.rb#81 + sig { void } + def load_application; end + + # source://tapioca//lib/tapioca/loaders/dsl.rb#63 + sig { void } + def load_dsl_compilers; end + + # source://tapioca//lib/tapioca/loaders/dsl.rb#48 + sig { void } + def load_dsl_extensions; end + + class << self + # 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#49 + sig do + params( + bundle: ::Tapioca::Gemfile, + prerequire: T.nilable(::String), + postrequire: ::String, + default_command: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def initialize(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end + + # source://tapioca//lib/tapioca/loaders/gem.rb#34 + sig { override.void } + def load; end + + protected + + # 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#60 + sig { void } + def require_gem_file; end + + class << self + # source://tapioca//lib/tapioca/loaders/gem.rb#21 + sig do + params( + bundle: ::Tapioca::Gemfile, + prerequire: T.nilable(::String), + postrequire: ::String, + default_command: ::String, + halt_upon_load_error: T::Boolean + ).void + end + def load_application(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://tapioca//lib/tapioca/loaders/loader.rb#6 +class Tapioca::Loaders::Loader + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + include ::Tapioca::CliHelper + include ::Tapioca::GemHelper + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + abstract! + + # @abstract + # + # source://tapioca//lib/tapioca/loaders/loader.rb#17 + sig { abstract.void } + def load; end + + private + + # Rails 7.2 renamed `eager_load_paths` to `all_eager_load_paths`, which maintains the same original functionality. + # The `eager_load_paths` method still exists, but doesn't return all paths anymore and causes Tapioca to miss some + # engine paths. The following commit is the change: + # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664 + # + # @param engine [T.class_of(Rails::Engine)] + # @return [Array] + # + # source://sorbet-runtime/0.5.11372/lib/types/private/methods/_methods.rb#257 + def eager_load_paths(*args, **_arg1, &blk); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#188 + sig { void } + def eager_load_rails_app; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/loaders/loader.rb#167 + 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), + halt_upon_load_error: T::Boolean + ).void + end + def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#125 + sig { void } + def load_engines_in_classic_mode; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#103 + sig { void } + 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#78 + sig { void } + def load_rails_engines; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#209 + sig { params(file: T.nilable(::String)).void } + def require_helper(file); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#92 + def run_initializers; end + + # source://tapioca//lib/tapioca/loaders/loader.rb#181 + sig { params(path: ::String).void } + def safe_require(path); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#150 + sig { params(blk: T.proc.void).void } + def with_rails_application(&blk); end + + # source://tapioca//lib/tapioca/loaders/loader.rb#143 + sig { returns(T::Boolean) } + def zeitwerk_mode?; end +end + +# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#5 +module Tapioca::RBIFilesHelper + requires_ancestor { Tapioca::SorbetHelper } + requires_ancestor { Thor::Shell } + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#48 + sig do + params( + index: ::RBI::Index, + shim_rbi_dir: ::String, + todo_rbi_file: ::String + ).returns(T::Hash[::String, T::Array[::RBI::Node]]) + end + def duplicated_nodes_from_index(index, shim_rbi_dir:, todo_rbi_file:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#13 + sig { params(index: ::RBI::Index, kind: ::String, file: ::String).void } + def index_rbi(index, kind, file); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#25 + sig { params(index: ::RBI::Index, kind: ::String, dir: ::String, number_of_workers: T.nilable(::Integer)).void } + def index_rbis(index, kind, dir, number_of_workers:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#65 + sig { params(loc: ::RBI::Loc, path_prefix: T.nilable(::String)).returns(::String) } + def location_to_payload_url(loc, path_prefix:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#86 + sig do + params( + command: ::String, + gem_dir: ::String, + dsl_dir: ::String, + auto_strictness: T::Boolean, + gems: T::Array[::Tapioca::Gemfile::GemSpec], + 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#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#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#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#234 + sig do + params( + nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)] + ).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) + end + def extract_nodes_with_sigs(nodes); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#202 + sig do + params( + nodes: T::Array[::RBI::Node], + shim_rbi_dir: ::String, + todo_rbi_file: ::String + ).returns(T::Array[::RBI::Node]) + end + def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#266 + sig { params(path: ::String).returns(::String) } + def gem_name_from_rbi_path(path); end + + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#155 + 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#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#239 + sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } + def update_gem_rbis_strictnesses(errors, gem_dir); end +end + +# source://tapioca//lib/tapioca/rbi_formatter.rb#5 +class Tapioca::RBIFormatter < ::RBI::Formatter + # source://tapioca//lib/tapioca/rbi_formatter.rb#24 + sig { params(file: ::RBI::File).void } + def write_empty_body_comment!(file); end + + # source://tapioca//lib/tapioca/rbi_formatter.rb#15 + sig { params(file: ::RBI::File, command: ::String, reason: T.nilable(::String)).void } + def write_header!(file, command, reason: T.unsafe(nil)); end +end + +# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#5 +module Tapioca::RBIHelper + include ::Tapioca::SorbetHelper + extend ::Tapioca::SorbetHelper + extend ::Tapioca::RBIHelper + + # 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#100 + sig { params(type: ::String).returns(::String) } + def as_non_nilable_type(type); end + + # 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#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#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#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#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#42 + sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } + def create_param(name, type:); end + + # 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#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#82 + sig { params(sig_string: ::String).returns(::String) } + def sanitize_signature_types(sig_string); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#109 + sig { params(name: ::String).returns(T::Boolean) } + def valid_method_name?(name); end + + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#123 + sig { params(name: ::String).returns(T::Boolean) } + def valid_parameter_name?(name); end + + class << self + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#23 + sig do + params( + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).returns(::String) + end + def serialize_type_variable(type, variance, fixed, upper, lower); end + end +end + +# source://tapioca//lib/tapioca/repo_index.rb#5 +class Tapioca::RepoIndex + # source://tapioca//lib/tapioca/repo_index.rb#26 + sig { void } + def initialize; end + + # source://tapioca//lib/tapioca/repo_index.rb#31 + sig { params(gem_name: ::String).void } + def <<(gem_name); end + + # source://tapioca//lib/tapioca/repo_index.rb#36 + sig { returns(T::Enumerable[::String]) } + def gems; end + + # source://tapioca//lib/tapioca/repo_index.rb#41 + sig { params(gem_name: ::String).returns(T::Boolean) } + def has_gem?(gem_name); end + + class << self + # source://tapioca//lib/tapioca/repo_index.rb#18 + sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(Tapioca::RepoIndex) } + def from_hash(hash); end + + # source://tapioca//lib/tapioca/repo_index.rb#13 + sig { params(json: ::String).returns(Tapioca::RepoIndex) } + def from_json(json); end + end +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 + sig { params(constant: ::Module).void } + def initialize(constant); end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + def class_attribute_predicates; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + sig { returns(T::Array[::Symbol]) } + def class_attribute_readers; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + def class_attribute_writers; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#137 + sig { params(tree: ::RBI::Tree).void } + def compile_class_attributes(tree); end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#180 + sig { params(tree: ::RBI::Tree).returns([T::Array[::Module], T::Array[::Module]]) } + def compile_mixes_in_class_methods(tree); end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 + sig { returns(T::Array[::Module]) } + def dynamic_extends; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 + def dynamic_includes; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#132 + sig { returns(T::Boolean) } + def empty_attributes?; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#222 + sig { params(qualified_mixin_name: ::String).returns(T::Boolean) } + def filtered_mixin?(qualified_mixin_name); end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + def instance_attribute_predicates; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + sig { returns(T::Array[::Symbol]) } + def instance_attribute_readers; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + def instance_attribute_writers; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#215 + sig { params(mod: ::Module, dynamic_extends: T::Array[::Module]).returns(T::Boolean) } + def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end +end + +# This class is responsible for storing and looking up information related to generic types. +# +# The class stores 2 different kinds of data, in two separate lookup tables: +# 1. a lookup of generic type instances by name: `@generic_instances` +# 2. a lookup of type variable serializer by constant and type variable +# instance: `@type_variables` +# +# By storing the above data, we can cheaply query each constant against this registry +# to see if it declares any generic type variables. This becomes a simple lookup in the +# `@type_variables` hash table with the given constant. +# +# If there is no entry, then we can cheaply know that we can skip generic type +# information generation for this type. +# +# On the other hand, if we get a result, then the result will be a hash of type +# variable to type variable serializers. This allows us to associate type variables +# to the constant names that represent them, easily. +# +# 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#80 + sig { params(instance: ::Object).returns(T::Boolean) } + def generic_type_instance?(instance); end + + # 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 + + # This method is responsible for building the name of the instantiated concrete type + # and cloning the given constant so that we can return a type that is the same + # as the current type but is a different instance and has a different name method. + # + # We cache those cloned instances by their name in `@generic_instances`, so that + # we don't keep instantiating a new type every single time it is referenced. + # For example, `[Foo[Integer], Foo[Integer], Foo[Integer], Foo[String]]` will only + # result in 2 clones (1 for `Foo[Integer]` and another for `Foo[String]`) and + # 2 hash lookups (for the other two `Foo[Integer]`s). + # + # This method returns the created or cached clone of the constant. + # + # 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 + + # This method is called from intercepted calls to `type_member` and `type_template`. + # We get passed all the arguments to those methods, as well as the `T::Types::TypeVariable` + # instance generated by the Sorbet defined `type_member`/`type_template` call on `T::Generic`. + # + # This method creates a `String` with that data and stores it in the + # `@type_variables` lookup table, keyed by the `constant` and `type_variable`. + # + # 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#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#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#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#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#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#92 + sig { params(object: ::BasicObject, other: ::BasicObject).returns(T::Boolean) } + def are_equal?(object, other); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#56 + sig { params(object: ::BasicObject).returns(T::Class[T.anything]) } + def class_of(object); end + + # @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#61 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def constants_of(constant); end + + # Returns an array with all classes that are < than the supplied class. + # + # class C; end + # descendants_of(C) # => [] + # + # class B < C; end + # descendants_of(C) # => [B] + # + # class A < B; end + # descendants_of(C) # => [B, A] + # + # class D < C; end + # descendants_of(C) # => [B, A, D] + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#167 + sig do + type_parameters(:U) + .params( + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) + ).returns(T::Array[T.type_parameter(:U)]) + end + def descendants_of(klass); end + + # 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#145 + sig { params(constant: ::Module, method: ::Symbol).returns(::Method) } + def method_of(constant, method); end + + # 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#140 + sig { params(type: ::T::Types::Base).returns(::String) } + def name_of_type(type); end + + # 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#107 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def private_instance_methods_of(constant); end + + # 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#97 + sig { params(constant: ::Module).returns(T::Array[::Symbol]) } + def public_instance_methods_of(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#121 + sig { params(constant: ::Module).returns(T.nilable(::String)) } + def qualified_name_of(constant); end + + # Examines the call stack to identify the closest location where a "require" is performed + # 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#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#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#72 + sig { params(constant: ::Module).returns(T::Class[T.anything]) } + def singleton_class_of(constant); end + + # 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#260 + sig { params(name: ::String).returns(T::Boolean) } + def has_aliased_namespace?(name); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#255 + sig { params(method: ::UnboundMethod).returns(T::Boolean) } + def method_defined_by_forwardable_module?(method); end + + # 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#25 +Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# 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#22 +Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# 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#32 +Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# 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#27 +Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# 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#30 +Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod) + +# 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#35 +Tapioca::Runtime::Reflection::REQUIRED_FROM_LABELS = T.let(T.unsafe(nil), Array) + +# 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#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 + 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#19 + sig { void } + def eager_load_all!; end + + # 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#42 + sig do + type_parameters(:Result) + .params( + block: T.proc.returns(T.type_parameter(:Result)) + ).returns(T.type_parameter(:Result)) + end + def with_disabled_exits(&block); end + end +end + +# 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 +# classes and modules are opened for definition. This is used to track +# 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#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#71 + def files_for(klass); end + + # source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#75 + def locations_for(klass); end + end +end + +module Tapioca::Runtime::Trackers::Mixin + extend ::Tapioca::Runtime::Trackers::Tracker + + class << self + # source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#56 + sig do + params( + mixin: ::Module + ).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]]) + end + def constants_with_mixin(mixin); end + + # 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) + .params( + block: T.proc.returns(T.type_parameter(:Result)) + ).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 + +class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum + enums do + Prepend = new + Include = new + Extend = new + end +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#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#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#28 + sig { params(mod: ::Module).returns(T::Array[T.untyped]) } + def required_ancestors_by(mod); end + end +end + +# @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#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#32 + sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) } + def sorbet(*sorbet_args); end + + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#37 + sig { returns(::String) } + def sorbet_path; end + + # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#44 + sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) } + def sorbet_supports?(feature, version: T.unsafe(nil)); end +end + +# 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 +Tapioca::SorbetHelper::SORBET_BIN = T.let(T.unsafe(nil), Pathname) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#18 +Tapioca::SorbetHelper::SORBET_EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#8 +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 + +# source://tapioca//lib/tapioca/static/requires_compiler.rb#6 +class Tapioca::Static::RequiresCompiler + # source://tapioca//lib/tapioca/static/requires_compiler.rb#10 + sig { params(sorbet_path: ::String).void } + def initialize(sorbet_path); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#15 + sig { returns(::String) } + def compile; end + + private + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#29 + sig { params(config: ::Spoom::Sorbet::Config).returns(T::Array[::String]) } + def collect_files(config); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#44 + sig { params(file_path: ::String).returns(T::Enumerable[::String]) } + def collect_requires(file_path); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#51 + sig { params(config: ::Spoom::Sorbet::Config, file_path: ::Pathname).returns(T::Boolean) } + def file_ignored_by_sorbet?(config, file_path); end + + # source://tapioca//lib/tapioca/static/requires_compiler.rb#80 + sig { params(path: ::Pathname).returns(T::Array[::String]) } + def path_parts(path); end +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 + # source://tapioca//lib/tapioca/static/symbol_loader.rb#23 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def engine_symbols(gem); end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#48 + sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } + def gem_symbols(gem); end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#13 + sig { returns(T::Set[::String]) } + def payload_symbols; end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#53 + sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) } + def symbols_from_paths(paths); end + + private + + # @return [Array] + # + # source://sorbet-runtime/0.5.11372/lib/types/private/methods/_methods.rb#257 + def engines(*args, **_arg1, &blk); end + + # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 + sig { params(input: ::String, table_type: ::String).returns(::String) } + def symbol_table_json_from(input, table_type: T.unsafe(nil)); end + end +end + +# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#6 +class Tapioca::Static::SymbolTableParser + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#30 + sig { void } + def initialize; end + + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#65 + sig { params(name: ::String).returns(::String) } + def fully_qualified_name(name); end + + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#36 + sig { params(object: T::Hash[::String, T.untyped]).void } + def parse_object(object); end + + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#27 + sig { returns(T::Set[::String]) } + def symbols; end + + class << self + # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#15 + sig { params(json_string: ::String).returns(T::Set[::String]) } + def parse_json(json_string); end + end +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#35 +Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca.rb#34 +Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108 +class Tapioca::TypeVariable < ::T::Types::TypeVariable + # @return [TypeVariable] a new instance of TypeVariable + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#109 + def initialize(name, variance); end + + # Returns the value of attribute name. + # + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#114 + def name; end +end + +# This is subclassing from `Module` so that instances of this type will be modules. +# The reason why we want that is because that means those instances will automatically +# get bound to the constant names they are assigned to by Ruby. As a result, we don't +# 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#122 +class Tapioca::TypeVariableModule < ::Module + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#146 + sig do + params( + context: ::Module, + type: ::Tapioca::TypeVariableModule::Type, + variance: ::Symbol, + bounds_proc: T.nilable(T.proc.returns(T::Hash[::Symbol, T.untyped])) + ).void + end + def initialize(context, type, variance, bounds_proc); end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#181 + sig { returns(::Tapioca::TypeVariable) } + def coerce_to_type_variable; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#161 + sig { returns(T::Boolean) } + def fixed?; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#155 + sig { returns(T.nilable(::String)) } + def name; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#166 + sig { returns(::String) } + def serialize; end + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#136 + sig { returns(::Tapioca::TypeVariableModule::Type) } + def type; end + + private + + # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#188 + sig { returns(T::Hash[::Symbol, T.untyped]) } + def bounds; end +end + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#133 +Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc) + +# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#125 +class Tapioca::TypeVariableModule::Type < ::T::Enum + enums do + Member = new + 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#58 + sig { params(v: T.nilable(::String)).returns(T::Boolean) } + def check_host(v); end + + # source://uri/0.12.1/uri/generic.rb#243 + def gem_name; end + + # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 + sig { returns(T.nilable(::String)) } + def gem_version; end + + # source://uri/0.12.1/uri/generic.rb#283 + def line_number; end + + # 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#70 + sig { returns(::String) } + def to_s; end + + class << self + # source://tapioca//lib/tapioca/helpers/source_uri.rb#38 + sig do + params( + gem_name: ::String, + gem_version: T.nilable(::String), + path: ::String, + line_number: T.nilable(::String) + ).returns(::URI::Source) + end + def build(gem_name:, gem_version:, path:, line_number:); end + end +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.1.rbi new file mode 100644 index 0000000..29f825a --- /dev/null +++ b/sorbet/rbi/gems/thor@1.2.1.rbi @@ -0,0 +1,3957 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `thor` gem. +# Please instead update this file by running `bin/tapioca gem thor`. + + +# source://thor//lib/thor/command.rb#1 +class Thor + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + # source://thor//lib/thor.rb#505 + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + class << self + # Extend check unknown options to accept a hash of conditions. + # + # === Parameters + # options: A hash containing :only and/or :except keys + # + # source://thor//lib/thor.rb#255 + def check_unknown_options!(options = T.unsafe(nil)); end + + # Overwrite check_unknown_options? to take subcommands and options into account. + # + # @return [Boolean] + # + # source://thor//lib/thor.rb#268 + def check_unknown_options?(config); end + + # Prints help information for the given command. + # + # ==== Parameters + # shell + # command_name + # + # source://thor//lib/thor.rb#172 + def command_help(shell, command_name); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_command(meth = T.unsafe(nil)); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_task(meth = T.unsafe(nil)); end + + # source://thor//lib/thor/base.rb#26 + def deprecation_warning(message); end + + # Defines the usage and the description of the next command. + # + # ==== Parameters + # usage + # description + # options + # + # source://thor//lib/thor.rb#54 + def desc(usage, description, options = T.unsafe(nil)); end + + # Disable the check for required options for the given commands. + # This is useful if you have a command that does not need the required options + # to work, like help. + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#339 + def disable_required_check!(*command_names); end + + # @return [Boolean] + # + # source://thor//lib/thor.rb#343 + def disable_required_check?(command); end + + # Prints help information for this class. + # + # ==== Parameters + # shell + # + # source://thor//lib/thor.rb#195 + def help(shell, subcommand = T.unsafe(nil)); end + + # Defines the long description of the next command. + # + # ==== Parameters + # long description + # + # source://thor//lib/thor.rb#71 + def long_desc(long_description, options = T.unsafe(nil)); end + + # Maps an input to a command. If you define: + # + # map "-T" => "list" + # + # Running: + # + # thor -T + # + # Will invoke the list command. + # + # ==== Parameters + # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command. + # + # source://thor//lib/thor.rb#93 + def map(mappings = T.unsafe(nil), **kw); end + + # Adds an option to the set of method options. If :for is given as option, + # it allows you to change the options from a previous defined command. + # + # def previous_command + # # magic + # end + # + # method_option :foo => :bar, :for => :previous_command + # + # def next_command + # # magic + # end + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#155 + def method_option(name, options = T.unsafe(nil)); end + + # Declares the options for the next command to be declared. + # + # ==== Parameters + # Hash[Symbol => Object]:: The hash key is the name of the option and the value + # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric + # or :required (string). If you give a value, the type of the value is used. + # + # source://thor//lib/thor.rb#121 + def method_options(options = T.unsafe(nil)); end + + # Adds an option to the set of method options. If :for is given as option, + # it allows you to change the options from a previous defined command. + # + # def previous_command + # # magic + # end + # + # method_option :foo => :bar, :for => :previous_command + # + # def next_command + # # magic + # end + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#155 + def option(name, options = T.unsafe(nil)); end + + # Declares the options for the next command to be declared. + # + # ==== Parameters + # Hash[Symbol => Object]:: The hash key is the name of the option and the value + # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric + # or :required (string). If you give a value, the type of the value is used. + # + # source://thor//lib/thor.rb#121 + def options(options = T.unsafe(nil)); end + + # Allows for custom "Command" package naming. + # + # === Parameters + # name + # options + # + # source://thor//lib/thor.rb#12 + def package_name(name, _ = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor.rb#214 + def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor.rb#214 + def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # Registers another Thor subclass as a command. + # + # ==== Parameters + # klass:: Thor subclass to register + # command:: Subcommand name to use + # usage:: Short usage for the subcommand + # description:: Description for the subcommand + # + # source://thor//lib/thor.rb#37 + def register(klass, subcommand_name, usage, description, options = T.unsafe(nil)); end + + # Stop parsing of options as soon as an unknown option or a regular + # argument is encountered. All remaining arguments are passed to the command. + # This is useful if you have a command that can receive arbitrary additional + # options, and where those additional options should not be handled by + # Thor. + # + # ==== Example + # + # To better understand how this is useful, let's consider a command that calls + # an external command. A user may want to pass arbitrary options and + # arguments to that command. The command itself also accepts some options, + # which should be handled by Thor. + # + # class_option "verbose", :type => :boolean + # stop_on_unknown_option! :exec + # check_unknown_options! :except => :exec + # + # desc "exec", "Run a shell command" + # def exec(*args) + # puts "diagnostic output" if options[:verbose] + # Kernel.exec(*args) + # end + # + # Here +exec+ can be called with +--verbose+ to get diagnostic output, + # e.g.: + # + # $ thor exec --verbose echo foo + # diagnostic output + # foo + # + # But if +--verbose+ is given after +echo+, it is passed to +echo+ instead: + # + # $ thor exec echo --verbose foo + # --verbose foo + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#325 + def stop_on_unknown_option!(*command_names); end + + # @return [Boolean] + # + # source://thor//lib/thor.rb#329 + def stop_on_unknown_option?(command); end + + # source://thor//lib/thor.rb#234 + def subcommand(subcommand, subcommand_class); end + + # source://thor//lib/thor.rb#230 + def subcommand_classes; end + + # source://thor//lib/thor.rb#225 + def subcommands; end + + # source://thor//lib/thor.rb#234 + def subtask(subcommand, subcommand_class); end + + # source://thor//lib/thor.rb#225 + def subtasks; end + + # Prints help information for the given command. + # + # ==== Parameters + # shell + # command_name + # + # source://thor//lib/thor.rb#172 + def task_help(shell, command_name); end + + protected + + # The banner for this class. You can customize it if you are invoking the + # thor class by another ways which is not the Thor::Runner. It receives + # the command that is going to be invoked and a boolean which indicates if + # the namespace should be displayed as arguments. + # + # source://thor//lib/thor.rb#400 + def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://thor//lib/thor.rb#406 + def baseclass; end + + # source://thor//lib/thor.rb#414 + def create_command(meth); end + + # source://thor//lib/thor.rb#414 + def create_task(meth); end + + # help command has the required check disabled by default. + # + # source://thor//lib/thor.rb#354 + def disable_required_check; end + + # The method responsible for dispatching given the args. + # + # @yield [instance] + # + # source://thor//lib/thor.rb#359 + def dispatch(meth, given_args, given_opts, config); end + + # source://thor//lib/thor.rb#410 + def dynamic_command_class; end + + # this is the logic that takes the command name passed in by the user + # and determines whether it is an unambiguous substrings of a command or + # alias name. + # + # source://thor//lib/thor.rb#476 + def find_command_possibilities(meth); end + + # this is the logic that takes the command name passed in by the user + # and determines whether it is an unambiguous substrings of a command or + # alias name. + # + # source://thor//lib/thor.rb#476 + def find_task_possibilities(meth); end + + # source://thor//lib/thor.rb#436 + def initialize_added; end + + # receives a (possibly nil) command name and returns a name that is in + # the commands hash. In addition to normalizing aliases, this logic + # will determine if a shortened command is an unambiguous substring of + # a command or alias. + # + # +normalize_command_name+ also converts names like +animal-prison+ + # into +animal_prison+. + # + # @raise [AmbiguousTaskError] + # + # source://thor//lib/thor.rb#455 + def normalize_command_name(meth); end + + # receives a (possibly nil) command name and returns a name that is in + # the commands hash. In addition to normalizing aliases, this logic + # will determine if a shortened command is an unambiguous substring of + # a command or alias. + # + # +normalize_command_name+ also converts names like +animal-prison+ + # into +animal_prison+. + # + # @raise [AmbiguousTaskError] + # + # source://thor//lib/thor.rb#455 + def normalize_task_name(meth); end + + # Retrieve the command name from given args. + # + # source://thor//lib/thor.rb#442 + def retrieve_command_name(args); end + + # Retrieve the command name from given args. + # + # source://thor//lib/thor.rb#442 + def retrieve_task_name(args); end + + # source://thor//lib/thor.rb#349 + def stop_on_unknown_option; end + + # source://thor//lib/thor.rb#491 + def subcommand_help(cmd); end + + # source://thor//lib/thor.rb#491 + def subtask_help(cmd); end + end +end + +# source://thor//lib/thor/actions/empty_directory.rb#2 +module Thor::Actions + mixes_in_class_methods ::Thor::Actions::ClassMethods + + # Extends initializer to add more configuration options. + # + # ==== Configuration + # behavior:: The actions default behavior. Can be :invoke or :revoke. + # It also accepts :force, :skip and :pretend to set the behavior + # and the respective option. + # + # destination_root:: The root directory needed for some actions. + # + # source://thor//lib/thor/actions.rb#72 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Wraps an action object and call it accordingly to the thor class behavior. + # + # source://thor//lib/thor/actions.rb#89 + def action(instance); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # data:: the data to append to the file. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def add_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # source:: the relative path to the source root. + # config:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def add_link(destination, *args); end + + # Append text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to append to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#195 + def append_file(path, *args, &block); end + + # Append text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to append to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#195 + def append_to_file(path, *args, &block); end + + # Loads an external file and execute it in the instance binding. + # + # ==== Parameters + # path:: The path to the file to execute. Can be a web address or + # a relative path from the source root. + # + # ==== Examples + # + # apply "http://gist.github.com/103208" + # + # apply "recipes/jquery.rb" + # + # source://thor//lib/thor/actions.rb#216 + def apply(path, config = T.unsafe(nil)); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions.rb#10 + def behavior; end + + # Sets the attribute behavior + # + # @param value the value to set the attribute behavior to. + # + # source://thor//lib/thor/actions.rb#10 + def behavior=(_arg0); end + + # Changes the mode of the given file or directory. + # + # ==== Parameters + # mode:: the file mode + # path:: the name of the file to change mode + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # chmod "script/server", 0755 + # + # source://thor//lib/thor/actions/file_manipulation.rb#148 + def chmod(path, mode, config = T.unsafe(nil)); end + + # Comment all lines matching a given regex. It will leave the space + # which existed before the beginning of the line in tact and will insert + # a single space after the comment hash. + # + # ==== Parameters + # path:: path of the file to be changed + # flag:: the regexp or string used to decide which lines to comment + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # comment_lines 'config/initializers/session_store.rb', /cookie_store/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#312 + def comment_lines(path, flag, *args); end + + # ==== Examples + # + # copy_file "README", "doc/README" + # + # copy_file "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#21 + def copy_file(source, *args, &block); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # data:: the data to append to the file. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def create_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # source:: the relative path to the source root. + # config:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def create_link(destination, *args); end + + # Returns the root for this thor class (also aliased as destination root). + # + # source://thor//lib/thor/actions.rb#99 + def destination_root; end + + # Sets the root for this thor class. Relatives path are added to the + # directory where the script was invoked and expanded. + # + # source://thor//lib/thor/actions.rb#106 + def destination_root=(root); end + + # Copies recursively the files from source directory to root directory. + # If any of the files finishes with .tt, it's considered to be a template + # and is placed in the destination without the extension .tt. If any + # empty directory is found, it's copied and all .empty_directory files are + # ignored. If any file name is wrapped within % signs, the text within + # the % signs will be executed as a method and replaced with the returned + # value. Let's suppose a doc directory with the following files: + # + # doc/ + # components/.empty_directory + # README + # rdoc.rb.tt + # %app_name%.rb + # + # When invoked as: + # + # directory "doc" + # + # It will create a doc directory in the destination with the following + # files (assuming that the `app_name` method returns the value "blog"): + # + # doc/ + # components/ + # README + # rdoc.rb + # blog.rb + # + # Encoded path note: Since Thor internals use Object#respond_to? to check if it can + # expand %something%, this `something` should be a public method in the class calling + # #directory. If a method is private, Thor stack raises PrivateMethodEncodedError. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # If :recursive => false, does not look for paths recursively. + # If :mode => :preserve, preserve the file mode from the source. + # If :exclude_pattern => /regexp/, prevents copying files that match that regexp. + # + # ==== Examples + # + # directory "doc" + # directory "doc", "docs", :recursive => false + # + # source://thor//lib/thor/actions/directory.rb#49 + def directory(source, *args, &block); end + + # Creates an empty directory. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # empty_directory "doc" + # + # source://thor//lib/thor/actions/empty_directory.rb#13 + def empty_directory(destination, config = T.unsafe(nil)); end + + # Receives a file or directory and search for it in the source paths. + # + # @raise [Error] + # + # source://thor//lib/thor/actions.rb#133 + def find_in_source_paths(file); end + + # Gets the content at the given address and places it at the given relative + # destination. If a block is given instead of destination, the content of + # the url is yielded and used as location. + # + # +get+ relies on open-uri, so passing application user input would provide + # a command injection attack vector. + # + # ==== Parameters + # source:: the address of the given content. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # get "http://gist.github.com/103208", "doc/README" + # + # get "http://gist.github.com/103208" do |content| + # content.split("\n").first + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#79 + def get(source, *args, &block); end + + # Run a regular expression replacement on a file. + # + # ==== Parameters + # path:: path of the file to be changed + # 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. + # + # ==== Example + # + # gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1' + # + # gsub_file 'README', /rake/, :green do |match| + # match << " no more. Use thor!" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#265 + def gsub_file(path, flag, *args, &block); end + + # Goes to the root and execute the given block. + # + # source://thor//lib/thor/actions.rb#200 + def in_root; end + + # Injects text right after the class definition. Since it depends on + # insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # klass:: the class to be manipulated + # data:: the data to append to the class, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController", " filter_parameter :password\n" + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do + # " filter_parameter :password\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#219 + def inject_into_class(path, klass, *args, &block); end + + # source://thor//lib/thor/actions/inject_into_file.rb#26 + def inject_into_file(destination, *args, &block); end + + # Injects text right after the module definition. Since it depends on + # insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # module_name:: the module to be manipulated + # data:: the data to append to the class, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", " def help; 'help'; end\n" + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do + # " def help; 'help'; end\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#242 + def inject_into_module(path, module_name, *args, &block); end + + # source://thor//lib/thor/actions/inject_into_file.rb#26 + def insert_into_file(destination, *args, &block); end + + # Do something in the root or on a provided subfolder. If a relative path + # is given it's referenced from the current root. The full path is yielded + # to the block you provide. The path is set back to the previous path when + # the method exits. + # + # Returns the value yielded by the block. + # + # ==== Parameters + # dir:: the directory to move to. + # config:: give :verbose => true to log and use padding. + # + # source://thor//lib/thor/actions.rb#170 + def inside(dir = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # Links the file from the relative source to the relative destination. If + # the destination is not given it's assumed to be equal to the source. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # link_file "README", "doc/README" + # + # link_file "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#51 + def link_file(source, *args); end + + # Prepend text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to prepend to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#173 + def prepend_file(path, *args, &block); end + + # Prepend text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to prepend to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#173 + def prepend_to_file(path, *args, &block); end + + # Returns the given path relative to the absolute root (ie, root where + # the script started). + # + # source://thor//lib/thor/actions.rb#114 + def relative_to_original_destination_root(path, remove_dot = T.unsafe(nil)); end + + # Removes a file at the given location. + # + # ==== Parameters + # path:: path of the file to be changed + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#329 + def remove_dir(path, config = T.unsafe(nil)); end + + # Removes a file at the given location. + # + # ==== Parameters + # path:: path of the file to be changed + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#329 + def remove_file(path, config = T.unsafe(nil)); end + + # Executes a command returning the contents of the command. + # + # ==== Parameters + # command:: the command to be executed. + # config:: give :verbose => false to not log the status, :capture => true to hide to output. Specify :with + # to append an executable to command execution. + # + # ==== Example + # + # inside('vendor') do + # run('ln -s ~/edge rails') + # end + # + # source://thor//lib/thor/actions.rb#248 + def run(command, config = T.unsafe(nil)); end + + # Executes a ruby script (taking into account WIN32 platform quirks). + # + # ==== Parameters + # command:: the command to be executed. + # config:: give :verbose => false to not log the status. + # + # source://thor//lib/thor/actions.rb#285 + def run_ruby_script(command, config = T.unsafe(nil)); end + + # Holds source paths in instance so they can be manipulated. + # + # source://thor//lib/thor/actions.rb#127 + def source_paths; end + + # Gets an ERB template at the relative source, executes it and makes a copy + # at the relative destination. If the destination is not given it's assumed + # to be equal to the source removing .tt from the filename. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # template "README", "doc/README" + # + # template "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#115 + def template(source, *args, &block); end + + # Run a thor command. A hash of options can be given and it's converted to + # switches. + # + # ==== Parameters + # command:: the command to be invoked + # args:: arguments to the command + # config:: give :verbose => false to not log the status, :capture => true to hide to output. + # Other options are given as parameter to Thor. + # + # + # ==== Examples + # + # thor :install, "http://gist.github.com/103208" + # #=> thor install http://gist.github.com/103208 + # + # thor :list, :all => true, :substring => 'rails' + # #=> thor list --all --substring=rails + # + # source://thor//lib/thor/actions.rb#308 + def thor(command, *args); end + + # Uncomment all lines matching a given regex. It will leave the space + # which existed before the comment hash in tact but will remove any spacing + # between the comment hash and the beginning of the line. + # + # ==== Parameters + # path:: path of the file to be changed + # flag:: the regexp or string used to decide which lines to uncomment + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # uncomment_lines 'config/initializers/session_store.rb', /active_record/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#293 + def uncomment_lines(path, flag, *args); end + + protected + + # source://thor//lib/thor/actions.rb#329 + def _cleanup_options_and_set(options, key); end + + # Allow current root to be shared between invocations. + # + # source://thor//lib/thor/actions.rb#325 + def _shared_configuration; end + + private + + # source://thor//lib/thor/actions/file_manipulation.rb#350 + def capture(*args); end + + # source://thor//lib/thor/actions/file_manipulation.rb#346 + def concat(string); end + + # Returns the value of attribute output_buffer. + # + # source://thor//lib/thor/actions/file_manipulation.rb#341 + def output_buffer; end + + # Sets the attribute output_buffer + # + # @param value the value to set the attribute output_buffer to. + # + # source://thor//lib/thor/actions/file_manipulation.rb#341 + def output_buffer=(_arg0); end + + # source://thor//lib/thor/actions/file_manipulation.rb#354 + def with_output_buffer(buf = T.unsafe(nil)); end + + class << self + # source://thor//lib/thor/actions.rb#12 + def included(base); end + end +end + +# Thor::Actions#capture depends on what kind of buffer is used in ERB. +# Thus CapturableERB fixes ERB to use String buffer. +# +# source://thor//lib/thor/actions/file_manipulation.rb#366 +class Thor::Actions::CapturableERB < ::ERB + # source://thor//lib/thor/actions/file_manipulation.rb#367 + def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end +end + +# source://thor//lib/thor/actions.rb#17 +module Thor::Actions::ClassMethods + # Add runtime options that help actions execution. + # + # source://thor//lib/thor/actions.rb#48 + def add_runtime_options!; end + + # Hold source paths for one Thor instance. source_paths_for_search is the + # method responsible to gather source_paths from this current class, + # inherited paths and the source root. + # + # source://thor//lib/thor/actions.rb#22 + def source_paths; end + + # Returns the source paths in the following order: + # + # 1) This class source paths + # 2) Source root + # 3) Parents source paths + # + # source://thor//lib/thor/actions.rb#38 + def source_paths_for_search; end + + # Stores and return the source root for this class + # + # source://thor//lib/thor/actions.rb#27 + def source_root(path = T.unsafe(nil)); end +end + +# CreateFile is a subset of Template, which instead of rendering a file with +# ERB, it gets the content from the user. +# +# source://thor//lib/thor/actions/create_file.rb#32 +class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory + # @return [CreateFile] a new instance of CreateFile + # + # source://thor//lib/thor/actions/create_file.rb#35 + def initialize(base, destination, data, config = T.unsafe(nil)); end + + # source://thor//lib/thor/actions/create_file.rb#33 + def data; end + + # Checks if the content of the file at the destination is identical to the rendered result. + # + # ==== Returns + # Boolean:: true if it is identical, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_file.rb#45 + def identical?; end + + # source://thor//lib/thor/actions/create_file.rb#59 + def invoke!; end + + # Holds the content to be added to the file. + # + # source://thor//lib/thor/actions/create_file.rb#51 + def render; end + + protected + + # Shows the file collision menu to the user and gets the result. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_file.rb#99 + def force_on_collision?; end + + # If force is true, run the action, otherwise check if it's not being + # skipped. If both are false, show the file_collision menu, if the menu + # returns true, force it, otherwise skip. + # + # source://thor//lib/thor/actions/create_file.rb#85 + def force_or_skip_or_conflict(force, skip, &block); end + + # Now on conflict we check if the file is identical or not. + # + # source://thor//lib/thor/actions/create_file.rb#72 + def on_conflict_behavior(&block); end +end + +# CreateLink is a subset of CreateFile, which instead of taking a block of +# data, just takes a source string from the user. +# +# source://thor//lib/thor/actions/create_link.rb#27 +class Thor::Actions::CreateLink < ::Thor::Actions::CreateFile + # source://thor//lib/thor/actions/create_link.rb#28 + def data; end + + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_link.rb#56 + def exists?; end + + # Checks if the content of the file at the destination is identical to the rendered result. + # + # ==== Returns + # Boolean:: true if it is identical, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/create_link.rb#35 + def identical?; end + + # source://thor//lib/thor/actions/create_link.rb#40 + def invoke!; end +end + +# source://thor//lib/thor/actions/directory.rb#55 +class Thor::Actions::Directory < ::Thor::Actions::EmptyDirectory + # @return [Directory] a new instance of Directory + # + # source://thor//lib/thor/actions/directory.rb#58 + def initialize(base, source, destination = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # source://thor//lib/thor/actions/directory.rb#64 + def invoke!; end + + # source://thor//lib/thor/actions/directory.rb#69 + def revoke!; end + + # Returns the value of attribute source. + # + # source://thor//lib/thor/actions/directory.rb#56 + def source; end + + protected + + # source://thor//lib/thor/actions/directory.rb#75 + def execute!; end + + # source://thor//lib/thor/actions/directory.rb#99 + def file_level_lookup(previous_lookup); end + + # source://thor//lib/thor/actions/directory.rb#103 + def files(lookup); end +end + +# source://thor//lib/thor/actions/empty_directory.rb#23 +class Thor::Actions::EmptyDirectory + # Initializes given the source and destination. + # + # ==== Parameters + # base:: A Thor::Base instance + # source:: Relative path to the source of this file + # destination:: Relative path to the destination of this file + # config:: give :verbose => false to not log the status. + # + # @return [EmptyDirectory] a new instance of EmptyDirectory + # + # source://thor//lib/thor/actions/empty_directory.rb#34 + def initialize(base, destination, config = T.unsafe(nil)); end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def base; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def config; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def destination; end + + # Checks if the destination file already exists. + # + # ==== Returns + # Boolean:: true if the file exists, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#45 + def exists?; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def given_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#49 + def invoke!; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def relative_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#56 + def revoke!; end + + protected + + # Filenames in the encoded form are converted. If you have a file: + # + # %file_name%.rb + # + # It calls #file_name from the base and replaces %-string with the + # return value (should be String) of #file_name: + # + # user.rb + # + # The method referenced can be either public or private. + # + # source://thor//lib/thor/actions/empty_directory.rb#103 + def convert_encoded_instructions(filename); end + + # Sets the absolute destination value from a relative destination value. + # It also stores the given and relative destination. Let's suppose our + # script is being executed on "dest", it sets the destination root to + # "dest". The destination, given_destination and relative_destination + # are related in the following way: + # + # inside "bar" do + # empty_directory "baz" + # end + # + # destination #=> dest/bar/baz + # relative_destination #=> bar/baz + # given_destination #=> baz + # + # source://thor//lib/thor/actions/empty_directory.rb#85 + def destination=(destination); end + + # Receives a hash of options and just execute the block if some + # conditions are met. + # + # source://thor//lib/thor/actions/empty_directory.rb#113 + def invoke_with_conflict_check(&block); end + + # What to do when the destination file already exists. + # + # source://thor//lib/thor/actions/empty_directory.rb#132 + def on_conflict_behavior; end + + # source://thor//lib/thor/actions/empty_directory.rb#126 + def on_file_clash_behavior; end + + # Shortcut for pretend. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#67 + def pretend?; end + + # Shortcut to say_status shell method. + # + # source://thor//lib/thor/actions/empty_directory.rb#138 + def say_status(status, color); end +end + +# source://thor//lib/thor/actions/inject_into_file.rb#36 +class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory + # @return [InjectIntoFile] a new instance of InjectIntoFile + # + # source://thor//lib/thor/actions/inject_into_file.rb#39 + def initialize(base, destination, data, config); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def behavior; end + + # Returns the value of attribute flag. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def flag; end + + # source://thor//lib/thor/actions/inject_into_file.rb#52 + def invoke!; end + + # Returns the value of attribute replacement. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def replacement; end + + # source://thor//lib/thor/actions/inject_into_file.rb#72 + def revoke!; end + + protected + + # Adds the content to the file. + # + # source://thor//lib/thor/actions/inject_into_file.rb#108 + def replace!(regexp, string, force); end + + # source://thor//lib/thor/actions/inject_into_file.rb#88 + def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end +end + +# Injects the given content into a file. Different from gsub_file, this +# method is reversible. +# +# ==== Parameters +# destination:: Relative path to the destination root +# data:: Data to add to the file. Can be given as a block. +# config:: give :verbose => false to not log the status and the flag +# for injection (:after or :before) or :force => true for +# insert two or more times the same content. +# +# ==== Examples +# +# insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" +# +# insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do +# gems = ask "Which gems would you like to add?" +# gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") +# 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 +class Thor::AmbiguousCommandError < ::Thor::Error; end + +# source://thor//lib/thor/error.rb#62 +Thor::AmbiguousTaskError = Thor::AmbiguousCommandError + +# source://thor//lib/thor/parser/argument.rb#2 +class Thor::Argument + # @raise [ArgumentError] + # @return [Argument] a new instance of Argument + # + # source://thor//lib/thor/parser/argument.rb#8 + def initialize(name, options = T.unsafe(nil)); end + + # Returns the value of attribute banner. + # + # source://thor//lib/thor/parser/argument.rb#5 + def banner; end + + # Returns the value of attribute default. + # + # source://thor//lib/thor/parser/argument.rb#5 + def default; end + + # Returns the value of attribute description. + # + # source://thor//lib/thor/parser/argument.rb#5 + def description; end + + # Returns the value of attribute enum. + # + # source://thor//lib/thor/parser/argument.rb#5 + def enum; end + + # Returns the value of attribute name. + # + # source://thor//lib/thor/parser/argument.rb#5 + def human_name; end + + # Returns the value of attribute name. + # + # source://thor//lib/thor/parser/argument.rb#5 + def name; end + + # Returns the value of attribute required. + # + # source://thor//lib/thor/parser/argument.rb#5 + def required; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#31 + def required?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#35 + def show_default?; end + + # Returns the value of attribute type. + # + # source://thor//lib/thor/parser/argument.rb#5 + def type; end + + # source://thor//lib/thor/parser/argument.rb#27 + def usage; end + + protected + + # source://thor//lib/thor/parser/argument.rb#55 + def default_banner; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/argument.rb#51 + def valid_type?(type); end + + # @raise [ArgumentError] + # + # source://thor//lib/thor/parser/argument.rb#46 + def validate!; end +end + +# source://thor//lib/thor/parser/argument.rb#3 +Thor::Argument::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/parser/arguments.rb#2 +class Thor::Arguments + # Takes an array of Thor::Argument objects. + # + # @return [Arguments] a new instance of Arguments + # + # source://thor//lib/thor/parser/arguments.rb#26 + def initialize(arguments = T.unsafe(nil)); end + + # source://thor//lib/thor/parser/arguments.rb#44 + def parse(args); end + + # source://thor//lib/thor/parser/arguments.rb#57 + def remaining; end + + private + + # Raises an error if @non_assigned_required array is not empty. + # + # @raise [RequiredArgumentMissingError] + # + # source://thor//lib/thor/parser/arguments.rb#170 + def check_requirement!; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#88 + def current_is_value?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#68 + def last?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/arguments.rb#63 + def no_or_skip?(arg); end + + # Runs through the argument array getting all strings until no string is + # found or a switch is found. + # + # ["a", "b", "c"] + # + # And returns it as an array: + # + # ["a", "b", "c"] + # + # source://thor//lib/thor/parser/arguments.rb#122 + def parse_array(name); end + + # Runs through the argument array getting strings that contains ":" and + # mark it as a hash: + # + # [ "name:string", "age:integer" ] + # + # Becomes: + # + # { "name" => "string", "age" => "integer" } + # + # source://thor//lib/thor/parser/arguments.rb#101 + def parse_hash(name); end + + # Check if the peek is numeric format and return a Float or Integer. + # Check if the peek is included in enum if enum is provided. + # Otherwise raises an error. + # + # source://thor//lib/thor/parser/arguments.rb#133 + def parse_numeric(name); end + + # Parse string: + # for --string-arg, just return the current value in the pile + # for --no-string-arg, nil + # Check if the peek is included in enum if enum is provided. Otherwise raises an error. + # + # source://thor//lib/thor/parser/arguments.rb#154 + def parse_string(name); end + + # source://thor//lib/thor/parser/arguments.rb#72 + def peek; end + + # source://thor//lib/thor/parser/arguments.rb#76 + def shift; end + + # source://thor//lib/thor/parser/arguments.rb#80 + def unshift(arg); end + + class << self + # source://thor//lib/thor/parser/arguments.rb#19 + def parse(*args); end + + # Receives an array of args and returns two arrays, one with arguments + # and one with switches. + # + # source://thor//lib/thor/parser/arguments.rb#8 + def split(args); end + end +end + +# source://thor//lib/thor/parser/arguments.rb#3 +Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/shell.rb#4 +module Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + + mixes_in_class_methods ::Thor::Base::ClassMethods + mixes_in_class_methods ::Thor::Invocation::ClassMethods + + # It receives arguments in an Array and two hashes, one for options and + # other for configuration. + # + # Notice that it does not check if all required arguments were supplied. + # It should be done by the parser. + # + # ==== Parameters + # args:: An array of objects. The objects are applied to their + # respective accessors declared with argument. + # + # options:: An options hash that will be available as self.options. + # The hash given is converted to a hash with indifferent + # access, magic predicates (options.skip?) and then frozen. + # + # config:: Configuration for this Thor class. + # + # source://thor//lib/thor/base.rb#53 + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Returns the value of attribute args. + # + # source://thor//lib/thor/base.rb#35 + def args; end + + # Sets the attribute args + # + # @param value the value to set the attribute args to. + # + # source://thor//lib/thor/base.rb#35 + def args=(_arg0); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/base.rb#35 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://thor//lib/thor/base.rb#35 + def options=(_arg0); end + + # Returns the value of attribute parent_options. + # + # source://thor//lib/thor/base.rb#35 + def parent_options; end + + # Sets the attribute parent_options + # + # @param value the value to set the attribute parent_options to. + # + # source://thor//lib/thor/base.rb#35 + def parent_options=(_arg0); end + + class << self + # source://thor//lib/thor/base.rb#100 + def included(base); end + + # Whenever a class inherits from Thor or Thor::Group, we should track the + # class and the file on Thor::Base. This is the method responsible for it. + # + # source://thor//lib/thor/base.rb#128 + def register_klass_file(klass); end + + # Returns the shell used in all Thor classes. If you are in a Unix platform + # it will use a colored log, otherwise it will use a basic one without color. + # + # source://thor//lib/thor/shell.rb#11 + def shell; end + + # Sets the attribute shell + # + # @param value the value to set the attribute shell to. + # + # source://thor//lib/thor/shell.rb#6 + def shell=(_arg0); end + + # Returns the files where the subclasses are kept. + # + # ==== Returns + # Hash[path => Class] + # + # source://thor//lib/thor/base.rb#121 + def subclass_files; end + + # Returns the classes that inherits from Thor or Thor::Group. + # + # ==== Returns + # Array[Class] + # + # source://thor//lib/thor/base.rb#112 + def subclasses; end + end +end + +# source://thor//lib/thor/base.rb#137 +module Thor::Base::ClassMethods + # Returns the commands for this Thor class and all subclasses. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#383 + def all_commands; end + + # Returns the commands for this Thor class and all subclasses. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#383 + def all_tasks; end + + # If you want to use defaults that don't match the type of an option, + # either specify `check_default_type: false` or call `allow_incompatible_default_type!` + # + # source://thor//lib/thor/base.rb#173 + def allow_incompatible_default_type!; end + + # Adds an argument to the class and creates an attr_accessor for it. + # + # Arguments are different from options in several aspects. The first one + # is how they are parsed from the command line, arguments are retrieved + # from position: + # + # thor command NAME + # + # Instead of: + # + # thor command --name=NAME + # + # Besides, arguments are used inside your code as an accessor (self.argument), + # while options are all kept in a hash (self.options). + # + # Finally, arguments cannot have type :default or :boolean but can be + # optional (supplying :optional => :true or :required => false), although + # you cannot have a required argument after a non-required argument. If you + # try it, an error is raised. + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :optional - If the argument is optional or not. + # :type - The type of the argument, can be :string, :hash, :array, :numeric. + # :default - Default value for this argument. It cannot be required and have default values. + # :banner - String to show on usage notes. + # + # ==== Errors + # ArgumentError:: Raised if you supply a required argument after a non required one. + # + # source://thor//lib/thor/base.rb#245 + def argument(name, options = T.unsafe(nil)); end + + # Returns this class arguments, looking up in the ancestors chain. + # + # ==== Returns + # Array[Thor::Argument] + # + # source://thor//lib/thor/base.rb#277 + def arguments; end + + # source://thor//lib/thor/base.rb#146 + def attr_accessor(*_arg0); end + + # source://thor//lib/thor/base.rb#138 + def attr_reader(*_arg0); end + + # source://thor//lib/thor/base.rb#142 + def attr_writer(*_arg0); end + + # source://thor//lib/thor/base.rb#177 + def check_default_type; end + + # If you want to raise an error when the default value of an option does not match + # the type call check_default_type! + # This will be the default; for compatibility a deprecation warning is issued if necessary. + # + # source://thor//lib/thor/base.rb#167 + def check_default_type!; end + + # source://thor//lib/thor/base.rb#156 + def check_unknown_options; end + + # If you want to raise an error for unknown options, call check_unknown_options! + # This is disabled by default to allow dynamic invocations. + # + # source://thor//lib/thor/base.rb#152 + def check_unknown_options!; end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#160 + def check_unknown_options?(config); end + + # Adds an option to the set of class options + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc:: -- Description for the argument. + # :required:: -- If the argument is required or not. + # :default:: -- Default value for this argument. + # :group:: -- The group for this options. Use by class options to output options in different levels. + # :aliases:: -- Aliases for this option. Note: Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead. + # :type:: -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner:: -- String to show on usage notes. + # :hide:: -- If you want to hide this option from the help. + # + # source://thor//lib/thor/base.rb#312 + def class_option(name, options = T.unsafe(nil)); end + + # Adds a bunch of options to the set of class options. + # + # class_options :foo => false, :bar => :required, :baz => :string + # + # If you prefer more detailed declaration, check class_option. + # + # ==== Parameters + # Hash[Symbol => Object] + # + # source://thor//lib/thor/base.rb#290 + def class_options(options = T.unsafe(nil)); end + + # Returns the commands for this Thor class. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#372 + def commands; end + + # If true, option set will not suspend the execution of the command when + # a required option is not provided. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#191 + def disable_required_check?(command_name); end + + # A flag that makes the process exit with status 1 if any error happens. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#529 + def exit_on_failure?; end + + # Defines the group. This is used when thor list is invoked so you can specify + # that only commands from a pre-defined group will be shown. Defaults to standard. + # + # ==== Parameters + # name + # + # source://thor//lib/thor/base.rb#358 + def group(name = T.unsafe(nil)); end + + # @raise [InvocationError] + # + # source://thor//lib/thor/base.rb#519 + def handle_argument_error(command, error, args, arity); end + + # @raise [UndefinedCommandError] + # + # source://thor//lib/thor/base.rb#514 + def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end + + # @raise [UndefinedCommandError] + # + # source://thor//lib/thor/base.rb#514 + def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end + + # Sets the namespace for the Thor or Thor::Group class. By default the + # namespace is retrieved from the class name. If your Thor class is named + # Scripts::MyScript, the help method, for example, will be called as: + # + # thor scripts:my_script -h + # + # If you change the namespace: + # + # namespace :my_scripts + # + # You change how your commands are invoked: + # + # thor my_scripts -h + # + # Finally, if you change your namespace to default: + # + # namespace :default + # + # Your commands can be invoked with a shortcut. Instead of: + # + # thor :my_command + # + # source://thor//lib/thor/base.rb#467 + def namespace(name = T.unsafe(nil)); end + + # All methods defined inside the given block are not added as commands. + # + # So you can do: + # + # class MyScript < Thor + # no_commands do + # def this_is_not_a_command + # end + # end + # end + # + # You can also add the method and remove it from the command list: + # + # class MyScript < Thor + # def this_is_not_a_command + # end + # remove_command :this_is_not_a_command + # end + # + # source://thor//lib/thor/base.rb#431 + def no_commands(&block); end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#441 + def no_commands?; end + + # source://thor//lib/thor/base.rb#437 + def no_commands_context; end + + # All methods defined inside the given block are not added as commands. + # + # So you can do: + # + # class MyScript < Thor + # no_commands do + # def this_is_not_a_command + # end + # end + # end + # + # You can also add the method and remove it from the command list: + # + # class MyScript < Thor + # def this_is_not_a_command + # end + # remove_command :this_is_not_a_command + # end + # + # source://thor//lib/thor/base.rb#431 + def no_tasks(&block); end + + # Allows to use private methods from parent in child classes as commands. + # + # ==== Parameters + # names:: Method names to be used as commands + # + # ==== Examples + # + # public_command :foo + # public_command :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#507 + def public_command(*names); end + + # Allows to use private methods from parent in child classes as commands. + # + # ==== Parameters + # names:: Method names to be used as commands + # + # ==== Examples + # + # public_command :foo + # public_command :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#507 + def public_task(*names); end + + # Removes a previous defined argument. If :undefine is given, undefine + # accessors as well. + # + # ==== Parameters + # names:: Arguments to be removed + # + # ==== Examples + # + # remove_argument :foo + # remove_argument :foo, :bar, :baz, :undefine => true + # + # source://thor//lib/thor/base.rb#327 + def remove_argument(*names); end + + # Removes a previous defined class option. + # + # ==== Parameters + # names:: Class options to be removed + # + # ==== Examples + # + # remove_class_option :foo + # remove_class_option :foo, :bar, :baz + # + # source://thor//lib/thor/base.rb#346 + def remove_class_option(*names); end + + # Removes a given command from this Thor class. This is usually done if you + # are inheriting from another class and don't want it to be available + # anymore. + # + # By default it only remove the mapping to the command. But you can supply + # :undefine => true to undefine the method from the class as well. + # + # ==== Parameters + # name:: The name of the command to be removed + # options:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#401 + def remove_command(*names); end + + # Removes a given command from this Thor class. This is usually done if you + # are inheriting from another class and don't want it to be available + # anymore. + # + # By default it only remove the mapping to the command. But you can supply + # :undefine => true to undefine the method from the class as well. + # + # ==== Parameters + # name:: The name of the command to be removed + # options:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#401 + def remove_task(*names); end + + # Parses the command and options from the given args, instantiate the class + # and invoke the command. This method is used when the arguments must be parsed + # from an array. If you are inside Ruby and want to use a Thor class, you + # can simply initialize it: + # + # script = MyScript.new(args, options, config) + # script.invoke(:command, first_arg, second_arg, third_arg) + # + # source://thor//lib/thor/base.rb#483 + def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end + + # If true, option parsing is suspended as soon as an unknown option or a + # regular argument is encountered. All remaining arguments are passed to + # the command as regular arguments. + # + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#185 + def stop_on_unknown_option?(command_name); end + + # source://thor//lib/thor/base.rb#202 + def strict_args_position; end + + # If you want only strict string args (useful when cascading thor classes), + # call strict_args_position! This is disabled by default to allow dynamic + # invocations. + # + # source://thor//lib/thor/base.rb#198 + def strict_args_position!; end + + # @return [Boolean] + # + # source://thor//lib/thor/base.rb#206 + def strict_args_position?(config); end + + # Returns the commands for this Thor class. + # + # ==== Returns + # Hash:: An ordered hash with commands names as keys and Thor::Command + # objects as values. + # + # source://thor//lib/thor/base.rb#372 + def tasks; end + + protected + + # SIGNATURE: Sets the baseclass. This is where the superclass lookup + # finishes. + # + # source://thor//lib/thor/base.rb#679 + def baseclass; end + + # The basename of the program invoking the thor class. + # + # source://thor//lib/thor/base.rb#673 + def basename; end + + # Build an option and adds it to the given scope. + # + # ==== Parameters + # name:: The name of the argument. + # options:: Described in both class_option and method_option. + # scope:: Options hash that is being built up + # + # source://thor//lib/thor/base.rb#590 + def build_option(name, options, scope); end + + # Receives a hash of options, parse them and add to the scope. This is a + # fast way to set a bunch of options: + # + # build_options :foo => true, :bar => :required, :baz => :string + # + # ==== Parameters + # Hash[Symbol => Object] + # + # source://thor//lib/thor/base.rb#601 + def build_options(options, scope); end + + # Prints the class options per group. If an option does not belong to + # any group, it's printed as Class option. + # + # source://thor//lib/thor/base.rb#539 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # SIGNATURE: Creates a new command if valid_command? is true. This method is + # called when a new method is added to the class. + # + # source://thor//lib/thor/base.rb#684 + 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 + def create_task(meth); end + + # SIGNATURE: The hook invoked by start. + # + # @raise [NotImplementedError] + # + # source://thor//lib/thor/base.rb#694 + 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 + 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 + 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 + def from_superclass(method, default = T.unsafe(nil)); end + + # Everytime someone inherits from a Thor class, register the klass + # and file into baseclass. + # + # source://thor//lib/thor/base.rb#623 + def inherited(klass); end + + # SIGNATURE: Defines behavior when the initialize method is added to the + # class. + # + # source://thor//lib/thor/base.rb#690 + 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 + 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 + def method_added(meth); end + + # Receives a set of options and print them. + # + # source://thor//lib/thor/base.rb#557 + def print_options(shell, options, group_name = T.unsafe(nil)); end +end + +# source://thor//lib/thor/command.rb#2 +class Thor::Command < ::Struct + # @return [Command] a new instance of Command + # + # source://thor//lib/thor/command.rb#5 + def initialize(name, description, long_description, usage, options = T.unsafe(nil)); end + + # Returns the formatted usage by injecting given required arguments + # and required options into the given usage. + # + # source://thor//lib/thor/command.rb#41 + def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#14 + def hidden?; end + + # By default, a command invokes a method in the thor class. You can change this + # implementation to create custom commands. + # + # source://thor//lib/thor/command.rb#20 + def run(instance, args = T.unsafe(nil)); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#105 + def handle_argument_error?(instance, error, caller); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#112 + def handle_no_method_error?(instance, error, caller); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#95 + def local_method?(instance, name); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#78 + def not_debugging?(instance); end + + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#91 + def private_method?(instance); end + + # Given a target, checks if this class name is a public method. + # + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#87 + def public_method?(instance); end + + # Add usage with required arguments + # + # source://thor//lib/thor/command.rb#68 + def required_arguments_for(klass, usage); end + + # source://thor//lib/thor/command.rb#82 + def required_options; end + + # source://thor//lib/thor/command.rb#100 + def sans_backtrace(backtrace, caller); end + + private + + # source://thor//lib/thor/command.rb#9 + def initialize_copy(other); end +end + +# source://thor//lib/thor/command.rb#3 +Thor::Command::FILE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#2 +module Thor::CoreExt; end + +# A hash with indifferent access and magic predicates. +# +# hash = Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true +# +# hash[:foo] #=> 'bar' +# hash['foo'] #=> 'bar' +# hash.foo? #=> true +# +# source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#11 +class Thor::CoreExt::HashWithIndifferentAccess < ::Hash + # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#12 + def initialize(hash = T.unsafe(nil)); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#19 + def [](key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#23 + def []=(key, value); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#27 + def delete(key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#31 + def except(*keys); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#37 + def fetch(key, *args); end + + # @return [Boolean] + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 + def key?(key); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 + def merge(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53 + def merge!(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 + def replace(other_hash); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#60 + def reverse_merge(other); end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 + def reverse_merge!(other_hash); end + + # Convert to a Hash with String keys. + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#73 + def to_hash; end + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45 + def values_at(*indices); end + + protected + + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#79 + def convert_key(key); end + + # Magic predicates. For instance: + # + # options.force? # => !!options['force'] + # options.shebang # => "/usr/lib/local/ruby" + # options.test_framework?(:rspec) # => options[:test_framework] == :rspec + # + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#89 + def method_missing(method, *args); end +end + +# source://thor//lib/thor/error.rb#2 +Thor::Correctable = DidYouMean::Correctable + +# A dynamic command that handles method missing scenarios. +# +# source://thor//lib/thor/command.rb#128 +class Thor::DynamicCommand < ::Thor::Command + # @return [DynamicCommand] a new instance of DynamicCommand + # + # source://thor//lib/thor/command.rb#129 + def initialize(name, options = T.unsafe(nil)); end + + # source://thor//lib/thor/command.rb#133 + def run(instance, args = T.unsafe(nil)); end +end + +# source://thor//lib/thor/command.rb#141 +Thor::DynamicTask = Thor::DynamicCommand + +# Thor::Error is raised when it's caused by wrong usage of thor classes. Those +# errors have their backtrace suppressed and are nicely shown to the user. +# +# Errors that are caused by the developer, like declaring a method which +# 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 +class Thor::Error < ::StandardError; end + +# Thor has a special class called Thor::Group. The main difference to Thor class +# is that it invokes all commands at once. It also include some methods that allows +# invocations to be done at the class method, which are not available to Thor +# commands. +# +# source://thor//lib/thor/group.rb#7 +class Thor::Group + include ::Thor::Base + include ::Thor::Invocation + include ::Thor::Shell + extend ::Thor::Base::ClassMethods + extend ::Thor::Invocation::ClassMethods + + protected + + # Shortcut to invoke with padding and block handling. Use internally by + # invoke and invoke_from_option class methods. + # + # source://thor//lib/thor/group.rb#265 + def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end + + class << self + # Overwrite class options help to allow invoked generators options to be + # shown recursively when invoking a generator. + # + # source://thor//lib/thor/group.rb#161 + def class_options_help(shell, groups = T.unsafe(nil)); end + + # The description for this Thor::Group. If none is provided, but a source root + # exists, tries to find the USAGE one folder above it, otherwise searches + # in the superclass. + # + # ==== Parameters + # description:: The description for this Thor::Group. + # + # source://thor//lib/thor/group.rb#16 + def desc(description = T.unsafe(nil)); end + + # Get invocations array and merge options from invocations. Those + # options are added to group_options hash. Options that already exists + # in base_options are not added twice. + # + # source://thor//lib/thor/group.rb#172 + def get_options_from_invocations(group_options, base_options); end + + # @raise [error] + # + # source://thor//lib/thor/group.rb#207 + def handle_argument_error(command, error, _args, arity); end + + # Prints help information. + # + # ==== Options + # short:: When true, shows only usage. + # + # source://thor//lib/thor/group.rb#29 + def help(shell); end + + # Stores invocation blocks used on invoke_from_option. + # + # source://thor//lib/thor/group.rb#45 + def invocation_blocks; end + + # Stores invocations for this class merging with superclass values. + # + # source://thor//lib/thor/group.rb#39 + def invocations; end + + # Invoke the given namespace or class given. It adds an instance + # method that will invoke the klass and command. You can give a block to + # configure how it will be invoked. + # + # The namespace/class given will have its options showed on the help + # usage. Check invoke_from_option for more information. + # + # source://thor//lib/thor/group.rb#56 + def invoke(*names, &block); end + + # Invoke a thor class based on the value supplied by the user to the + # given option named "name". A class option must be created before this + # method is invoked for each name given. + # + # ==== Examples + # + # class GemGenerator < Thor::Group + # class_option :test_framework, :type => :string + # invoke_from_option :test_framework + # end + # + # ==== Boolean options + # + # In some cases, you want to invoke a thor class if some option is true or + # false. This is automatically handled by invoke_from_option. Then the + # option name is used to invoke the generator. + # + # ==== Preparing for invocation + # + # In some cases you want to customize how a specified hook is going to be + # invoked. You can do that by overwriting the class method + # prepare_for_invocation. The class method must necessarily return a klass + # and an optional command. + # + # ==== Custom invocations + # + # You can also supply a block to customize how the option is going to be + # invoked. The block receives two parameters, an instance of the current + # class and the klass to be invoked. + # + # source://thor//lib/thor/group.rb#110 + def invoke_from_option(*names, &block); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor/group.rb#199 + def printable_commands(*_arg0); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor/group.rb#199 + def printable_tasks(*_arg0); end + + # Remove a previously added invocation. + # + # ==== Examples + # + # remove_invocation :test_framework + # + # source://thor//lib/thor/group.rb#149 + def remove_invocation(*names); end + + protected + + # The banner for this class. You can customize it if you are invoking the + # thor class by another ways which is not the Thor::Runner. + # + # source://thor//lib/thor/group.rb#238 + def banner; end + + # source://thor//lib/thor/group.rb#248 + def baseclass; end + + # source://thor//lib/thor/group.rb#252 + def create_command(meth); end + + # source://thor//lib/thor/group.rb#252 + def create_task(meth); end + + # The method responsible for dispatching given the args. + # + # @yield [instance] + # + # source://thor//lib/thor/group.rb#217 + def dispatch(command, given_args, given_opts, config); end + + # Represents the whole class as a command. + # + # source://thor//lib/thor/group.rb#243 + def self_command; end + + # Represents the whole class as a command. + # + # source://thor//lib/thor/group.rb#243 + def self_task; end + end +end + +# Shortcuts for help. +# +# source://thor//lib/thor/base.rb#17 +Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) + +# A command that is hidden in help messages but still invocable. +# +# source://thor//lib/thor/command.rb#120 +class Thor::HiddenCommand < ::Thor::Command + # @return [Boolean] + # + # source://thor//lib/thor/command.rb#121 + def hidden?; end +end + +# source://thor//lib/thor/command.rb#125 +Thor::HiddenTask = Thor::HiddenCommand + +# source://thor//lib/thor/invocation.rb#2 +module Thor::Invocation + mixes_in_class_methods ::Thor::Invocation::ClassMethods + + # Make initializer aware of invocations and the initialization args. + # + # source://thor//lib/thor/invocation.rb#23 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # Make the current command chain accessible with in a Thor-(sub)command + # + # source://thor//lib/thor/invocation.rb#30 + def current_command_chain; end + + # Receives a name and invokes it. The name can be a string (either "command" or + # "namespace:command"), a Thor::Command, a Class or a Thor instance. If the + # command cannot be guessed by name, it can also be supplied as second argument. + # + # You can also supply the arguments, options and configuration values for + # the command to be invoked, if none is given, the same values used to + # initialize the invoker are used to initialize the invoked. + # + # When no name is given, it will invoke the default command of the current class. + # + # ==== Examples + # + # class A < Thor + # def foo + # invoke :bar + # invoke "b:hello", ["Erik"] + # end + # + # def bar + # invoke "b:hello", ["Erik"] + # end + # end + # + # class B < Thor + # def hello(name) + # puts "hello #{name}" + # end + # end + # + # You can notice that the method "foo" above invokes two commands: "bar", + # which belongs to the same class and "hello" which belongs to the class B. + # + # By using an invocation system you ensure that a command is invoked only once. + # In the example above, invoking "foo" will invoke "b:hello" just once, even + # if it's invoked later by "bar" method. + # + # When class A invokes class B, all arguments used on A initialization are + # supplied to B. This allows lazy parse of options. Let's suppose you have + # some rspec commands: + # + # class Rspec < Thor::Group + # class_option :mock_framework, :type => :string, :default => :rr + # + # def invoke_mock_framework + # invoke "rspec:#{options[:mock_framework]}" + # end + # end + # + # As you noticed, it invokes the given mock framework, which might have its + # own options: + # + # class Rspec::RR < Thor::Group + # class_option :style, :type => :string, :default => :mock + # end + # + # Since it's not rspec concern to parse mock framework options, when RR + # is invoked all options are parsed again, so RR can extract only the options + # that it's going to use. + # + # If you want Rspec::RR to be initialized with its own set of options, you + # have to do that explicitly: + # + # invoke "rspec:rr", [], :style => :foo + # + # Besides giving an instance, you can also give a class to invoke: + # + # invoke Rspec::RR, [], :style => :foo + # + # source://thor//lib/thor/invocation.rb#102 + def invoke(name = T.unsafe(nil), *args); end + + # Invoke all commands for the current instance. + # + # source://thor//lib/thor/invocation.rb#133 + def invoke_all; end + + # Invoke the given command if the given args. + # + # source://thor//lib/thor/invocation.rb#122 + def invoke_command(command, *args); end + + # Invoke the given command if the given args. + # + # source://thor//lib/thor/invocation.rb#122 + def invoke_task(command, *args); end + + # Invokes using shell padding. + # + # source://thor//lib/thor/invocation.rb#138 + def invoke_with_padding(*args); end + + protected + + # Initialize klass using values stored in the @_initializer. + # + # source://thor//lib/thor/invocation.rb#166 + def _parse_initialization_options(args, opts, config); end + + # This method simply retrieves the class and command to be invoked. + # If the name is nil or the given name is a command in the current class, + # use the given name and return self as class. Otherwise, call + # prepare_for_invocation in the current class. + # + # source://thor//lib/thor/invocation.rb#153 + def _retrieve_class_and_command(name, sent_command = T.unsafe(nil)); end + + # This method simply retrieves the class and command to be invoked. + # If the name is nil or the given name is a command in the current class, + # use the given name and return self as class. Otherwise, call + # prepare_for_invocation in the current class. + # + # source://thor//lib/thor/invocation.rb#153 + def _retrieve_class_and_task(name, sent_command = T.unsafe(nil)); end + + # Configuration values that are shared between invocations. + # + # source://thor//lib/thor/invocation.rb#145 + def _shared_configuration; end + + class << self + # source://thor//lib/thor/invocation.rb#3 + def included(base); end + end +end + +# source://thor//lib/thor/invocation.rb#8 +module Thor::Invocation::ClassMethods + # This method is responsible for receiving a name and find the proper + # class and command for it. The key is an optional parameter which is + # available only in class methods invocations (i.e. in Thor::Group). + # + # source://thor//lib/thor/invocation.rb#12 + def prepare_for_invocation(key, name); end +end + +# Raised when a command was found, but not invoked properly. +# +# source://thor//lib/thor/error.rb#65 +class Thor::InvocationError < ::Thor::Error; end + +# source://thor//lib/thor/line_editor/basic.rb#2 +module Thor::LineEditor + class << self + # source://thor//lib/thor/line_editor.rb#10 + def best_available; end + + # source://thor//lib/thor/line_editor.rb#6 + def readline(prompt, options = T.unsafe(nil)); end + end +end + +# source://thor//lib/thor/line_editor/basic.rb#3 +class Thor::LineEditor::Basic + # @return [Basic] a new instance of Basic + # + # source://thor//lib/thor/line_editor/basic.rb#10 + def initialize(prompt, options); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/line_editor/basic.rb#4 + def options; end + + # Returns the value of attribute prompt. + # + # source://thor//lib/thor/line_editor/basic.rb#4 + def prompt; end + + # source://thor//lib/thor/line_editor/basic.rb#15 + def readline; end + + private + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/basic.rb#32 + def echo?; end + + # source://thor//lib/thor/line_editor/basic.rb#22 + def get_input; end + + class << self + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/basic.rb#6 + def available?; end + end +end + +# source://thor//lib/thor/line_editor/readline.rb#3 +class Thor::LineEditor::Readline < ::Thor::LineEditor::Basic + # source://thor//lib/thor/line_editor/readline.rb#13 + def readline; end + + private + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#28 + def add_to_history?; end + + # source://thor//lib/thor/line_editor/readline.rb#42 + def completion_options; end + + # source://thor//lib/thor/line_editor/readline.rb#32 + def completion_proc; end + + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#46 + def use_path_completion?; end + + class << self + # @return [Boolean] + # + # source://thor//lib/thor/line_editor/readline.rb#4 + def available?; end + end +end + +# source://thor//lib/thor/line_editor/readline.rb#50 +class Thor::LineEditor::Readline::PathCompletion + # @return [PathCompletion] a new instance of PathCompletion + # + # source://thor//lib/thor/line_editor/readline.rb#54 + def initialize(text); end + + # source://thor//lib/thor/line_editor/readline.rb#58 + def matches; end + + private + + # source://thor//lib/thor/line_editor/readline.rb#68 + def absolute_matches; end + + # source://thor//lib/thor/line_editor/readline.rb#82 + def base_path; end + + # source://thor//lib/thor/line_editor/readline.rb#78 + def glob_pattern; end + + # source://thor//lib/thor/line_editor/readline.rb#64 + def relative_matches; end + + # Returns the value of attribute text. + # + # source://thor//lib/thor/line_editor/readline.rb#51 + def text; end +end + +# source://thor//lib/thor/error.rb#101 +class Thor::MalformattedArgumentError < ::Thor::InvocationError; end + +# source://thor//lib/thor/nested_context.rb#2 +class Thor::NestedContext + # @return [NestedContext] a new instance of NestedContext + # + # source://thor//lib/thor/nested_context.rb#3 + def initialize; end + + # source://thor//lib/thor/nested_context.rb#7 + def enter; end + + # @return [Boolean] + # + # source://thor//lib/thor/nested_context.rb#15 + def entered?; end + + private + + # source://thor//lib/thor/nested_context.rb#25 + def pop; end + + # source://thor//lib/thor/nested_context.rb#21 + def push; end +end + +# source://thor//lib/thor/error.rb#8 +class Thor::NoKwargSpellChecker < ::DidYouMean::SpellChecker + # source://thor//lib/thor/error.rb#9 + def initialize(dictionary); end +end + +# source://thor//lib/thor/parser/option.rb#2 +class Thor::Option < ::Thor::Argument + # @return [Option] a new instance of Option + # + # source://thor//lib/thor/parser/option.rb#7 + def initialize(name, options = T.unsafe(nil)); end + + # Returns the value of attribute aliases. + # + # source://thor//lib/thor/parser/option.rb#3 + def aliases; end + + # source://thor//lib/thor/parser/option.rb#105 + def array?; end + + # source://thor//lib/thor/parser/option.rb#105 + def boolean?; end + + # Returns the value of attribute group. + # + # source://thor//lib/thor/parser/option.rb#3 + def group; end + + # source://thor//lib/thor/parser/option.rb#105 + def hash?; end + + # Returns the value of attribute hide. + # + # source://thor//lib/thor/parser/option.rb#3 + def hide; end + + # source://thor//lib/thor/parser/option.rb#79 + def human_name; end + + # Returns the value of attribute lazy_default. + # + # source://thor//lib/thor/parser/option.rb#3 + def lazy_default; end + + # source://thor//lib/thor/parser/option.rb#105 + def numeric?; end + + # Returns the value of attribute repeatable. + # + # source://thor//lib/thor/parser/option.rb#3 + def repeatable; end + + # source://thor//lib/thor/parser/option.rb#105 + def string?; end + + # source://thor//lib/thor/parser/option.rb#75 + def switch_name; end + + # source://thor//lib/thor/parser/option.rb#83 + def usage(padding = T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/parser/option.rb#155 + def dasherize(str); end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/option.rb#147 + def dasherized?; end + + # source://thor//lib/thor/parser/option.rb#151 + def undasherize(str); end + + # @raise [ArgumentError] + # + # source://thor//lib/thor/parser/option.rb#113 + def validate!; end + + # source://thor//lib/thor/parser/option.rb#118 + def validate_default_type!; end + + class << self + # This parse quick options given as method_options. It makes several + # assumptions, but you can be more specific using the option method. + # + # parse :foo => "bar" + # #=> Option foo with default value bar + # + # parse [:foo, :baz] => "bar" + # #=> Option foo with default value bar and alias :baz + # + # parse :foo => :required + # #=> Required option foo without default value + # + # parse :foo => 2 + # #=> Option foo with default value 2 and type numeric + # + # parse :foo => :numeric + # #=> Option foo without default value and type numeric + # + # parse :foo => true + # #=> Option foo with default value true and type boolean + # + # The valid types are :boolean, :numeric, :hash, :array and :string. If none + # is given a default type is assumed. This default type accepts arguments as + # string (--foo=value) or booleans (just --foo). + # + # By default all options are optional, unless :required is given. + # + # source://thor//lib/thor/parser/option.rb#45 + def parse(key, value); end + end +end + +# source://thor//lib/thor/parser/option.rb#5 +Thor::Option::VALID_TYPES = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/parser/options.rb#2 +class Thor::Options < ::Thor::Arguments + # Takes a hash of Thor::Option and a hash with defaults. + # + # If +stop_on_unknown+ is true, #parse will stop as soon as it encounters + # an unknown option or a regular argument. + # + # @return [Options] a new instance of Options + # + # source://thor//lib/thor/parser/options.rb#32 + def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil)); end + + # @raise [UnknownArgumentError] + # + # source://thor//lib/thor/parser/options.rb#141 + def check_unknown!; end + + # source://thor//lib/thor/parser/options.rb#88 + def parse(args); end + + # source://thor//lib/thor/parser/options.rb#64 + def peek; end + + # source://thor//lib/thor/parser/options.rb#60 + def remaining; end + + # source://thor//lib/thor/parser/options.rb#78 + def shift; end + + # source://thor//lib/thor/parser/options.rb#83 + def unshift(arg, is_value: T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/parser/options.rb#151 + def assign_result!(option, result); end + + # Check if the current value in peek is a registered switch. + # + # Two booleans are returned. The first is true if the current value + # starts with a hyphen; the second is true if it is a registered switch. + # + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#165 + def current_is_switch?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#177 + def current_is_switch_formatted?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#187 + def current_is_value?; end + + # Check if the given argument is actually a shortcut. + # + # source://thor//lib/thor/parser/options.rb#206 + def normalize_switch(arg); end + + # Parse boolean values which can be given as --foo=true, --foo or --no-foo. + # + # source://thor//lib/thor/parser/options.rb#217 + def parse_boolean(switch); end + + # Parse the value at the peek analyzing if it requires an input or not. + # + # source://thor//lib/thor/parser/options.rb#235 + def parse_peek(switch, option); end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#210 + def parsing_options?; end + + # @return [Boolean] + # + # source://thor//lib/thor/parser/options.rb#192 + def switch?(arg); end + + # source://thor//lib/thor/parser/options.rb#196 + def switch_option(arg); end + + class << self + # Receives a hash and makes it switches. + # + # source://thor//lib/thor/parser/options.rb#11 + def to_switches(options); end + end +end + +# source://thor//lib/thor/parser/options.rb#5 +Thor::Options::EQ_RE = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#3 +Thor::Options::LONG_RE = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#8 +Thor::Options::OPTS_END = T.let(T.unsafe(nil), String) + +# source://thor//lib/thor/parser/options.rb#7 +Thor::Options::SHORT_NUM = T.let(T.unsafe(nil), Regexp) + +# source://thor//lib/thor/parser/options.rb#4 +Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp) + +# Allow either -x -v or -xv style for single char args +# +# source://thor//lib/thor/parser/options.rb#6 +Thor::Options::SHORT_SQ_RE = T.let(T.unsafe(nil), Regexp) + +# 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#98 +class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end + +# source://thor//lib/thor/util.rb#4 +module Thor::Sandbox; end + +# source://thor//lib/thor/shell.rb#23 +module Thor::Shell + # Add shell to initialize config values. + # + # ==== Configuration + # shell:: An instance of the shell to be used. + # + # ==== Examples + # + # class MyScript < Thor + # argument :first, :type => :numeric + # end + # + # MyScript.new [1.0], { :foo => :bar }, :shell => Thor::Shell::Basic.new + # + # source://thor//lib/thor/shell.rb#44 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # source://thor//lib/thor/shell.rb#59 + def ask(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def error(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def file_collision(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def no?(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_in_columns(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_table(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def print_wrapped(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say_error(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def say_status(*args, &block); end + + # source://thor//lib/thor/shell.rb#59 + def set_color(*args, &block); end + + # Holds the shell for the given Thor instance. If no shell is given, + # it gets a default shell from Thor::Base.shell. + # + # source://thor//lib/thor/shell.rb#52 + def shell; end + + # Sets the attribute shell + # + # @param value the value to set the attribute shell to. + # + # source://thor//lib/thor/shell.rb#25 + def shell=(_arg0); end + + # source://thor//lib/thor/shell.rb#59 + def terminal_width(*args, &block); end + + # Yields the given block with padding. + # + # source://thor//lib/thor/shell.rb#66 + def with_padding; end + + # source://thor//lib/thor/shell.rb#59 + def yes?(*args, &block); end + + protected + + # Allow shell to be shared between invocations. + # + # source://thor//lib/thor/shell.rb#77 + def _shared_configuration; end +end + +# source://thor//lib/thor/shell/basic.rb#3 +class Thor::Shell::Basic + # Initialize base, mute and padding to nil. + # + # @return [Basic] a new instance of Basic + # + # source://thor//lib/thor/shell/basic.rb#11 + def initialize; end + + # Asks something to the user and receives a response. + # + # If a default value is specified it will be presented to the user + # and allows them to select that value with an empty response. This + # option is ignored when limited answers are supplied. + # + # If asked to limit the correct responses, you can pass in an + # array of acceptable answers. If one of those is not supplied, + # they will be shown a message stating that one of those answers + # must be given and re-asked the question. + # + # If asking for sensitive information, the :echo option can be set + # to false to mask user input from $stdin. + # + # If the required input is a path, then set the path option to + # true. This will enable tab completion for file paths relative + # to the current working directory on systems that support + # Readline. + # + # ==== Example + # ask("What is your name?") + # + # ask("What is the planet furthest from the sun?", :default => "Pluto") + # + # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"]) + # + # ask("What is your password?", :echo => false) + # + # ask("Where should the file be saved?", :path => true) + # + # source://thor//lib/thor/shell/basic.rb#78 + def ask(statement, *args); end + + # Returns the value of attribute base. + # + # source://thor//lib/thor/shell/basic.rb#6 + def base; end + + # Sets the attribute base + # + # @param value the value to set the attribute base to. + # + # source://thor//lib/thor/shell/basic.rb#6 + def base=(_arg0); end + + # Called if something goes wrong during the execution. This is used by Thor + # internally and should not be used inside your scripts. If something went + # wrong, you can always raise an exception. If you raise a Thor::Error, it + # will be rescued and wrapped in the method below. + # + # source://thor//lib/thor/shell/basic.rb#342 + def error(statement); end + + # Deals with file collision and returns true if the file should be + # overwritten and false otherwise. If a block is given, it uses the block + # response as the content for the diff. + # + # ==== Parameters + # destination:: the destination file to solve conflicts + # block:: an optional block that returns the value to be used in diff and merge + # + # source://thor//lib/thor/shell/basic.rb#285 + def file_collision(destination); end + + # Sets the output padding while executing a block and resets it. + # + # source://thor//lib/thor/shell/basic.rb#41 + def indent(count = T.unsafe(nil)); end + + # Mute everything that's inside given block + # + # source://thor//lib/thor/shell/basic.rb#20 + def mute; end + + # Check if base is muted + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#29 + def mute?; end + + # Make a question the to user and returns true if the user replies "n" or + # "no". + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#154 + def no?(statement, color = T.unsafe(nil)); end + + # Returns the value of attribute padding. + # + # source://thor//lib/thor/shell/basic.rb#7 + def padding; end + + # Sets the output padding, not allowing less than zero values. + # + # source://thor//lib/thor/shell/basic.rb#35 + def padding=(value); end + + # Prints values in columns + # + # ==== Parameters + # Array[String, String, ...] + # + # source://thor//lib/thor/shell/basic.rb#163 + def print_in_columns(array); end + + # Prints a table. + # + # ==== Parameters + # Array[Array[String, String, ...]] + # + # ==== Options + # indent:: Indent the first column by indent value. + # colwidth:: Force the first column to colwidth spaces wide. + # + # source://thor//lib/thor/shell/basic.rb#185 + def print_table(array, options = T.unsafe(nil)); end + + # Prints a long string, word-wrapping the text to the current width of the + # terminal display. Ideal for printing heredocs. + # + # ==== Parameters + # String + # + # ==== Options + # indent:: Indent each line of the printed paragraph by indent value. + # + # source://thor//lib/thor/shell/basic.rb#247 + def print_wrapped(message, options = T.unsafe(nil)); end + + # Say (print) something to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say("I know you knew that.") + # + # source://thor//lib/thor/shell/basic.rb#96 + def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say (print) an error to the user. If the sentence ends with a whitespace + # or tab character, a new line is not appended (print + flush). Otherwise + # are passed straight to puts (behavior got from Highline). + # + # ==== Example + # say_error("error: something went wrong") + # + # source://thor//lib/thor/shell/basic.rb#113 + def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end + + # Say a status with the given color and appends the message. Since this + # method is used frequently by actions, it allows nil or false to be given + # in log_status, avoiding the message from being shown. If a Symbol is + # given in log_status, it's used as the color. + # + # source://thor//lib/thor/shell/basic.rb#128 + def say_status(status, message, log_status = T.unsafe(nil)); end + + # Apply color to the given string with optional bold. Disabled in the + # Thor::Shell::Basic class. + # + # source://thor//lib/thor/shell/basic.rb#349 + def set_color(string, *_arg1); end + + # source://thor//lib/thor/shell/basic.rb#326 + def terminal_width; end + + # Make a question the to user and returns true if the user replies "y" or + # "yes". + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#147 + def yes?(statement, color = T.unsafe(nil)); end + + protected + + # source://thor//lib/thor/shell/basic.rb#486 + def answer_match(possibilities, answer, case_insensitive); end + + # source://thor//lib/thor/shell/basic.rb#443 + def as_unicode; end + + # source://thor//lib/thor/shell/basic.rb#473 + def ask_filtered(statement, color, options); end + + # source://thor//lib/thor/shell/basic.rb#456 + def ask_simply(statement, color, options); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#360 + def can_display_colors?; end + + # Calculate the dynamic width of the terminal + # + # source://thor//lib/thor/shell/basic.rb#415 + def dynamic_width; end + + # source://thor//lib/thor/shell/basic.rb#419 + def dynamic_width_stty; end + + # source://thor//lib/thor/shell/basic.rb#423 + def dynamic_width_tput; end + + # source://thor//lib/thor/shell/basic.rb#387 + def file_collision_help; end + + # source://thor//lib/thor/shell/basic.rb#507 + def git_merge_tool; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#377 + def is?(value); end + + # source://thor//lib/thor/shell/basic.rb#364 + def lookup_color(color); end + + # source://thor//lib/thor/shell/basic.rb#494 + def merge(destination, content); end + + # source://thor//lib/thor/shell/basic.rb#503 + def merge_tool; end + + # source://thor//lib/thor/shell/basic.rb#355 + def prepare_message(message, *color); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#410 + def quiet?; end + + # source://thor//lib/thor/shell/basic.rb#399 + def show_diff(destination, content); end + + # source://thor//lib/thor/shell/basic.rb#373 + def stderr; end + + # source://thor//lib/thor/shell/basic.rb#369 + def stdout; end + + # source://thor//lib/thor/shell/basic.rb#431 + def truncate(string, width); end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/basic.rb#427 + def unix?; end +end + +# source://thor//lib/thor/shell/basic.rb#4 +Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# Inherit from Thor::Shell::Basic and add set_color behavior. Check +# Thor::Shell::Basic to see all available methods. +# +# source://thor//lib/thor/shell/color.rb#8 +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 + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # Pass foreground, background and bold options to this method as + # symbols. + # + # Example: + # + # set_color "Hi!", :red, :on_white, :bold + # + # The available colors are: + # + # :bold + # :black + # :red + # :green + # :yellow + # :blue + # :magenta + # :cyan + # :white + # :on_black + # :on_red + # :on_green + # :on_yellow + # :on_blue + # :on_magenta + # :on_cyan + # :on_white + # + # source://thor//lib/thor/shell/color.rb#79 + def set_color(string, *colors); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#107 + def are_colors_disabled?; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#103 + def are_colors_supported?; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#99 + def can_display_colors?; end + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/color.rb#144 + def diff_lcs_loaded?; end + + # source://thor//lib/thor/shell/color.rb#127 + def output_diff_line(diff); end + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # source://thor//lib/thor/shell/color.rb#114 + def show_diff(destination, content); end +end + +# Set the terminal's foreground ANSI color to black. +# +# source://thor//lib/thor/shell/color.rb#15 +Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to blue. +# +# source://thor//lib/thor/shell/color.rb#23 +Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) + +# The start of an ANSI bold sequence. +# +# source://thor//lib/thor/shell/color.rb#12 +Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) + +# Embed in a String to clear all previous ANSI sequences. +# +# source://thor//lib/thor/shell/color.rb#10 +Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to cyan. +# +# source://thor//lib/thor/shell/color.rb#27 +Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to green. +# +# source://thor//lib/thor/shell/color.rb#19 +Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to magenta. +# +# source://thor//lib/thor/shell/color.rb#25 +Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to black. +# +# source://thor//lib/thor/shell/color.rb#32 +Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to blue. +# +# source://thor//lib/thor/shell/color.rb#40 +Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to cyan. +# +# source://thor//lib/thor/shell/color.rb#44 +Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to green. +# +# source://thor//lib/thor/shell/color.rb#36 +Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to magenta. +# +# source://thor//lib/thor/shell/color.rb#42 +Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to red. +# +# source://thor//lib/thor/shell/color.rb#34 +Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to white. +# +# source://thor//lib/thor/shell/color.rb#46 +Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background ANSI color to yellow. +# +# source://thor//lib/thor/shell/color.rb#38 +Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to red. +# +# source://thor//lib/thor/shell/color.rb#17 +Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to white. +# +# source://thor//lib/thor/shell/color.rb#29 +Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground ANSI color to yellow. +# +# source://thor//lib/thor/shell/color.rb#21 +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#8 +class Thor::Shell::HTML < ::Thor::Shell::Basic + # Ask something to the user and receives a response. + # + # ==== Example + # ask("What is your name?") + # + # TODO: Implement #ask for Thor::Shell::HTML + # + # @raise [NotImplementedError] + # + # source://thor//lib/thor/shell/html.rb#70 + def ask(statement, color = T.unsafe(nil)); end + + # Set color by using a string or one of the defined constants. If a third + # option is set to true, it also adds bold to the string. This is based + # on Highline implementation and it automatically appends CLEAR to the end + # of the returned String. + # + # source://thor//lib/thor/shell/html.rb#51 + def set_color(string, *colors); end + + protected + + # @return [Boolean] + # + # source://thor//lib/thor/shell/html.rb#76 + def can_display_colors?; end + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/html.rb#113 + def diff_lcs_loaded?; end + + # source://thor//lib/thor/shell/html.rb#96 + def output_diff_line(diff); end + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # source://thor//lib/thor/shell/html.rb#83 + def show_diff(destination, content); end +end + +# Set the terminal's foreground HTML color to black. +# +# source://thor//lib/thor/shell/html.rb#13 +Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to blue. +# +# source://thor//lib/thor/shell/html.rb#21 +Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) + +# The start of an HTML bold sequence. +# +# source://thor//lib/thor/shell/html.rb#10 +Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to cyan. +# +# source://thor//lib/thor/shell/html.rb#25 +Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to green. +# +# source://thor//lib/thor/shell/html.rb#17 +Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to magenta. +# +# source://thor//lib/thor/shell/html.rb#23 +Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to black. +# +# source://thor//lib/thor/shell/html.rb#30 +Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to blue. +# +# source://thor//lib/thor/shell/html.rb#38 +Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to cyan. +# +# source://thor//lib/thor/shell/html.rb#42 +Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to green. +# +# source://thor//lib/thor/shell/html.rb#34 +Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to magenta. +# +# source://thor//lib/thor/shell/html.rb#40 +Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to red. +# +# source://thor//lib/thor/shell/html.rb#32 +Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to white. +# +# source://thor//lib/thor/shell/html.rb#44 +Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's background HTML color to yellow. +# +# source://thor//lib/thor/shell/html.rb#36 +Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to red. +# +# source://thor//lib/thor/shell/html.rb#15 +Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to white. +# +# source://thor//lib/thor/shell/html.rb#27 +Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) + +# Set the terminal's foreground HTML color to yellow. +# +# source://thor//lib/thor/shell/html.rb#19 +Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) + +# source://thor//lib/thor/shell.rb#24 +Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/base.rb#23 +Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) + +# Thor methods that should not be overwritten by the user. +# +# source://thor//lib/thor/base.rb#20 +Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) + +# source://thor//lib/thor/command.rb#117 +Thor::Task = Thor::Command + +# Raised when a command was not found. +# +# source://thor//lib/thor/error.rb#27 +class Thor::UndefinedCommandError < ::Thor::Error + include ::DidYouMean::Correctable + + # @return [UndefinedCommandError] a new instance of UndefinedCommandError + # + # source://thor//lib/thor/error.rb#46 + def initialize(command, all_commands, namespace); end + + # Returns the value of attribute all_commands. + # + # source://thor//lib/thor/error.rb#44 + def all_commands; end + + # Returns the value of attribute command. + # + # source://thor//lib/thor/error.rb#44 + def command; end +end + +# source://thor//lib/thor/error.rb#28 +class Thor::UndefinedCommandError::SpellChecker + # @return [SpellChecker] a new instance of SpellChecker + # + # source://thor//lib/thor/error.rb#31 + def initialize(error); end + + # source://thor//lib/thor/error.rb#35 + def corrections; end + + # Returns the value of attribute error. + # + # source://thor//lib/thor/error.rb#29 + def error; end + + # source://thor//lib/thor/error.rb#39 + def spell_checker; end +end + +# source://thor//lib/thor/error.rb#58 +Thor::UndefinedTaskError = Thor::UndefinedCommandError + +# source://thor//lib/thor/error.rb#68 +class Thor::UnknownArgumentError < ::Thor::Error + include ::DidYouMean::Correctable + + # @return [UnknownArgumentError] a new instance of UnknownArgumentError + # + # source://thor//lib/thor/error.rb#88 + def initialize(switches, unknown); end + + # Returns the value of attribute switches. + # + # source://thor//lib/thor/error.rb#86 + def switches; end + + # Returns the value of attribute unknown. + # + # source://thor//lib/thor/error.rb#86 + def unknown; end +end + +# source://thor//lib/thor/error.rb#69 +class Thor::UnknownArgumentError::SpellChecker + # @return [SpellChecker] a new instance of SpellChecker + # + # source://thor//lib/thor/error.rb#72 + def initialize(error); end + + # source://thor//lib/thor/error.rb#76 + def corrections; end + + # Returns the value of attribute error. + # + # source://thor//lib/thor/error.rb#70 + def error; end + + # source://thor//lib/thor/error.rb#81 + def spell_checker; end +end + +# This module holds several utilities: +# +# 1) Methods to convert thor namespaces to constants and vice-versa. +# +# Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz" +# +# 2) Loading thor files and sandboxing: +# +# Thor::Util.load_thorfile("~/.thor/foo") +# +# source://thor//lib/thor/util.rb#17 +module Thor::Util + class << self + # Receives a string and convert it to camel case. camel_case returns CamelCase. + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#104 + def camel_case(str); end + + # Returns a string that has had any glob characters escaped. + # The glob characters are `* ? { } [ ]`. + # + # ==== Examples + # + # Thor::Util.escape_globs('[apps]') # => '\[apps\]' + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#263 + def escape_globs(path); end + + # Returns a string that has had any HTML characters escaped. + # + # ==== Examples + # + # Thor::Util.escape_html('
') # => "<div>" + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#279 + def escape_html(string); end + + # Receives a namespace and search for it in the Thor::Base subclasses. + # + # ==== Parameters + # namespace:: The namespace to search for. + # + # source://thor//lib/thor/util.rb#24 + def find_by_namespace(namespace); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Where to look for Thor files. + # + # source://thor//lib/thor/util.rb#212 + def globs_for(path); end + + # Receives a path and load the thor file in the path. The file is evaluated + # inside the sandbox to avoid namespacing conflicts. + # + # source://thor//lib/thor/util.rb#152 + def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end + + # Receives a constant and converts it to a Thor namespace. Since Thor + # commands can be added to a sandbox, this method is also responsible for + # removing the sandbox namespace. + # + # This method should not be used in general because it's used to deal with + # older versions of Thor. On current versions, if you need to get the + # namespace from a class, just call namespace on it. + # + # ==== Parameters + # constant:: The constant to be converted to the thor path. + # + # ==== Returns + # String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz" + # + # source://thor//lib/thor/util.rb#43 + def namespace_from_thor_class(constant); end + + # Given the contents, evaluate it inside the sandbox and returns the + # namespaces defined in the sandbox. + # + # ==== Parameters + # contents + # + # ==== Returns + # Array[Object] + # + # source://thor//lib/thor/util.rb#58 + def namespaces_in_content(contents, file = T.unsafe(nil)); end + + # Return the path to the ruby interpreter taking into account multiple + # installations and windows extensions. + # + # source://thor//lib/thor/util.rb#220 + def ruby_command; end + + # Receives a string and convert it to snake case. SnakeCase returns snake_case. + # + # ==== Parameters + # String + # + # ==== Returns + # String + # + # source://thor//lib/thor/util.rb#90 + def snake_case(str); end + + # Returns the thor classes declared inside the given class. + # + # source://thor//lib/thor/util.rb#74 + def thor_classes_in(klass); end + + # Returns the root where thor files are located, depending on the OS. + # + # source://thor//lib/thor/util.rb#191 + def thor_root; end + + # Returns the files in the thor root. On Windows thor_root will be something + # like this: + # + # C:\Documents and Settings\james\.thor + # + # If we don't #gsub the \ character, Dir.glob will fail. + # + # source://thor//lib/thor/util.rb#202 + def thor_root_glob; end + + # source://thor//lib/thor/util.rb#167 + def user_home; end + end +end diff --git a/sorbet/rbi/gems/tilt@2.1.0.rbi b/sorbet/rbi/gems/tilt@2.1.0.rbi new file mode 100644 index 0000000..9a5c04e --- /dev/null +++ b/sorbet/rbi/gems/tilt@2.1.0.rbi @@ -0,0 +1,831 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tilt` gem. +# Please instead update this file by running `bin/tapioca gem tilt`. + + +# Namespace for Tilt. This module is not intended to be included anywhere. +# +# source://tilt//lib/tilt/template.rb#1 +module Tilt + class << self + # @see Tilt::Mapping#[] + # + # source://tilt//lib/tilt.rb#52 + def [](file); end + + # @example + # tmpl = Tilt['index.erb'].new { '<%= Tilt.current_template %>' } + # tmpl.render == tmpl.to_s + # @note This is currently an experimental feature and might return nil + # in the future. + # @return the template object that is currently rendering. + # + # source://tilt//lib/tilt.rb#74 + def current_template; end + + # @return [Tilt::Mapping] the main mapping object + # + # source://tilt//lib/tilt.rb#13 + def default_mapping; end + + # @private + # + # source://tilt//lib/tilt.rb#17 + def lazy_map; end + + # @see Tilt::Mapping#new + # + # source://tilt//lib/tilt.rb#47 + def new(file, line = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # @deprecated Use {register} instead. + # + # source://tilt//lib/tilt.rb#37 + def prefer(template_class, *extensions); end + + # @see Tilt::Mapping#register + # + # source://tilt//lib/tilt.rb#22 + def register(template_class, *extensions); end + + # @see Tilt::Mapping#register_lazy + # + # source://tilt//lib/tilt.rb#27 + def register_lazy(class_name, file, *extensions); end + + # @see Tilt::Mapping#register_pipeline + # + # source://tilt//lib/tilt.rb#32 + def register_pipeline(ext, options = T.unsafe(nil)); end + + # @return [Boolean] + # @see Tilt::Mapping#registered? + # + # source://tilt//lib/tilt.rb#42 + def registered?(ext); end + + # @see Tilt::Mapping#template_for + # + # source://tilt//lib/tilt.rb#57 + def template_for(file); end + + # @see Tilt::Mapping#templates_for + # + # source://tilt//lib/tilt.rb#62 + def templates_for(file); end + end +end + +# CSV Template implementation. See: +# http://ruby-doc.org/stdlib/libdoc/csv/rdoc/CSV.html +# +# == Example +# +# # Example of csv template +# tpl = <<-EOS +# # header +# csv << ['NAME', 'ID'] +# +# # data rows +# @people.each do |person| +# csv << [person[:name], person[:id]] +# end +# EOS +# +# @people = [ +# {:name => "Joshua Peek", :id => 1}, +# {:name => "Ryan Tomayko", :id => 2}, +# {:name => "Simone Carletti", :id => 3} +# ] +# +# template = Tilt::CSVTemplate.new { tpl } +# template.render(self) +# +# source://tilt//lib/tilt/csv.rb#31 +class Tilt::CSVTemplate < ::Tilt::Template + # source://tilt//lib/tilt/csv.rb#46 + def precompiled(locals); end + + # source://tilt//lib/tilt/csv.rb#38 + def precompiled_template(locals); end + + # source://tilt//lib/tilt/csv.rb#34 + def prepare; end +end + +# Extremely simple template cache implementation. Calling applications +# create a Tilt::Cache instance and use #fetch with any set of hashable +# arguments (such as those to Tilt.new): +# +# cache = Tilt::Cache.new +# cache.fetch(path, line, options) { Tilt.new(path, line, options) } +# +# Subsequent invocations return the already loaded template object. +# +# @note Tilt::Cache is a thin wrapper around Hash. It has the following +# limitations: +# * Not thread-safe. +# * Size is unbounded. +# * Keys are not copied defensively, and should not be modified after +# being passed to #fetch. More specifically, the values returned by +# key#hash and key#eql? should not change. +# If this is too limiting for you, use a different cache implementation. +# +# source://tilt//lib/tilt.rb#96 +class Tilt::Cache + # @return [Cache] a new instance of Cache + # + # source://tilt//lib/tilt.rb#97 + def initialize; end + + # Clears the cache. + # + # source://tilt//lib/tilt.rb#114 + def clear; end + + # Caches a value for key, or returns the previously cached value. + # If a value has been previously cached for key then it is + # returned. Otherwise, block is yielded to and its return value + # which may be nil, is cached under key and returned. + # + # @yield + # @yieldreturn the value to cache for key + # + # source://tilt//lib/tilt.rb#107 + def fetch(*key); end +end + +# @private +# +# source://tilt//lib/tilt/template.rb#3 +module Tilt::CompiledTemplates; end + +# ERB template implementation. See: +# http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/classes/ERB.html +# +# source://tilt//lib/tilt/erb.rb#7 +class Tilt::ERBTemplate < ::Tilt::Template + # @return [Boolean] + # + # source://tilt//lib/tilt/erb.rb#68 + def freeze_string_literals?; end + + # ERB generates a line to specify the character coding of the generated + # source in 1.9. Account for this in the line offset. + # + # source://tilt//lib/tilt/erb.rb#63 + def precompiled(locals); end + + # source://tilt//lib/tilt/erb.rb#52 + def precompiled_postamble(locals); end + + # source://tilt//lib/tilt/erb.rb#44 + def precompiled_preamble(locals); end + + # source://tilt//lib/tilt/erb.rb#39 + def precompiled_template(locals); end + + # source://tilt//lib/tilt/erb.rb#21 + def prepare; end + + class << self + # source://tilt//lib/tilt/erb.rb#12 + def default_output_variable; end + + # source://tilt//lib/tilt/erb.rb#16 + def default_output_variable=(name); end + end +end + +# source://tilt//lib/tilt/erb.rb#10 +Tilt::ERBTemplate::SUPPORTS_KVARGS = T.let(T.unsafe(nil), Array) + +# Erubi (a simplified version of Erubis) template implementation. +# See https://github.com/jeremyevans/erubi +# +# ErubiTemplate supports the following additional options, in addition +# to the options supported by the Erubi engine: +# +# :engine_class :: allows you to specify a custom engine class to use +# instead of the default (which is ::Erubi::Engine). +# +# source://tilt//lib/tilt/erubi.rb#13 +class Tilt::ErubiTemplate < ::Tilt::Template + # @return [Boolean] + # + # source://tilt//lib/tilt/erubi.rb#50 + def freeze_string_literals?; end + + # source://tilt//lib/tilt/erubi.rb#46 + def precompiled_template(locals); end + + # source://tilt//lib/tilt/erubi.rb#14 + def prepare; end +end + +# source://tilt//lib/tilt/etanni.rb#4 +class Tilt::EtanniTemplate < ::Tilt::Template + # source://tilt//lib/tilt/etanni.rb#22 + def precompiled(locals); end + + # source://tilt//lib/tilt/etanni.rb#18 + def precompiled_template(locals); end + + # source://tilt//lib/tilt/etanni.rb#5 + def prepare; end +end + +# Kramdown Markdown implementation. See: +# http://kramdown.rubyforge.org/ +# +# source://tilt//lib/tilt/kramdown.rb#7 +class Tilt::KramdownTemplate < ::Tilt::Template + # @return [Boolean] + # + # source://tilt//lib/tilt/kramdown.rb#20 + def allows_script?; end + + # source://tilt//lib/tilt/kramdown.rb#16 + def evaluate(scope, locals, &block); end + + # source://tilt//lib/tilt/kramdown.rb#10 + def prepare; end +end + +# source://tilt//lib/tilt/kramdown.rb#8 +Tilt::KramdownTemplate::DUMB_QUOTES = T.let(T.unsafe(nil), Array) + +# @private +# +# source://tilt//lib/tilt/template.rb#10 +Tilt::LOCK = T.let(T.unsafe(nil), Thread::Mutex) + +# Tilt::Mapping associates file extensions with template implementations. +# +# mapping = Tilt::Mapping.new +# mapping.register(Tilt::RDocTemplate, 'rdoc') +# mapping['index.rdoc'] # => Tilt::RDocTemplate +# mapping.new('index.rdoc').render +# +# You can use {#register} to register a template class by file +# extension, {#registered?} to see if a file extension is mapped, +# {#[]} to lookup template classes, and {#new} to instantiate template +# objects. +# +# Mapping also supports *lazy* template implementations. Note that regularly +# registered template implementations *always* have preference over lazily +# registered template implementations. You should use {#register} if you +# depend on a specific template implementation and {#register_lazy} if there +# are multiple alternatives. +# +# mapping = Tilt::Mapping.new +# mapping.register_lazy('RDiscount::Template', 'rdiscount/template', 'md') +# mapping['index.md'] +# # => RDiscount::Template +# +# {#register_lazy} takes a class name, a filename, and a list of file +# extensions. When you try to lookup a template name that matches the +# file extension, Tilt will automatically try to require the filename and +# constantize the class name. +# +# Unlike {#register}, there can be multiple template implementations +# registered lazily to the same file extension. Tilt will attempt to load the +# template implementations in order (registered *last* would be tried first), +# returning the first which doesn't raise LoadError. +# +# If all of the registered template implementations fails, Tilt will raise +# the exception of the first, since that was the most preferred one. +# +# mapping = Tilt::Mapping.new +# mapping.register_lazy('Bluecloth::Template', 'bluecloth/template', 'md') +# mapping.register_lazy('RDiscount::Template', 'rdiscount/template', 'md') +# mapping['index.md'] +# # => RDiscount::Template +# +# In the previous example we say that RDiscount has a *higher priority* than +# BlueCloth. Tilt will first try to `require "rdiscount/template"`, falling +# back to `require "bluecloth/template"`. If none of these are successful, +# the first error will be raised. +# +# source://tilt//lib/tilt/mapping.rb#51 +class Tilt::Mapping + # @return [Mapping] a new instance of Mapping + # + # source://tilt//lib/tilt/mapping.rb#55 + def initialize; end + + # Looks up a template class based on file name and/or extension. + # + # @example + # mapping['views/hello.erb'] # => Tilt::ERBTemplate + # mapping['hello.erb'] # => Tilt::ERBTemplate + # mapping['erb'] # => Tilt::ERBTemplate + # @return [template class] + # + # source://tilt//lib/tilt/mapping.rb#209 + def [](file); end + + # Finds the extensions the template class has been registered under. + # + # @param template_class [template class] + # + # source://tilt//lib/tilt/mapping.rb#240 + def extensions_for(template_class); end + + # @private + # + # source://tilt//lib/tilt/mapping.rb#53 + def lazy_map; end + + # Instantiates a new template class based on the file. + # + # @example + # mapping.new('index.mt') # => instance of MyEngine::Template + # @raise [RuntimeError] if there is no template class registered for the + # file name. + # @see Tilt::Template.new + # + # source://tilt//lib/tilt/mapping.rb#193 + def new(file, line = T.unsafe(nil), options = T.unsafe(nil), &block); end + + # Registers a template implementation by file extension. There can only be + # one template implementation per file extension, and this method will + # override any existing mapping. + # + # @example + # mapping.register MyEngine::Template, 'mt' + # mapping['index.mt'] # => MyEngine::Template + # @param template_class + # @param extensions [Array] List of extensions. + # @return [void] + # + # source://tilt//lib/tilt/mapping.rb#105 + def register(template_class, *extensions); end + + # Registers a lazy template implementation by file extension. You + # can have multiple lazy template implementations defined on the + # same file extension, in which case the template implementation + # defined *last* will be attempted loaded *first*. + # + # @example + # mapping.register_lazy 'MyEngine::Template', 'my_engine/template', 'mt' + # + # defined?(MyEngine::Template) # => false + # mapping['index.mt'] # => MyEngine::Template + # defined?(MyEngine::Template) # => true + # @param class_name [String] Class name of a template class. + # @param file [String] Filename where the template class is defined. + # @param extensions [Array] List of extensions. + # @return [void] + # + # source://tilt//lib/tilt/mapping.rb#82 + def register_lazy(class_name, file, *extensions); end + + # Register a new template class using the given extension that + # represents a pipeline of multiple existing template, where the + # output from the previous template is used as input to the next + # template. + # + # This will register a template class that processes the input + # with the *erb* template processor, and takes the output of + # that and feeds it to the *scss* template processor, returning + # the output of the *scss* template processor as the result of + # the pipeline. + # + # @example + # mapping.register_pipeline('scss.erb') + # mapping.register_pipeline('scss.erb', 'erb'=>{:outvar=>'@foo'}) + # mapping.register_pipeline('scsserb', :extra_exts => 'scss.erb', + # :templates=>['erb', 'scss']) + # @option :templates + # @option :extra_exts + # @option String + # @param ext [String] Primary extension to register + # @param :templates [Hash] a customizable set of options + # @param :extra_exts [Hash] a customizable set of options + # @param String [Hash] a customizable set of options + # @return [void] + # + # source://tilt//lib/tilt/mapping.rb#140 + def register_pipeline(ext, options = T.unsafe(nil)); end + + # Checks if a file extension is registered (either eagerly or + # lazily) in this mapping. + # + # @example + # mapping.registered?('erb') # => true + # mapping.registered?('nope') # => false + # @param ext [String] File extension. + # @return [Boolean] + # + # source://tilt//lib/tilt/mapping.rb#180 + def registered?(ext); end + + # Looks up a template class based on file name and/or extension. + # + # @example + # mapping['views/hello.erb'] # => Tilt::ERBTemplate + # mapping['hello.erb'] # => Tilt::ERBTemplate + # mapping['erb'] # => Tilt::ERBTemplate + # @return [template class] + # + # source://tilt//lib/tilt/mapping.rb#209 + def template_for(file); end + + # @private + # + # source://tilt//lib/tilt/mapping.rb#53 + def template_map; end + + # Looks up a list of template classes based on file name. If the file name + # has multiple extensions, it will return all template classes matching the + # extensions from the end. + # + # @example + # mapping.templates_for('views/index.haml.erb') + # # => [Tilt::ERBTemplate, Tilt::HamlTemplate] + # @return [Array