diff options
20 files changed, 0 insertions, 70703 deletions
diff --git a/tools/ruby-tools/.gitignore b/tools/ruby-tools/.gitignore deleted file mode 100644 index 91459db..0000000 --- a/tools/ruby-tools/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -ChinaRuleSet.txt -GlobalRuleSet.txt diff --git a/tools/ruby-tools/Gemfile b/tools/ruby-tools/Gemfile deleted file mode 100644 index e8df7d9..0000000 --- a/tools/ruby-tools/Gemfile +++ /dev/null @@ -1,5 +0,0 @@ -source "https://rubygems.org" - -gem "sorbet", group: :development -gem "sorbet-runtime" -gem 'tapioca', require: false, :group => [:development, :test] diff --git a/tools/ruby-tools/Gemfile.lock b/tools/ruby-tools/Gemfile.lock deleted file mode 100644 index 80f3d0d..0000000 --- a/tools/ruby-tools/Gemfile.lock +++ /dev/null @@ -1,47 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - erubi (1.13.0) - netrc (0.11.0) - parallel (1.26.3) - prism (1.0.0) - rbi (0.2.0) - prism (~> 1.0) - sorbet-runtime (>= 0.5.9204) - sorbet (0.5.11554) - sorbet-static (= 0.5.11554) - sorbet-runtime (0.5.11554) - sorbet-static (0.5.11554-universal-darwin) - sorbet-static-and-runtime (0.5.11554) - sorbet (= 0.5.11554) - sorbet-runtime (= 0.5.11554) - spoom (1.4.2) - erubi (>= 1.10.0) - prism (>= 0.28.0) - sorbet-static-and-runtime (>= 0.5.10187) - thor (>= 0.19.2) - tapioca (0.16.2) - bundler (>= 2.2.25) - netrc (>= 0.11.0) - parallel (>= 1.21.0) - rbi (~> 0.2) - sorbet-static-and-runtime (>= 0.5.11087) - spoom (>= 1.2.0) - thor (>= 1.2.0) - yard-sorbet - thor (1.3.2) - yard (0.9.37) - yard-sorbet (0.9.0) - sorbet-runtime - yard - -PLATFORMS - x86_64-darwin-23 - -DEPENDENCIES - sorbet - sorbet-runtime - tapioca - -BUNDLED WITH - 2.5.18 diff --git a/tools/ruby-tools/bin/tapioca b/tools/ruby-tools/bin/tapioca deleted file mode 100755 index a6ae757..0000000 --- a/tools/ruby-tools/bin/tapioca +++ /dev/null @@ -1,27 +0,0 @@ -#!/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/tools/ruby-tools/gen.sh b/tools/ruby-tools/gen.sh deleted file mode 100755 index 6c8438e..0000000 --- a/tools/ruby-tools/gen.sh +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -./generate-surge-geosite.rb china > ChinaRuleSet.txt -./generate-surge-geosite.rb global > GlobalRuleSet.txt diff --git a/tools/ruby-tools/generate-surge-geosite.rb b/tools/ruby-tools/generate-surge-geosite.rb deleted file mode 100755 index ae93e9a..0000000 --- a/tools/ruby-tools/generate-surge-geosite.rb +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/env ruby -# typed: true -require "sorbet-runtime" -require "set" -require "tmpdir" - -extend T::Sig - -START_FILES = - T.let( - %w[ - github - google - youtube - twitter - facebook - discord - reddit - twitch - onedrive - quora - telegram - imgur - stackexchange - - duckduckgo - wikimedia - gitbook - gitlab - sourceforge - creativecommons - archive - matrix - tor - - python - ruby - rust - nodejs - npmjs - qt - docker - v2ray - homebrew - - jsdelivr - fastly - heroku - bootstrap - vercel - - ieee - sci-hub - libgen - z-library - ], - T::Array[String] - ) - -sig { returns(T::Array[String]) } -def download_data() - # Create a temp directory - temp_dir = Dir.mktmpdir - - # download url to temp_dir - zip_file = File.join(temp_dir, "domain-list-community-master.zip") - # zip_file = "master.zip" - - url = - "https://github.com/v2fly/domain-list-community/archive/refs/heads/master.zip" - - `curl -sfL '#{url}' -o #{zip_file}` - - `unzip #{zip_file} -d #{temp_dir}` - - data_dir = File.join(temp_dir, "domain-list-community-master", "data") - raise "data dir not found" if not Dir.exist?(data_dir) - - [data_dir, temp_dir] -end - -class Entry - extend T::Sig - - sig { params(type: String, value: String, attributes: T::Array[String]).void } - def initialize(type, value, attributes) - @type = type - @value = value - @attributes = attributes - end - - attr_reader :type, :value, :attributes - - def to_s - "#{type},#{value}" - end -end - -# Return nil if the line is a comment or empty -# Return a string if the line is an include -# Return an Entry if the line is a rule -sig { params(line: String).returns(T.nilable(T.any(Entry, String))) } -def handle_line(line) - line.strip! - return if line.empty? - return if line.start_with?("#") - - fields = - T - .must(line.split("#")[0]) - .split(" ") - .map { |s| s.strip } - .filter { |s| not s.empty? } - - rule = T.let(T.must(fields[0]), String) - - attributes = T.let([], T::Array[String]) - - for attribute in T.must(fields[1..]) - if attribute.start_with?("@") - attributes << T.must(attribute[1..]) - else - raise "Invalid attribute: #{attribute}" - end - end - - type = T.let("", String) - value = T.let("", String) - - if rule.start_with?("include:") - return rule["include:".length..] - elsif rule.start_with?("domain:") - type = "DOMAIN-SUFFIX" - value = T.must(rule["domain:".length..]) - elsif rule.start_with?("full:") - type = "DOMAIN" - value = T.must(rule["full:".length..]) - elsif rule.start_with?("keyword:") - type = "DOMAIN-KEYWORD" - value = T.must(rule["keyword:".length..]) - elsif rule.start_with?("regexp:") - type = "URL-REGEX" - value = T.must(rule["regexp:".length..]) - else - type = "DOMAIN-SUFFIX" - value = rule - end - - Entry.new(type, value, attributes) -end - -sig do - params( - filename: String, - data_dir: String, - already_handled_files: T::Set[String], - entries: T::Array[Entry] - ).void -end -def handle_file(filename, data_dir, already_handled_files, entries) - return if already_handled_files.include?(filename) - already_handled_files.add filename - file_path = File.join(data_dir, filename) - # Read as UTF-8 - File.open(file_path, "r:UTF-8") do |file| - file.each_line() do |line| - line_result = handle_line(line) - if line_result.is_a?(Entry) - entries << line_result - elsif line_result.is_a?(String) - handle_file(line_result, data_dir, already_handled_files, entries) - end - end - end -end - -sig do - params(data_dir: String, start_files: T::Array[String]).returns( - T::Array[Entry] - ) -end -def handle_data(data_dir, start_files) - already_handled_files = T.let(Set.new, T::Set[String]) - result = T.let([], T::Array[Entry]) - for filename in start_files - handle_file(filename, data_dir, already_handled_files, result) - end - result -end - -sig { params(entries: T::Array[Entry]).returns(T::Array[Entry]) } -def get_entries_with_no_attribute(entries) - entries.filter { |entry| entry.attributes.empty? } -end - -sig do - params(entries: T::Array[Entry], attribute: String).returns(T::Array[Entry]) -end -def get_entries_with_attribute(entries, attribute) - entries.filter { |entry| entry.attributes.include?(attribute) } -end - -sig { params(entries: T::Array[Entry]).void } -def print_entries(entries) - entries.each { |entry| puts entry.to_s } -end - -ARGV.length == 1 or raise "Usage: generate-surge-geosite.rb <china|global>" -mode = ARGV[0] -mode == "china" or mode == "global" or raise "Invalid mode: #{mode}" - -data_dir, temp_dir = download_data() -entries = handle_data(T.must(data_dir), START_FILES) -print_entries(get_entries_with_no_attribute(entries)) if mode == "global" -print_entries(get_entries_with_attribute(entries, "cn")) if mode == "china" - -FileUtils.remove_entry(T.must(temp_dir)) diff --git a/tools/ruby-tools/sorbet/config b/tools/ruby-tools/sorbet/config deleted file mode 100644 index 983d2f1..0000000 --- a/tools/ruby-tools/sorbet/config +++ /dev/null @@ -1,4 +0,0 @@ ---dir -. ---ignore=tmp/ ---ignore=vendor/ diff --git a/tools/ruby-tools/sorbet/rbi/gems/.gitattributes b/tools/ruby-tools/sorbet/rbi/gems/.gitattributes deleted file mode 100644 index d9bb82a..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -**/*.rbi linguist-generated=true diff --git a/tools/ruby-tools/sorbet/rbi/gems/erubi@1.13.0.rbi b/tools/ruby-tools/sorbet/rbi/gems/erubi@1.13.0.rbi deleted file mode 100644 index 16d45fa..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/erubi@1.13.0.rbi +++ /dev/null @@ -1,150 +0,0 @@ -# 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 - private - - def h(_arg0); end - - class << self - def h(_arg0); end - end -end - -# source://erubi//lib/erubi.rb#51 -class Erubi::Engine - # Initialize a new Erubi::Engine. Options: - # +:bufval+ :: The value to use for the buffer variable, as a string (default <tt>'::String.new'</tt>). - # +:bufvar+ :: The variable name to use for the buffer variable, as a string. - # +:chain_appends+ :: Whether to chain <tt><<</t> 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: <tt>'::Erubi.h'</tt>). - # +:escape+ :: Whether to make <tt><%=</tt> escape by default, and <tt><%==</tt> 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 <tt>.freeze</tt> - # (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 <tt>'<%'</tt>). - # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default <tt>'%>'</tt>). - # +: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#91 - def initialize(input, properties = T.unsafe(nil)); end - - # The variable name used for the buffer variable. - # - # source://erubi//lib/erubi.rb#62 - def bufvar; end - - # The filename of the template, if one was given. - # - # source://erubi//lib/erubi.rb#59 - def filename; end - - # The frozen ruby source code generated from the template, which can be evaled. - # - # source://erubi//lib/erubi.rb#56 - def src; end - - private - - # Add ruby code to the template - # - # source://erubi//lib/erubi.rb#223 - 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#232 - def add_expression(indicator, code); end - - # Add the result of Ruby expression to the template - # - # source://erubi//lib/erubi.rb#241 - def add_expression_result(code); end - - # Add the escaped result of Ruby expression to the template - # - # source://erubi//lib/erubi.rb#246 - 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#252 - 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#210 - 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#258 - 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#286 - 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#268 - def with_buffer; end -end - -# The default regular expression used for scanning. -# -# source://erubi//lib/erubi.rb#53 -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/tools/ruby-tools/sorbet/rbi/gems/netrc@0.11.0.rbi b/tools/ruby-tools/sorbet/rbi/gems/netrc@0.11.0.rbi deleted file mode 100644 index 4ae989b..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/netrc@0.11.0.rbi +++ /dev/null @@ -1,159 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `netrc` gem. -# Please instead update this file by running `bin/tapioca gem netrc`. - - -# source://netrc//lib/netrc.rb#3 -class Netrc - # @return [Netrc] a new instance of Netrc - # - # source://netrc//lib/netrc.rb#166 - def initialize(path, data); end - - # source://netrc//lib/netrc.rb#180 - def [](k); end - - # source://netrc//lib/netrc.rb#188 - def []=(k, info); end - - # source://netrc//lib/netrc.rb#200 - def delete(key); end - - # source://netrc//lib/netrc.rb#211 - def each(&block); end - - # source://netrc//lib/netrc.rb#196 - def length; end - - # source://netrc//lib/netrc.rb#215 - def new_item(m, l, p); end - - # Returns the value of attribute new_item_prefix. - # - # source://netrc//lib/netrc.rb#178 - def new_item_prefix; end - - # Sets the attribute new_item_prefix - # - # @param value the value to set the attribute new_item_prefix to. - # - # source://netrc//lib/netrc.rb#178 - def new_item_prefix=(_arg0); end - - # source://netrc//lib/netrc.rb#219 - def save; end - - # source://netrc//lib/netrc.rb#233 - def unparse; end - - class << self - # source://netrc//lib/netrc.rb#42 - def check_permissions(path); end - - # source://netrc//lib/netrc.rb#33 - def config; end - - # @yield [self.config] - # - # source://netrc//lib/netrc.rb#37 - def configure; end - - # source://netrc//lib/netrc.rb#10 - def default_path; end - - # source://netrc//lib/netrc.rb#14 - def home_path; end - - # source://netrc//lib/netrc.rb#85 - def lex(lines); end - - # source://netrc//lib/netrc.rb#29 - def netrc_filename; end - - # Returns two values, a header and a list of items. - # Each item is a tuple, containing some or all of: - # - machine keyword (including trailing whitespace+comments) - # - machine name - # - login keyword (including surrounding whitespace+comments) - # - login - # - password keyword (including surrounding whitespace+comments) - # - password - # - trailing chars - # This lets us change individual fields, then write out the file - # with all its original formatting. - # - # source://netrc//lib/netrc.rb#129 - def parse(ts); end - - # Reads path and parses it as a .netrc file. If path doesn't - # exist, returns an empty object. Decrypt paths ending in .gpg. - # - # source://netrc//lib/netrc.rb#51 - def read(path = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://netrc//lib/netrc.rb#112 - def skip?(s); end - end -end - -# source://netrc//lib/netrc.rb#8 -Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped) - -# source://netrc//lib/netrc.rb#244 -class Netrc::Entry < ::Struct - # Returns the value of attribute login - # - # @return [Object] the current value of login - def login; end - - # Sets the attribute login - # - # @param value [Object] the value to set the attribute login to. - # @return [Object] the newly set value - def login=(_); end - - # Returns the value of attribute password - # - # @return [Object] the current value of password - def password; end - - # Sets the attribute password - # - # @param value [Object] the value to set the attribute password to. - # @return [Object] the newly set value - def password=(_); end - - def to_ary; end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://netrc//lib/netrc.rb#250 -class Netrc::Error < ::StandardError; end - -# source://netrc//lib/netrc.rb#68 -class Netrc::TokenArray < ::Array - # source://netrc//lib/netrc.rb#76 - def readto; end - - # source://netrc//lib/netrc.rb#69 - def take; end -end - -# source://netrc//lib/netrc.rb#4 -Netrc::VERSION = T.let(T.unsafe(nil), String) - -# see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows -# -# source://netrc//lib/netrc.rb#7 -Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped) diff --git a/tools/ruby-tools/sorbet/rbi/gems/parallel@1.26.3.rbi b/tools/ruby-tools/sorbet/rbi/gems/parallel@1.26.3.rbi deleted file mode 100644 index 854c487..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/parallel@1.26.3.rbi +++ /dev/null @@ -1,291 +0,0 @@ -# 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 - class << self - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#243 - def all?(*args, &block); end - - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#238 - def any?(*args, &block); end - - # source://parallel//lib/parallel.rb#234 - def each(array, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#248 - def each_with_index(array, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#307 - def filter_map(*_arg0, **_arg1, &_arg2); end - - # source://parallel//lib/parallel.rb#303 - def flat_map(*_arg0, **_arg1, &_arg2); end - - # source://parallel//lib/parallel.rb#228 - def in_processes(options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#212 - def in_threads(options = T.unsafe(nil)); end - - # source://parallel//lib/parallel.rb#252 - def map(source, options = T.unsafe(nil), &block); end - - # source://parallel//lib/parallel.rb#299 - def map_with_index(array, options = T.unsafe(nil), &block); end - - # Number of physical processor cores on the current system. - # - # source://parallel//lib/parallel.rb#312 - def physical_processor_count; end - - # Number of processors seen by the OS or value considering CPU quota if the process is inside a cgroup, - # used for process scheduling - # - # source://parallel//lib/parallel.rb#342 - def processor_count; end - - # source://parallel//lib/parallel.rb#346 - 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#351 - def worker_number=(worker_num); end - - private - - # source://parallel//lib/parallel.rb#384 - def add_progress_bar!(job_factory, options); end - - # source://parallel//lib/parallel.rb#699 - def available_processor_count; end - - # source://parallel//lib/parallel.rb#647 - def call_with_index(item, index, options, &block); end - - # source://parallel//lib/parallel.rb#579 - def create_workers(job_factory, options, &block); end - - # options is either a Integer or a Hash with :count - # - # source://parallel//lib/parallel.rb#637 - def extract_count_from_options(options); end - - # source://parallel//lib/parallel.rb#665 - def instrument_finish(item, index, result, options); end - - # yield results in the order of the input items - # needs to use `options` to store state between executions - # needs to use `done` index since a nil result would also be valid - # - # source://parallel//lib/parallel.rb#674 - def instrument_finish_in_order(item, index, result, options); end - - # source://parallel//lib/parallel.rb#694 - def instrument_start(item, index, options); end - - # source://parallel//lib/parallel.rb#357 - def physical_processor_count_windows; end - - # source://parallel//lib/parallel.rb#613 - def process_incoming_jobs(read, write, job_factory, options, &block); end - - # source://parallel//lib/parallel.rb#567 - def replace_worker(job_factory, workers, index, options, blk); end - - # source://parallel//lib/parallel.rb#378 - def run(command); end - - # source://parallel//lib/parallel.rb#658 - def with_instrumentation(item, index, options); end - - # source://parallel//lib/parallel.rb#409 - def work_direct(job_factory, options, &block); end - - # source://parallel//lib/parallel.rb#519 - def work_in_processes(job_factory, options, &blk); end - - # source://parallel//lib/parallel.rb#453 - def work_in_ractors(job_factory, options); end - - # source://parallel//lib/parallel.rb#428 - def work_in_threads(job_factory, options, &block); end - - # source://parallel//lib/parallel.rb#587 - def worker(job_factory, options, &block); end - end -end - -# source://parallel//lib/parallel.rb#11 -class Parallel::Break < ::StandardError - # @return [Break] a new instance of Break - # - # source://parallel//lib/parallel.rb#14 - def initialize(value = T.unsafe(nil)); end - - # Returns the value of attribute value. - # - # source://parallel//lib/parallel.rb#12 - def value; end -end - -# source://parallel//lib/parallel.rb#8 -class Parallel::DeadWorker < ::StandardError; end - -# source://parallel//lib/parallel.rb#32 -class Parallel::ExceptionWrapper - # @return [ExceptionWrapper] a new instance of ExceptionWrapper - # - # source://parallel//lib/parallel.rb#35 - def initialize(exception); end - - # Returns the value of attribute exception. - # - # source://parallel//lib/parallel.rb#33 - def exception; end -end - -# source://parallel//lib/parallel.rb#98 -class Parallel::JobFactory - # @return [JobFactory] a new instance of JobFactory - # - # source://parallel//lib/parallel.rb#99 - def initialize(source, mutex); end - - # source://parallel//lib/parallel.rb#107 - def next; end - - # generate item that is sent to workers - # just index is faster + less likely to blow up with unserializable errors - # - # source://parallel//lib/parallel.rb#136 - def pack(item, index); end - - # source://parallel//lib/parallel.rb#126 - def size; end - - # unpack item that is sent to workers - # - # source://parallel//lib/parallel.rb#141 - def unpack(data); end - - private - - # @return [Boolean] - # - # source://parallel//lib/parallel.rb#147 - def producer?; end - - # source://parallel//lib/parallel.rb#151 - def queue_wrapper(array); end -end - -# source://parallel//lib/parallel.rb#20 -class Parallel::Kill < ::Parallel::Break; end - -# source://parallel//lib/parallel.rb#6 -Parallel::Stop = T.let(T.unsafe(nil), Object) - -# source://parallel//lib/parallel.rb#23 -class Parallel::UndumpableException < ::StandardError - # @return [UndumpableException] a new instance of UndumpableException - # - # source://parallel//lib/parallel.rb#26 - def initialize(original); end - - # Returns the value of attribute backtrace. - # - # source://parallel//lib/parallel.rb#24 - def backtrace; end -end - -# source://parallel//lib/parallel.rb#156 -class Parallel::UserInterruptHandler - class << self - # source://parallel//lib/parallel.rb#181 - def kill(thing); end - - # kill all these pids or threads if user presses Ctrl+c - # - # source://parallel//lib/parallel.rb#161 - def kill_on_ctrl_c(pids, options); end - - private - - # source://parallel//lib/parallel.rb#205 - def restore_interrupt(old, signal); end - - # source://parallel//lib/parallel.rb#190 - def trap_interrupt(signal); end - end -end - -# source://parallel//lib/parallel.rb#157 -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#51 -class Parallel::Worker - # @return [Worker] a new instance of Worker - # - # source://parallel//lib/parallel.rb#55 - def initialize(read, write, pid); end - - # might be passed to started_processes and simultaneously closed by another thread - # when running in isolation mode, so we have to check if it is closed before closing - # - # source://parallel//lib/parallel.rb#68 - def close_pipes; end - - # Returns the value of attribute pid. - # - # source://parallel//lib/parallel.rb#52 - def pid; end - - # Returns the value of attribute read. - # - # source://parallel//lib/parallel.rb#52 - def read; end - - # source://parallel//lib/parallel.rb#61 - def stop; end - - # Returns the value of attribute thread. - # - # source://parallel//lib/parallel.rb#53 - def thread; end - - # Sets the attribute thread - # - # @param value the value to set the attribute thread to. - # - # source://parallel//lib/parallel.rb#53 - def thread=(_arg0); end - - # source://parallel//lib/parallel.rb#73 - def work(data); end - - # Returns the value of attribute write. - # - # source://parallel//lib/parallel.rb#52 - def write; end - - private - - # source://parallel//lib/parallel.rb#91 - def wait; end -end diff --git a/tools/ruby-tools/sorbet/rbi/gems/prism@1.0.0.rbi b/tools/ruby-tools/sorbet/rbi/gems/prism@1.0.0.rbi deleted file mode 100644 index 2774c45..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/prism@1.0.0.rbi +++ /dev/null @@ -1,34144 +0,0 @@ -# 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/dsl.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/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#45 - 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#55 - 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#63 - 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 - - # Mirror the Prism.profile API by using the serialization API. - def profile(*_arg0); end - - # Mirror the Prism.profile_file API by using the serialization API. - def profile_file(*_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#135 -class Prism::ASCIISource < ::Prism::Source - # Return the column number in characters for the given byte offset. - # - # source://prism//lib/prism/parse_result.rb#142 - 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#137 - 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#159 - 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#152 - 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#227 -class Prism::AliasGlobalVariableNode < ::Prism::Node - # Initialize a new AliasGlobalVariableNode node. - # - # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode - # - # source://prism//lib/prism/node.rb#229 - def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); 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#316 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#240 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#245 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#255 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#250 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, ?old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, ?keyword_loc: Location) -> AliasGlobalVariableNode - # - # source://prism//lib/prism/node.rb#260 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#245 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#268 - 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#300 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#295 - def keyword; end - - # The location of the `alias` keyword. - # - # alias $foo $bar - # ^^^^^ - # - # source://prism//lib/prism/node.rb#288 - def keyword_loc; end - - # Represents the new name of the global variable that can be used after aliasing. - # - # alias $foo $bar - # ^^^^ - # - # source://prism//lib/prism/node.rb#276 - def new_name; end - - # Represents the old name of the global variable that can be used before aliasing. - # - # alias $foo $bar - # ^^^^ - # - # source://prism//lib/prism/node.rb#282 - def old_name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#305 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#310 - 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#328 -class Prism::AliasMethodNode < ::Prism::Node - # Initialize a new AliasMethodNode node. - # - # @return [AliasMethodNode] a new instance of AliasMethodNode - # - # source://prism//lib/prism/node.rb#330 - def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); 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#408 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#341 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#346 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#356 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#351 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode - # - # source://prism//lib/prism/node.rb#361 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#346 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#369 - 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#392 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#387 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#380 - def keyword_loc; end - - # attr_reader new_name: SymbolNode | InterpolatedSymbolNode - # - # source://prism//lib/prism/node.rb#374 - def new_name; end - - # attr_reader old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode - # - # source://prism//lib/prism/node.rb#377 - def old_name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#397 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#402 - def type; end - end -end - -# Represents an alternation pattern in pattern matching. -# -# foo => bar | baz -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#420 -class Prism::AlternationPatternNode < ::Prism::Node - # Initialize a new AlternationPatternNode node. - # - # @return [AlternationPatternNode] a new instance of AlternationPatternNode - # - # source://prism//lib/prism/node.rb#422 - def initialize(source, node_id, location, flags, left, right, operator_loc); 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#500 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#433 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#438 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#448 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#443 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode - # - # source://prism//lib/prism/node.rb#453 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#438 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#461 - 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#484 - sig { override.returns(String) } - def inspect; end - - # attr_reader left: Prism::node - # - # source://prism//lib/prism/node.rb#466 - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#479 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#472 - def operator_loc; end - - # attr_reader right: Prism::node - # - # source://prism//lib/prism/node.rb#469 - def right; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#489 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#494 - def type; end - end -end - -# Represents the use of the `&&` operator or the `and` keyword. -# -# left and right -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#512 -class Prism::AndNode < ::Prism::Node - # Initialize a new AndNode node. - # - # @return [AndNode] a new instance of AndNode - # - # source://prism//lib/prism/node.rb#514 - def initialize(source, node_id, location, flags, left, right, operator_loc); 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#607 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#525 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#530 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#540 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#535 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode - # - # source://prism//lib/prism/node.rb#545 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#530 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#553 - 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#591 - 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#564 - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#586 - def operator; end - - # The location of the `and` keyword or the `&&` operator. - # - # left and right - # ^^^ - # - # source://prism//lib/prism/node.rb#579 - 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#573 - def right; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#596 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#601 - 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#619 -class Prism::ArgumentsNode < ::Prism::Node - # Initialize a new ArgumentsNode node. - # - # @return [ArgumentsNode] a new instance of ArgumentsNode - # - # source://prism//lib/prism/node.rb#621 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - arguments: T::Array[Prism::Node] - ).void - end - def initialize(source, node_id, location, flags, arguments); 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#697 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#630 - 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#678 - sig { returns(T::Array[Prism::Node]) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#635 - 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#645 - 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#640 - 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#668 - sig { returns(T::Boolean) } - def contains_keyword_splat?; end - - # def contains_keywords?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#663 - sig { returns(T::Boolean) } - def contains_keywords?; end - - # def contains_splat?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#673 - sig { returns(T::Boolean) } - def contains_splat?; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: Array[Prism::node]) -> ArgumentsNode - # - # source://prism//lib/prism/node.rb#650 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - arguments: T::Array[Prism::Node] - ).returns(Prism::ArgumentsNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#635 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } - # - # source://prism//lib/prism/node.rb#658 - 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#681 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#686 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#691 - def type; end - end -end - -# Flags for arguments nodes. -# -# source://prism//lib/prism/node.rb#16647 -module Prism::ArgumentsNodeFlags; end - -# if arguments contain keywords -# -# source://prism//lib/prism/node.rb#16649 -Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) - -# if arguments contain keyword splat -# -# source://prism//lib/prism/node.rb#16652 -Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) - -# if arguments contain splat -# -# source://prism//lib/prism/node.rb#16655 -Prism::ArgumentsNodeFlags::CONTAINS_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#709 -class Prism::ArrayNode < ::Prism::Node - # Initialize a new ArrayNode node. - # - # @return [ArrayNode] a new instance of ArrayNode - # - # source://prism//lib/prism/node.rb#711 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - elements: T::Array[Prism::Node], - opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location) - ).void - end - def initialize(source, node_id, location, flags, elements, opening_loc, closing_loc); 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#825 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#722 - 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#727 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#804 - 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#786 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#737 - 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#732 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def contains_splat?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#755 - sig { returns(T::Boolean) } - def contains_splat?; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayNode - # - # source://prism//lib/prism/node.rb#742 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - elements: T::Array[Prism::Node], - opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location) - ).returns(Prism::ArrayNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#727 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } - # - # source://prism//lib/prism/node.rb#750 - 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#760 - 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#809 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#799 - 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#768 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#814 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#819 - def type; end - end -end - -# Flags for array nodes. -# -# source://prism//lib/prism/node.rb#16659 -module Prism::ArrayNodeFlags; end - -# if array contains splat nodes -# -# source://prism//lib/prism/node.rb#16661 -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#851 -class Prism::ArrayPatternNode < ::Prism::Node - # Initialize a new ArrayPatternNode node. - # - # @return [ArrayPatternNode] a new instance of ArrayPatternNode - # - # source://prism//lib/prism/node.rb#853 - def initialize(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc); 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#969 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#867 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#872 - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#948 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#930 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#887 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#877 - def compact_child_nodes; end - - # attr_reader constant: Prism::node? - # - # source://prism//lib/prism/node.rb#905 - def constant; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: Prism::node?, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode - # - # source://prism//lib/prism/node.rb#892 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#872 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } - # - # source://prism//lib/prism/node.rb#900 - 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#953 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#943 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#917 - def opening_loc; end - - # attr_reader posts: Array[Prism::node] - # - # source://prism//lib/prism/node.rb#914 - def posts; end - - # attr_reader requireds: Array[Prism::node] - # - # source://prism//lib/prism/node.rb#908 - def requireds; end - - # attr_reader rest: Prism::node? - # - # source://prism//lib/prism/node.rb#911 - def rest; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#958 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#963 - def type; end - end -end - -# Represents a hash key/value pair. -# -# { a => b } -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#986 -class Prism::AssocNode < ::Prism::Node - # Initialize a new AssocNode node. - # - # @return [AssocNode] a new instance of AssocNode - # - # source://prism//lib/prism/node.rb#988 - def initialize(source, node_id, location, flags, key, value, operator_loc); 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#1090 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#999 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1004 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1014 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1009 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode - # - # source://prism//lib/prism/node.rb#1019 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1004 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } - # - # source://prism//lib/prism/node.rb#1027 - 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#1074 - 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#1041 - def key; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#1069 - def operator; end - - # The location of the `=>` operator, if present. - # - # { foo => bar } - # ^^ - # - # source://prism//lib/prism/node.rb#1056 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#1079 - 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#1050 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#1084 - def type; end - end -end - -# Represents a splat in a hash literal. -# -# { **foo } -# ^^^^^ -# -# source://prism//lib/prism/node.rb#1102 -class Prism::AssocSplatNode < ::Prism::Node - # Initialize a new AssocSplatNode node. - # - # @return [AssocSplatNode] a new instance of AssocSplatNode - # - # source://prism//lib/prism/node.rb#1104 - def initialize(source, node_id, location, flags, value, operator_loc); 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#1186 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1114 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1119 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1131 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1124 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode - # - # source://prism//lib/prism/node.rb#1136 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1119 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#1144 - 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#1170 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#1165 - def operator; end - - # The location of the `**` operator. - # - # { **x } - # ^^ - # - # source://prism//lib/prism/node.rb#1158 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#1175 - 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#1152 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#1180 - def type; end - end -end - -# The FFI backend is used on other Ruby implementations. -# -# source://prism//lib/prism.rb#81 -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#1197 -class Prism::BackReferenceReadNode < ::Prism::Node - # Initialize a new BackReferenceReadNode node. - # - # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode - # - # source://prism//lib/prism/node.rb#1199 - def initialize(source, node_id, location, flags, name); 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#1264 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1208 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1213 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1223 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1218 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode - # - # source://prism//lib/prism/node.rb#1228 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1213 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#1236 - 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#1248 - 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#1245 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#1253 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#1258 - 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#1276 -class Prism::BeginNode < ::Prism::Node - # Initialize a new BeginNode node. - # - # @return [BeginNode] a new instance of BeginNode - # - # source://prism//lib/prism/node.rb#1278 - def initialize(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc); 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#1394 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1292 - def accept(visitor); end - - # def begin_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#1368 - def begin_keyword; end - - # attr_reader begin_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#1330 - def begin_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1297 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1312 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1302 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode - # - # source://prism//lib/prism/node.rb#1317 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1297 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } - # - # source://prism//lib/prism/node.rb#1325 - def deconstruct_keys(keys); end - - # attr_reader else_clause: ElseNode? - # - # source://prism//lib/prism/node.rb#1349 - def else_clause; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#1373 - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#1355 - def end_keyword_loc; end - - # attr_reader ensure_clause: EnsureNode? - # - # source://prism//lib/prism/node.rb#1352 - def ensure_clause; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#1378 - sig { override.returns(String) } - def inspect; end - - # source://prism//lib/prism/parse_result/newlines.rb#79 - def newline_flag!(lines); end - - # attr_reader rescue_clause: RescueNode? - # - # source://prism//lib/prism/node.rb#1346 - def rescue_clause; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#1343 - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#1383 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#1388 - def type; end - end -end - -# Represents a block argument using `&`. -# -# bar(&args) -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#1409 -class Prism::BlockArgumentNode < ::Prism::Node - # Initialize a new BlockArgumentNode node. - # - # @return [BlockArgumentNode] a new instance of BlockArgumentNode - # - # source://prism//lib/prism/node.rb#1411 - def initialize(source, node_id, location, flags, expression, operator_loc); 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#1487 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1421 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1426 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1438 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1431 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode - # - # source://prism//lib/prism/node.rb#1443 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1426 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#1451 - def deconstruct_keys(keys); end - - # attr_reader expression: Prism::node? - # - # source://prism//lib/prism/node.rb#1456 - def expression; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#1471 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#1466 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#1459 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#1476 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#1481 - def type; end - end -end - -# Represents a block local variable. -# -# a { |; b| } -# ^ -# -# source://prism//lib/prism/node.rb#1498 -class Prism::BlockLocalVariableNode < ::Prism::Node - # Initialize a new BlockLocalVariableNode node. - # - # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode - # - # source://prism//lib/prism/node.rb#1500 - sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } - def initialize(source, node_id, location, flags, name); 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#1566 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1509 - 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#1514 - 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#1524 - 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#1519 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode - # - # source://prism//lib/prism/node.rb#1529 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::BlockLocalVariableNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1514 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#1537 - 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#1550 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#1547 - sig { returns(Symbol) } - def name; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#1542 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#1555 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#1560 - def type; end - end -end - -# Represents a block of ruby code. -# -# [1, 2, 3].each { |i| puts x } -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#1577 -class Prism::BlockNode < ::Prism::Node - # Initialize a new BlockNode node. - # - # @return [BlockNode] a new instance of BlockNode - # - # source://prism//lib/prism/node.rb#1579 - def initialize(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc); 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#1677 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1592 - def accept(visitor); end - - # attr_reader body: StatementsNode | BeginNode | nil - # - # source://prism//lib/prism/node.rb#1634 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1597 - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#1656 - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#1644 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1610 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1602 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode - # - # source://prism//lib/prism/node.rb#1615 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1597 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } - # - # source://prism//lib/prism/node.rb#1623 - 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#1661 - sig { override.returns(String) } - def inspect; end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#1628 - def locals; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#1651 - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#1637 - def opening_loc; end - - # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil - # - # source://prism//lib/prism/node.rb#1631 - def parameters; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#1666 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#1671 - def type; end - end -end - -# Represents a block parameter of a method, block, or lambda definition. -# -# def a(&b) -# ^^ -# end -# -# source://prism//lib/prism/node.rb#1693 -class Prism::BlockParameterNode < ::Prism::Node - # Initialize a new BlockParameterNode node. - # - # @return [BlockParameterNode] a new instance of BlockParameterNode - # - # source://prism//lib/prism/node.rb#1695 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location - ).void - end - def initialize(source, node_id, location, flags, name, name_loc, operator_loc); 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#1788 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1706 - 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#1711 - 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#1721 - 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#1716 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode - # - # source://prism//lib/prism/node.rb#1726 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location - ).returns(Prism::BlockParameterNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1711 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#1734 - 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#1772 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#1744 - sig { returns(T.nilable(Symbol)) } - def name; end - - # attr_reader name_loc: Location? - # - # source://prism//lib/prism/node.rb#1747 - sig { returns(T.nilable(Prism::Location)) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#1767 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#1760 - sig { returns(Prism::Location) } - def operator_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#1739 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#1777 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#1782 - 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#1805 -class Prism::BlockParametersNode < ::Prism::Node - # Initialize a new BlockParametersNode node. - # - # @return [BlockParametersNode] a new instance of BlockParametersNode - # - # source://prism//lib/prism/node.rb#1807 - def initialize(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc); 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#1913 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1819 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1824 - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#1892 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#1874 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1837 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1829 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode - # - # source://prism//lib/prism/node.rb#1842 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1824 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } - # - # source://prism//lib/prism/node.rb#1850 - 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#1897 - sig { override.returns(String) } - def inspect; end - - # attr_reader locals: Array[BlockLocalVariableNode] - # - # source://prism//lib/prism/node.rb#1858 - def locals; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#1887 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#1861 - def opening_loc; end - - # attr_reader parameters: ParametersNode? - # - # source://prism//lib/prism/node.rb#1855 - def parameters; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#1902 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#1907 - def type; end - end -end - -# Represents the use of the `break` keyword. -# -# break foo -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#1927 -class Prism::BreakNode < ::Prism::Node - # Initialize a new BreakNode node. - # - # @return [BreakNode] a new instance of BreakNode - # - # source://prism//lib/prism/node.rb#1929 - def initialize(source, node_id, location, flags, arguments, keyword_loc); 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#2011 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#1939 - 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#1977 - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1944 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1956 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1949 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode - # - # source://prism//lib/prism/node.rb#1961 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1944 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#1969 - 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#1995 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#1990 - def keyword; end - - # The location of the `break` keyword. - # - # break foo - # ^^^^^ - # - # source://prism//lib/prism/node.rb#1983 - def keyword_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#2000 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#2005 - def type; end - end -end - -# Represents the use of the `&&=` operator on a call. -# -# foo.bar &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2022 -class Prism::CallAndWriteNode < ::Prism::Node - # Initialize a new CallAndWriteNode node. - # - # @return [CallAndWriteNode] a new instance of CallAndWriteNode - # - # source://prism//lib/prism/node.rb#2024 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).void - end - def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); 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#2171 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2039 - 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#2085 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2140 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2098 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2044 - 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#2057 - 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#2049 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallAndWriteNode - # - # source://prism//lib/prism/node.rb#2062 - sig do - params( - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::CallAndWriteNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2044 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#2070 - 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#2090 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#2155 - sig { override.returns(String) } - def inspect; end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2145 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2111 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#2150 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#2130 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader read_name: Symbol - # - # source://prism//lib/prism/node.rb#2124 - sig { returns(Symbol) } - def read_name; end - - # attr_reader receiver: Prism::node? - # - # source://prism//lib/prism/node.rb#2095 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2075 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#2160 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#2137 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2080 - sig { returns(T::Boolean) } - def variable_call?; end - - # attr_reader write_name: Symbol - # - # source://prism//lib/prism/node.rb#2127 - sig { returns(Symbol) } - def write_name; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#2165 - 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#2203 -class Prism::CallNode < ::Prism::Node - # Initialize a new CallNode node. - # - # @return [CallNode] a new instance of CallNode - # - # source://prism//lib/prism/node.rb#2205 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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) - ).void - end - def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block); 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#2387 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2221 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#2332 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2268 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Prism::node? - # - # source://prism//lib/prism/node.rb#2348 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2351 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2290 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2226 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#2366 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#2335 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2240 - 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#2231 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?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?) -> CallNode - # - # source://prism//lib/prism/node.rb#2245 - sig do - params( - node_id: Integer, - location: Prism::Location, - 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) - ).returns(Prism::CallNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2226 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Prism::node? } - # - # source://prism//lib/prism/node.rb#2253 - 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#331 - sig { returns(T.nilable(Prism::Location)) } - def full_message_loc; end - - # def ignore_visibility?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2273 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#2371 - sig { override.returns(String) } - def inspect; end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2356 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2306 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#2303 - sig { returns(Symbol) } - def name; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#2361 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#2319 - 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#2287 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2258 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#2376 - sig { override.returns(Symbol) } - def type; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2263 - sig { returns(T::Boolean) } - def variable_call?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#2381 - def type; end - end -end - -# Flags for call nodes. -# -# source://prism//lib/prism/node.rb#16665 -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#16673 -Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) - -# a call that ignores method visibility -# -# source://prism//lib/prism/node.rb#16676 -Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) - -# &. operator -# -# source://prism//lib/prism/node.rb#16667 -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#16670 -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#2405 -class Prism::CallOperatorWriteNode < ::Prism::Node - # Initialize a new CallOperatorWriteNode node. - # - # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode - # - # source://prism//lib/prism/node.rb#2407 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).void - end - def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value); 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#2553 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2423 - 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#2469 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader binary_operator: Symbol - # - # source://prism//lib/prism/node.rb#2514 - sig { returns(Symbol) } - def binary_operator; end - - # attr_reader binary_operator_loc: Location - # - # source://prism//lib/prism/node.rb#2517 - sig { returns(Prism::Location) } - def binary_operator_loc; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2527 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2482 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2428 - 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#2441 - 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#2433 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?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) -> CallOperatorWriteNode - # - # source://prism//lib/prism/node.rb#2446 - sig do - params( - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::CallOperatorWriteNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2428 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, 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 } - # - # source://prism//lib/prism/node.rb#2454 - 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#2474 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#2537 - sig { override.returns(String) } - def inspect; end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2532 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2495 - 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#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 - - # attr_reader read_name: Symbol - # - # source://prism//lib/prism/node.rb#2508 - sig { returns(Symbol) } - def read_name; end - - # attr_reader receiver: Prism::node? - # - # source://prism//lib/prism/node.rb#2479 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2459 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#2542 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#2524 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2464 - sig { returns(T::Boolean) } - def variable_call?; end - - # attr_reader write_name: Symbol - # - # source://prism//lib/prism/node.rb#2511 - sig { returns(Symbol) } - def write_name; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#2547 - def type; end - end -end - -# Represents the use of the `||=` operator on a call. -# -# foo.bar ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2571 -class Prism::CallOrWriteNode < ::Prism::Node - # Initialize a new CallOrWriteNode node. - # - # @return [CallOrWriteNode] a new instance of CallOrWriteNode - # - # source://prism//lib/prism/node.rb#2573 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).void - end - def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value); 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#2720 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2588 - 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#2634 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2689 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2647 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2593 - 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#2606 - 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#2598 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallOrWriteNode - # - # source://prism//lib/prism/node.rb#2611 - sig do - params( - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::CallOrWriteNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2593 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#2619 - 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#2639 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#2704 - sig { override.returns(String) } - def inspect; end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2694 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2660 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#2699 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#2679 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader read_name: Symbol - # - # source://prism//lib/prism/node.rb#2673 - sig { returns(Symbol) } - def read_name; end - - # attr_reader receiver: Prism::node? - # - # source://prism//lib/prism/node.rb#2644 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2624 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#2709 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#2686 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2629 - sig { returns(T::Boolean) } - def variable_call?; end - - # attr_reader write_name: Symbol - # - # source://prism//lib/prism/node.rb#2676 - sig { returns(Symbol) } - def write_name; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#2714 - 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#2745 -class Prism::CallTargetNode < ::Prism::Node - # Initialize a new CallTargetNode node. - # - # @return [CallTargetNode] a new instance of CallTargetNode - # - # source://prism//lib/prism/node.rb#2747 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - receiver: Prism::Node, - call_operator_loc: Prism::Location, - name: Symbol, - message_loc: Prism::Location - ).void - end - def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc); 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#2858 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2759 - 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#2802 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String - # - # source://prism//lib/prism/node.rb#2832 - sig { returns(String) } - def call_operator; end - - # attr_reader call_operator_loc: Location - # - # source://prism//lib/prism/node.rb#2815 - sig { returns(Prism::Location) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2764 - 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#2774 - 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#2769 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location) -> CallTargetNode - # - # source://prism//lib/prism/node.rb#2779 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - receiver: Prism::Node, - call_operator_loc: Prism::Location, - name: Symbol, - message_loc: Prism::Location - ).returns(Prism::CallTargetNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2764 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location } - # - # source://prism//lib/prism/node.rb#2787 - 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#2807 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#2842 - sig { override.returns(String) } - def inspect; end - - # def message: () -> String - # - # source://prism//lib/prism/node.rb#2837 - sig { returns(String) } - def message; end - - # attr_reader message_loc: Location - # - # source://prism//lib/prism/node.rb#2825 - sig { returns(Prism::Location) } - def message_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#2822 - sig { returns(Symbol) } - def name; end - - # attr_reader receiver: Prism::node - # - # source://prism//lib/prism/node.rb#2812 - sig { returns(Prism::Node) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2792 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#2847 - sig { override.returns(Symbol) } - def type; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2797 - sig { returns(T::Boolean) } - def variable_call?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#2852 - def type; end - end -end - -# Represents assigning to a local variable in pattern matching. -# -# foo => [bar => baz] -# ^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2872 -class Prism::CapturePatternNode < ::Prism::Node - # Initialize a new CapturePatternNode node. - # - # @return [CapturePatternNode] a new instance of CapturePatternNode - # - # source://prism//lib/prism/node.rb#2874 - def initialize(source, node_id, location, flags, value, target, operator_loc); 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#2952 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2885 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2890 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2900 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2895 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: Prism::node, ?operator_loc: Location) -> CapturePatternNode - # - # source://prism//lib/prism/node.rb#2905 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2890 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#2913 - 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#2936 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#2931 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#2924 - def operator_loc; end - - # attr_reader target: Prism::node - # - # source://prism//lib/prism/node.rb#2921 - def target; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#2941 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#2918 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#2946 - 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#2966 -class Prism::CaseMatchNode < ::Prism::Node - # Initialize a new CaseMatchNode node. - # - # @return [CaseMatchNode] a new instance of CaseMatchNode - # - # source://prism//lib/prism/node.rb#2968 - def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); 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#3067 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#2981 - def accept(visitor); end - - # def case_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3041 - def case_keyword; end - - # attr_reader case_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3027 - def case_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2986 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3000 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2991 - def compact_child_nodes; end - - # attr_reader conditions: Array[Prism::node] - # - # source://prism//lib/prism/node.rb#3021 - def conditions; end - - # Returns the else clause of the case match node. This method is deprecated - # in favor of #else_clause. - # - # source://prism//lib/prism/node_ext.rb#467 - def consequent; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[Prism::node], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode - # - # source://prism//lib/prism/node.rb#3005 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2986 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[Prism::node], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#3013 - def deconstruct_keys(keys); end - - # attr_reader else_clause: ElseNode? - # - # source://prism//lib/prism/node.rb#3024 - def else_clause; end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3046 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3034 - 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#3051 - sig { override.returns(String) } - def inspect; end - - # attr_reader predicate: Prism::node? - # - # source://prism//lib/prism/node.rb#3018 - def predicate; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3056 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3061 - def type; end - end -end - -# Represents the use of a case statement. -# -# case true -# when false -# end -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3084 -class Prism::CaseNode < ::Prism::Node - # Initialize a new CaseNode node. - # - # @return [CaseNode] a new instance of CaseNode - # - # source://prism//lib/prism/node.rb#3086 - def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); 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#3185 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3099 - def accept(visitor); end - - # def case_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3159 - def case_keyword; end - - # attr_reader case_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3145 - def case_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3104 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3118 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3109 - def compact_child_nodes; end - - # attr_reader conditions: Array[Prism::node] - # - # source://prism//lib/prism/node.rb#3139 - def conditions; end - - # Returns the else clause of the case node. This method is deprecated in - # favor of #else_clause. - # - # source://prism//lib/prism/node_ext.rb#476 - def consequent; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[Prism::node], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode - # - # source://prism//lib/prism/node.rb#3123 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3104 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[Prism::node], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#3131 - def deconstruct_keys(keys); end - - # attr_reader else_clause: ElseNode? - # - # source://prism//lib/prism/node.rb#3142 - def else_clause; end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3164 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3152 - 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#3169 - sig { override.returns(String) } - def inspect; end - - # attr_reader predicate: Prism::node? - # - # source://prism//lib/prism/node.rb#3136 - def predicate; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3174 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3179 - def type; end - end -end - -# Represents a class declaration involving the `class` keyword. -# -# class Foo end -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3200 -class Prism::ClassNode < ::Prism::Node - # Initialize a new ClassNode node. - # - # @return [ClassNode] a new instance of ClassNode - # - # source://prism//lib/prism/node.rb#3202 - def initialize(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name); 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#3328 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3218 - def accept(visitor); end - - # attr_reader body: Prism::node? - # - # source://prism//lib/prism/node.rb#3284 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3223 - def child_nodes; end - - # def class_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3297 - def class_keyword; end - - # attr_reader class_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3258 - def class_keyword_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3237 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3228 - def compact_child_nodes; end - - # attr_reader constant_path: Prism::node - # - # source://prism//lib/prism/node.rb#3265 - def constant_path; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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) -> ClassNode - # - # source://prism//lib/prism/node.rb#3242 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3223 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, 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 } - # - # source://prism//lib/prism/node.rb#3250 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3307 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3287 - 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#3302 - def inheritance_operator; end - - # attr_reader inheritance_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#3268 - def inheritance_operator_loc; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#3312 - sig { override.returns(String) } - def inspect; end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#3255 - def locals; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3294 - def name; end - - # attr_reader superclass: Prism::node? - # - # source://prism//lib/prism/node.rb#3281 - def superclass; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3317 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3322 - 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#3346 -class Prism::ClassVariableAndWriteNode < ::Prism::Node - # Initialize a new ClassVariableAndWriteNode node. - # - # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#3348 - def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); 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#3434 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3360 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3365 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3375 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3370 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#3380 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3365 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#3388 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#164 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#3418 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3393 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3396 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#3413 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3403 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3423 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#3410 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3428 - 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#3447 -class Prism::ClassVariableOperatorWriteNode < ::Prism::Node - # Initialize a new ClassVariableOperatorWriteNode node. - # - # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#3449 - def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); 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#3534 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3462 - def accept(visitor); end - - # attr_reader binary_operator: Symbol - # - # source://prism//lib/prism/node.rb#3515 - def binary_operator; end - - # attr_reader binary_operator_loc: Location - # - # source://prism//lib/prism/node.rb#3505 - def binary_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3467 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3477 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3472 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#3482 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3467 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } - # - # source://prism//lib/prism/node.rb#3490 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#176 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#3518 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3495 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3498 - 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#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 - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3523 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#3512 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3528 - 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#3548 -class Prism::ClassVariableOrWriteNode < ::Prism::Node - # Initialize a new ClassVariableOrWriteNode node. - # - # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#3550 - def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); 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#3636 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3562 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3567 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3577 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3572 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#3582 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3567 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#3590 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#170 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#3620 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3595 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3598 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#3615 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3605 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3625 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#3612 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3630 - def type; end - end -end - -# Represents referencing a class variable. -# -# @@foo -# ^^^^^ -# -# source://prism//lib/prism/node.rb#3649 -class Prism::ClassVariableReadNode < ::Prism::Node - # Initialize a new ClassVariableReadNode node. - # - # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode - # - # source://prism//lib/prism/node.rb#3651 - def initialize(source, node_id, location, flags, name); 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#3716 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3660 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3665 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3675 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3670 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode - # - # source://prism//lib/prism/node.rb#3680 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3665 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#3688 - 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#3700 - 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#3697 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3705 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3710 - 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#3726 -class Prism::ClassVariableTargetNode < ::Prism::Node - # Initialize a new ClassVariableTargetNode node. - # - # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode - # - # source://prism//lib/prism/node.rb#3728 - def initialize(source, node_id, location, flags, name); 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#3789 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3737 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3742 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3752 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3747 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode - # - # source://prism//lib/prism/node.rb#3757 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3742 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#3765 - 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#3773 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3770 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3778 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3783 - def type; end - end -end - -# Represents writing to a class variable. -# -# @@foo = 1 -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3799 -class Prism::ClassVariableWriteNode < ::Prism::Node - # Initialize a new ClassVariableWriteNode node. - # - # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode - # - # source://prism//lib/prism/node.rb#3801 - def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); 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#3903 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3813 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3818 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3828 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3823 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode - # - # source://prism//lib/prism/node.rb#3833 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3818 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#3841 - 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#3887 - 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#3850 - def name; end - - # The location of the variable name. - # - # @@foo = :bar - # ^^^^^ - # - # source://prism//lib/prism/node.rb#3856 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#3882 - def operator; end - - # The location of the `=` operator. - # - # @@foo = :bar - # ^ - # - # source://prism//lib/prism/node.rb#3875 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3892 - 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#3869 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3897 - 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#375 -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#380 - 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#385 - 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#377 - 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#390 - 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 ItLocalVariableReadNode node - # - # source://prism//lib/prism/compiler.rb#39 - def visit_it_local_variable_read_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#3916 -class Prism::ConstantAndWriteNode < ::Prism::Node - # Initialize a new ConstantAndWriteNode node. - # - # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode - # - # source://prism//lib/prism/node.rb#3918 - def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); 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#4004 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#3930 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3935 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3945 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3940 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode - # - # source://prism//lib/prism/node.rb#3950 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3935 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#3958 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#182 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#3988 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3963 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3966 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#3983 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3973 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#3993 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#3980 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#3998 - def type; end - end -end - -# Represents assigning to a constant using an operator that isn't `=`. -# -# Target += value -# ^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4017 -class Prism::ConstantOperatorWriteNode < ::Prism::Node - # Initialize a new ConstantOperatorWriteNode node. - # - # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4019 - def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); 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#4104 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4032 - def accept(visitor); end - - # attr_reader binary_operator: Symbol - # - # source://prism//lib/prism/node.rb#4085 - def binary_operator; end - - # attr_reader binary_operator_loc: Location - # - # source://prism//lib/prism/node.rb#4075 - def binary_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4037 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4047 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4042 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4052 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4037 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } - # - # source://prism//lib/prism/node.rb#4060 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#194 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#4088 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4065 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4068 - 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 - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4093 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#4082 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4098 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a constant. -# -# Target ||= value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4118 -class Prism::ConstantOrWriteNode < ::Prism::Node - # Initialize a new ConstantOrWriteNode node. - # - # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode - # - # source://prism//lib/prism/node.rb#4120 - def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); 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#4206 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4132 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4137 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4147 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4142 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode - # - # source://prism//lib/prism/node.rb#4152 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4137 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#4160 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#188 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#4190 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4165 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4168 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4185 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4175 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4195 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#4182 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4200 - 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#4219 -class Prism::ConstantPathAndWriteNode < ::Prism::Node - # Initialize a new ConstantPathAndWriteNode node. - # - # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode - # - # source://prism//lib/prism/node.rb#4221 - def initialize(source, node_id, location, flags, target, operator_loc, value); 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#4299 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4232 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4237 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4247 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4242 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode - # - # source://prism//lib/prism/node.rb#4252 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4237 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#4260 - 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#4283 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4278 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4268 - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#4265 - def target; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4288 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#4275 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4293 - def type; end - end -end - -# Represents accessing a constant through a path of `::` operators. -# -# Foo::Bar -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4311 -class Prism::ConstantPathNode < ::Prism::Node - # Initialize a new ConstantPathNode node. - # - # @return [ConstantPathNode] a new instance of ConstantPathNode - # - # source://prism//lib/prism/node.rb#4313 - def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); 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#4422 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4325 - 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#202 - def child; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4330 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4342 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4335 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode - # - # source://prism//lib/prism/node.rb#4347 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4330 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } - # - # source://prism//lib/prism/node.rb#4355 - def deconstruct_keys(keys); end - - # def delimiter: () -> String - # - # source://prism//lib/prism/node.rb#4401 - def delimiter; end - - # The location of the `::` delimiter. - # - # ::Foo - # ^^ - # - # One::Two - # ^^ - # - # source://prism//lib/prism/node.rb#4381 - 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#195 - 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#173 - sig { returns(T::Array[Symbol]) } - def full_name_parts; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#4406 - 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#4372 - def name; end - - # The location of the name of the constant. - # - # ::Foo - # ^^^ - # - # One::Two - # ^^^ - # - # source://prism//lib/prism/node.rb#4394 - 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#4369 - def parent; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4411 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4416 - 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#164 -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#169 -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#4435 -class Prism::ConstantPathOperatorWriteNode < ::Prism::Node - # Initialize a new ConstantPathOperatorWriteNode node. - # - # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4437 - def initialize(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator); 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#4514 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4449 - def accept(visitor); end - - # attr_reader binary_operator: Symbol - # - # source://prism//lib/prism/node.rb#4495 - def binary_operator; end - - # attr_reader binary_operator_loc: Location - # - # source://prism//lib/prism/node.rb#4485 - def binary_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4454 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4464 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4459 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4469 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4454 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } - # - # source://prism//lib/prism/node.rb#4477 - 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#4498 - 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#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 target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#4482 - def target; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4503 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#4492 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4508 - 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#4527 -class Prism::ConstantPathOrWriteNode < ::Prism::Node - # Initialize a new ConstantPathOrWriteNode node. - # - # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode - # - # source://prism//lib/prism/node.rb#4529 - def initialize(source, node_id, location, flags, target, operator_loc, value); 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#4607 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4540 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4545 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4555 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4550 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode - # - # source://prism//lib/prism/node.rb#4560 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4545 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#4568 - 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#4591 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4586 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4576 - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#4573 - def target; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4596 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#4583 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4601 - 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#4619 -class Prism::ConstantPathTargetNode < ::Prism::Node - # Initialize a new ConstantPathTargetNode node. - # - # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode - # - # source://prism//lib/prism/node.rb#4621 - def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); 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#4709 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4633 - 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#243 - def child; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4638 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4650 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4643 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode - # - # source://prism//lib/prism/node.rb#4655 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4638 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } - # - # source://prism//lib/prism/node.rb#4663 - def deconstruct_keys(keys); end - - # def delimiter: () -> String - # - # source://prism//lib/prism/node.rb#4688 - def delimiter; end - - # attr_reader delimiter_loc: Location - # - # source://prism//lib/prism/node.rb#4674 - 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#236 - 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#216 - sig { returns(T::Array[Symbol]) } - def full_name_parts; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#4693 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#4671 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4681 - def name_loc; end - - # attr_reader parent: Prism::node? - # - # source://prism//lib/prism/node.rb#4668 - def parent; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4698 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4703 - 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#4728 -class Prism::ConstantPathWriteNode < ::Prism::Node - # Initialize a new ConstantPathWriteNode node. - # - # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode - # - # source://prism//lib/prism/node.rb#4730 - def initialize(source, node_id, location, flags, target, operator_loc, value); 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#4820 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4741 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4746 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4756 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4751 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode - # - # source://prism//lib/prism/node.rb#4761 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4746 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#4769 - 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#4804 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4799 - def operator; end - - # The location of the `=` operator. - # - # ::ABC = 123 - # ^ - # - # source://prism//lib/prism/node.rb#4786 - def operator_loc; end - - # A node representing the constant path being written to. - # - # Foo::Bar = 1 - # ^^^^^^^^ - # - # ::Foo = :abc - # ^^^^^ - # - # source://prism//lib/prism/node.rb#4780 - def target; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4809 - 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#4796 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4814 - def type; end - end -end - -# Represents referencing a constant. -# -# Foo -# ^^^ -# -# source://prism//lib/prism/node.rb#4832 -class Prism::ConstantReadNode < ::Prism::Node - # Initialize a new ConstantReadNode node. - # - # @return [ConstantReadNode] a new instance of ConstantReadNode - # - # source://prism//lib/prism/node.rb#4834 - def initialize(source, node_id, location, flags, name); 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#4899 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4843 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4848 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4858 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4853 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode - # - # source://prism//lib/prism/node.rb#4863 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4848 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#4871 - 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#139 - 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#134 - sig { returns(T::Array[Symbol]) } - def full_name_parts; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#4883 - 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#4880 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4888 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4893 - 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#4909 -class Prism::ConstantTargetNode < ::Prism::Node - # Initialize a new ConstantTargetNode node. - # - # @return [ConstantTargetNode] a new instance of ConstantTargetNode - # - # source://prism//lib/prism/node.rb#4911 - def initialize(source, node_id, location, flags, name); 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#4972 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4920 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4925 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4935 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4930 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode - # - # source://prism//lib/prism/node.rb#4940 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4925 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#4948 - 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#262 - 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#257 - sig { returns(T::Array[Symbol]) } - def full_name_parts; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#4956 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4953 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#4961 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#4966 - def type; end - end -end - -# Represents writing to a constant. -# -# Foo = 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#4982 -class Prism::ConstantWriteNode < ::Prism::Node - # Initialize a new ConstantWriteNode node. - # - # @return [ConstantWriteNode] a new instance of ConstantWriteNode - # - # source://prism//lib/prism/node.rb#4984 - def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); 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#5086 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#4996 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5001 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5011 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5006 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ConstantWriteNode - # - # source://prism//lib/prism/node.rb#5016 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5001 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#5024 - 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#152 - 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#147 - sig { returns(T::Array[Symbol]) } - def full_name_parts; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#5070 - 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#5033 - def name; end - - # The location of the constant name. - # - # FOO = 1 - # ^^^ - # - # source://prism//lib/prism/node.rb#5039 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#5065 - def operator; end - - # The location of the `=` operator. - # - # FOO = :bar - # ^ - # - # source://prism//lib/prism/node.rb#5058 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#5075 - 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#5052 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#5080 - 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( -# source, -# 0, -# Prism::Location.new(source, 0, 3), -# 0, -# [ -# Prism::IntegerNode.new( -# source, -# 0, -# Prism::Location.new(source, 1, 1), -# Prism::IntegerBaseFlags::DECIMAL, -# 1 -# ) -# ], -# Prism::Location.new(source, 0, 1), -# Prism::Location.new(source, 2, 1) -# ) -# -# you could instead write: -# -# class Builder -# include Prism::DSL -# -# attr_reader :default_source -# -# def initialize -# @default_source = source("[1]") -# end -# -# def build -# array_node( -# location: location(start_offset: 0, length: 3), -# elements: [ -# integer_node( -# location: location(start_offset: 1, length: 1), -# flags: integer_base_flag(:decimal), -# value: 1 -# ) -# ], -# opening_loc: location(start_offset: 0, length: 1), -# closing_loc: location(start_offset: 2, length: 1) -# ) -# end -# end -# -# This is mostly helpful in the context of generating trees programmatically. -# -# source://prism//lib/prism/dsl.rb#61 -module Prism::DSL - extend ::Prism::DSL - - # Create a new AliasGlobalVariableNode node. - # - # source://prism//lib/prism/dsl.rb#77 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), - old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), - keyword_loc: Prism::Location - ).returns(Prism::AliasGlobalVariableNode) - end - def alias_global_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # Create a new AliasMethodNode node. - # - # source://prism//lib/prism/dsl.rb#82 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), - old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), - keyword_loc: Prism::Location - ).returns(Prism::AliasMethodNode) - end - def alias_method_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # Create a new AlternationPatternNode node. - # - # source://prism//lib/prism/dsl.rb#87 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - left: Prism::Node, - right: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::AlternationPatternNode) - end - def alternation_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new AndNode node. - # - # source://prism//lib/prism/dsl.rb#92 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - left: Prism::Node, - right: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::AndNode) - end - def and_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new ArgumentsNode node. - # - # source://prism//lib/prism/dsl.rb#97 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - arguments: T::Array[Prism::Node] - ).returns(Prism::ArgumentsNode) - end - def arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end - - # Retrieve the value of one of the ArgumentsNodeFlags flags. - # - # source://prism//lib/prism/dsl.rb#832 - sig { params(name: Symbol).returns(Integer) } - def arguments_node_flag(name); end - - # Create a new ArrayNode node. - # - # source://prism//lib/prism/dsl.rb#102 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - elements: T::Array[Prism::Node], - opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location) - ).returns(Prism::ArrayNode) - end - def array_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Retrieve the value of one of the ArrayNodeFlags flags. - # - # source://prism//lib/prism/dsl.rb#842 - sig { params(name: Symbol).returns(Integer) } - def array_node_flag(name); end - - # Create a new ArrayPatternNode node. - # - # source://prism//lib/prism/dsl.rb#107 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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) - ).returns(Prism::ArrayPatternNode) - end - def array_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new AssocNode node. - # - # source://prism//lib/prism/dsl.rb#112 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - key: Prism::Node, - value: Prism::Node, - operator_loc: T.nilable(Prism::Location) - ).returns(Prism::AssocNode) - end - def assoc_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new AssocSplatNode node. - # - # source://prism//lib/prism/dsl.rb#117 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - value: T.nilable(Prism::Node), - operator_loc: Prism::Location - ).returns(Prism::AssocSplatNode) - end - def assoc_splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new BackReferenceReadNode node. - # - # source://prism//lib/prism/dsl.rb#122 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::BackReferenceReadNode) - end - def back_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new BeginNode node. - # - # source://prism//lib/prism/dsl.rb#127 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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) - ).returns(Prism::BeginNode) - end - def begin_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new BlockArgumentNode node. - # - # source://prism//lib/prism/dsl.rb#132 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - expression: T.nilable(Prism::Node), - operator_loc: Prism::Location - ).returns(Prism::BlockArgumentNode) - end - def block_argument_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new BlockLocalVariableNode node. - # - # source://prism//lib/prism/dsl.rb#137 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::BlockLocalVariableNode) - end - def block_local_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new BlockNode node. - # - # source://prism//lib/prism/dsl.rb#142 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - locals: T::Array[Symbol], - parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), - body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), - opening_loc: Prism::Location, - closing_loc: Prism::Location - ).returns(Prism::BlockNode) - end - def block_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new BlockParameterNode node. - # - # source://prism//lib/prism/dsl.rb#147 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location - ).returns(Prism::BlockParameterNode) - end - def block_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new BlockParametersNode node. - # - # source://prism//lib/prism/dsl.rb#152 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - parameters: T.nilable(Prism::ParametersNode), - locals: T::Array[Prism::BlockLocalVariableNode], - opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location) - ).returns(Prism::BlockParametersNode) - end - def block_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new BreakNode node. - # - # source://prism//lib/prism/dsl.rb#157 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location - ).returns(Prism::BreakNode) - end - def break_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # Create a new CallAndWriteNode node. - # - # source://prism//lib/prism/dsl.rb#162 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::CallAndWriteNode) - end - def call_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # Create a new CallNode node. - # - # source://prism//lib/prism/dsl.rb#167 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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) - ).returns(Prism::CallNode) - end - def call_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # Retrieve the value of one of the CallNodeFlags flags. - # - # source://prism//lib/prism/dsl.rb#850 - sig { params(name: Symbol).returns(Integer) } - def call_node_flag(name); end - - # Create a new CallOperatorWriteNode node. - # - # source://prism//lib/prism/dsl.rb#172 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::CallOperatorWriteNode) - end - def call_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # Create a new CallOrWriteNode node. - # - # source://prism//lib/prism/dsl.rb#177 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::CallOrWriteNode) - end - def call_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # Create a new CallTargetNode node. - # - # source://prism//lib/prism/dsl.rb#182 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - receiver: Prism::Node, - call_operator_loc: Prism::Location, - name: Symbol, - message_loc: Prism::Location - ).returns(Prism::CallTargetNode) - end - def call_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil)); end - - # Create a new CapturePatternNode node. - # - # source://prism//lib/prism/dsl.rb#187 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - value: Prism::Node, - target: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::CapturePatternNode) - end - def capture_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new CaseMatchNode node. - # - # source://prism//lib/prism/dsl.rb#192 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - else_clause: T.nilable(Prism::ElseNode), - case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location - ).returns(Prism::CaseMatchNode) - end - def case_match_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # Create a new CaseNode node. - # - # source://prism//lib/prism/dsl.rb#197 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - else_clause: T.nilable(Prism::ElseNode), - case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location - ).returns(Prism::CaseNode) - end - def case_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # Create a new ClassNode node. - # - # source://prism//lib/prism/dsl.rb#202 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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 - ).returns(Prism::ClassNode) - end - def class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new ClassVariableAndWriteNode node. - # - # source://prism//lib/prism/dsl.rb#207 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::ClassVariableAndWriteNode) - end - def class_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new ClassVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dsl.rb#212 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - binary_operator_loc: Prism::Location, - value: Prism::Node, - binary_operator: Symbol - ).returns(Prism::ClassVariableOperatorWriteNode) - end - def class_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # Create a new ClassVariableOrWriteNode node. - # - # source://prism//lib/prism/dsl.rb#217 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::ClassVariableOrWriteNode) - end - def class_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new ClassVariableReadNode node. - # - # source://prism//lib/prism/dsl.rb#222 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::ClassVariableReadNode) - end - def class_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new ClassVariableTargetNode node. - # - # source://prism//lib/prism/dsl.rb#227 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::ClassVariableTargetNode) - end - def class_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new ClassVariableWriteNode node. - # - # source://prism//lib/prism/dsl.rb#232 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::ClassVariableWriteNode) - end - def class_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new ConstantAndWriteNode node. - # - # source://prism//lib/prism/dsl.rb#237 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::ConstantAndWriteNode) - end - def constant_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new ConstantOperatorWriteNode node. - # - # source://prism//lib/prism/dsl.rb#242 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - binary_operator_loc: Prism::Location, - value: Prism::Node, - binary_operator: Symbol - ).returns(Prism::ConstantOperatorWriteNode) - end - def constant_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # Create a new ConstantOrWriteNode node. - # - # source://prism//lib/prism/dsl.rb#247 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::ConstantOrWriteNode) - end - def constant_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new ConstantPathAndWriteNode node. - # - # source://prism//lib/prism/dsl.rb#252 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - target: Prism::ConstantPathNode, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::ConstantPathAndWriteNode) - end - def constant_path_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new ConstantPathNode node. - # - # source://prism//lib/prism/dsl.rb#257 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - parent: T.nilable(Prism::Node), - name: T.nilable(Symbol), - delimiter_loc: Prism::Location, - name_loc: Prism::Location - ).returns(Prism::ConstantPathNode) - end - def constant_path_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end - - # Create a new ConstantPathOperatorWriteNode node. - # - # source://prism//lib/prism/dsl.rb#262 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - target: Prism::ConstantPathNode, - binary_operator_loc: Prism::Location, - value: Prism::Node, - binary_operator: Symbol - ).returns(Prism::ConstantPathOperatorWriteNode) - end - def constant_path_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # Create a new ConstantPathOrWriteNode node. - # - # source://prism//lib/prism/dsl.rb#267 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - target: Prism::ConstantPathNode, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::ConstantPathOrWriteNode) - end - def constant_path_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new ConstantPathTargetNode node. - # - # source://prism//lib/prism/dsl.rb#272 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - parent: T.nilable(Prism::Node), - name: T.nilable(Symbol), - delimiter_loc: Prism::Location, - name_loc: Prism::Location - ).returns(Prism::ConstantPathTargetNode) - end - def constant_path_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end - - # Create a new ConstantPathWriteNode node. - # - # source://prism//lib/prism/dsl.rb#277 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - target: Prism::ConstantPathNode, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::ConstantPathWriteNode) - end - def constant_path_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new ConstantReadNode node. - # - # source://prism//lib/prism/dsl.rb#282 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::ConstantReadNode) - end - def constant_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new ConstantTargetNode node. - # - # source://prism//lib/prism/dsl.rb#287 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::ConstantTargetNode) - end - def constant_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new ConstantWriteNode node. - # - # source://prism//lib/prism/dsl.rb#292 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::ConstantWriteNode) - end - def constant_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new DefNode node. - # - # source://prism//lib/prism/dsl.rb#297 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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) - ).returns(Prism::DefNode) - end - def def_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new DefinedNode node. - # - # source://prism//lib/prism/dsl.rb#302 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - lparen_loc: T.nilable(Prism::Location), - value: Prism::Node, - rparen_loc: T.nilable(Prism::Location), - keyword_loc: Prism::Location - ).returns(Prism::DefinedNode) - end - def defined_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # Create a new ElseNode node. - # - # source://prism//lib/prism/dsl.rb#307 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - else_keyword_loc: Prism::Location, - statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: T.nilable(Prism::Location) - ).returns(Prism::ElseNode) - end - def else_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # Create a new EmbeddedStatementsNode node. - # - # source://prism//lib/prism/dsl.rb#312 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - statements: T.nilable(Prism::StatementsNode), - closing_loc: Prism::Location - ).returns(Prism::EmbeddedStatementsNode) - end - def embedded_statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new EmbeddedVariableNode node. - # - # source://prism//lib/prism/dsl.rb#317 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - operator_loc: Prism::Location, - variable: Prism::Node - ).returns(Prism::EmbeddedVariableNode) - end - def embedded_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end - - # Retrieve the value of one of the EncodingFlags flags. - # - # source://prism//lib/prism/dsl.rb#861 - sig { params(name: Symbol).returns(Integer) } - def encoding_flag(name); end - - # Create a new EnsureNode node. - # - # source://prism//lib/prism/dsl.rb#322 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - ensure_keyword_loc: Prism::Location, - statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: Prism::Location - ).returns(Prism::EnsureNode) - end - def ensure_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # Create a new FalseNode node. - # - # source://prism//lib/prism/dsl.rb#327 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::FalseNode) - end - def false_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new FindPatternNode node. - # - # source://prism//lib/prism/dsl.rb#332 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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) - ).returns(Prism::FindPatternNode) - end - def find_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new FlipFlopNode node. - # - # source://prism//lib/prism/dsl.rb#337 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - left: T.nilable(Prism::Node), - right: T.nilable(Prism::Node), - operator_loc: Prism::Location - ).returns(Prism::FlipFlopNode) - end - def flip_flop_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new FloatNode node. - # - # source://prism//lib/prism/dsl.rb#342 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - value: Float - ).returns(Prism::FloatNode) - end - def float_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new ForNode node. - # - # source://prism//lib/prism/dsl.rb#347 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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 - ).returns(Prism::ForNode) - end - def for_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new ForwardingArgumentsNode node. - # - # source://prism//lib/prism/dsl.rb#352 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::ForwardingArgumentsNode) - end - def forwarding_arguments_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new ForwardingParameterNode node. - # - # source://prism//lib/prism/dsl.rb#357 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::ForwardingParameterNode) - end - def forwarding_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new ForwardingSuperNode node. - # - # source://prism//lib/prism/dsl.rb#362 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - block: T.nilable(Prism::BlockNode) - ).returns(Prism::ForwardingSuperNode) - end - def forwarding_super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end - - # Create a new GlobalVariableAndWriteNode node. - # - # source://prism//lib/prism/dsl.rb#367 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::GlobalVariableAndWriteNode) - end - def global_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new GlobalVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dsl.rb#372 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - binary_operator_loc: Prism::Location, - value: Prism::Node, - binary_operator: Symbol - ).returns(Prism::GlobalVariableOperatorWriteNode) - end - def global_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # Create a new GlobalVariableOrWriteNode node. - # - # source://prism//lib/prism/dsl.rb#377 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::GlobalVariableOrWriteNode) - end - def global_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new GlobalVariableReadNode node. - # - # source://prism//lib/prism/dsl.rb#382 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::GlobalVariableReadNode) - end - def global_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new GlobalVariableTargetNode node. - # - # source://prism//lib/prism/dsl.rb#387 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::GlobalVariableTargetNode) - end - def global_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new GlobalVariableWriteNode node. - # - # source://prism//lib/prism/dsl.rb#392 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::GlobalVariableWriteNode) - end - def global_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new HashNode node. - # - # source://prism//lib/prism/dsl.rb#397 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - closing_loc: Prism::Location - ).returns(Prism::HashNode) - end - def hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new HashPatternNode node. - # - # source://prism//lib/prism/dsl.rb#402 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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) - ).returns(Prism::HashPatternNode) - end - def hash_pattern_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new IfNode node. - # - # source://prism//lib/prism/dsl.rb#407 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - if_keyword_loc: T.nilable(Prism::Location), - predicate: Prism::Node, - then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode), - subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), - end_keyword_loc: T.nilable(Prism::Location) - ).returns(Prism::IfNode) - end - def if_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # Create a new ImaginaryNode node. - # - # source://prism//lib/prism/dsl.rb#412 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) - ).returns(Prism::ImaginaryNode) - end - def imaginary_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end - - # Create a new ImplicitNode node. - # - # source://prism//lib/prism/dsl.rb#417 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - value: Prism::Node - ).returns(Prism::ImplicitNode) - end - def implicit_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new ImplicitRestNode node. - # - # source://prism//lib/prism/dsl.rb#422 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::ImplicitRestNode) - end - def implicit_rest_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new InNode node. - # - # source://prism//lib/prism/dsl.rb#427 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - pattern: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - in_loc: Prism::Location, - then_loc: T.nilable(Prism::Location) - ).returns(Prism::InNode) - end - def in_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end - - # Create a new IndexAndWriteNode node. - # - # source://prism//lib/prism/dsl.rb#432 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::IndexAndWriteNode) - end - def index_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # Create a new IndexOperatorWriteNode node. - # - # source://prism//lib/prism/dsl.rb#437 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::IndexOperatorWriteNode) - end - def index_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # Create a new IndexOrWriteNode node. - # - # source://prism//lib/prism/dsl.rb#442 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::IndexOrWriteNode) - end - def index_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # Create a new IndexTargetNode node. - # - # source://prism//lib/prism/dsl.rb#447 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - receiver: Prism::Node, - opening_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - closing_loc: Prism::Location, - block: T.nilable(Prism::Node) - ).returns(Prism::IndexTargetNode) - end - def index_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # Create a new InstanceVariableAndWriteNode node. - # - # source://prism//lib/prism/dsl.rb#452 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::InstanceVariableAndWriteNode) - end - def instance_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new InstanceVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dsl.rb#457 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - binary_operator_loc: Prism::Location, - value: Prism::Node, - binary_operator: Symbol - ).returns(Prism::InstanceVariableOperatorWriteNode) - end - def instance_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # Create a new InstanceVariableOrWriteNode node. - # - # source://prism//lib/prism/dsl.rb#462 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::InstanceVariableOrWriteNode) - end - def instance_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new InstanceVariableReadNode node. - # - # source://prism//lib/prism/dsl.rb#467 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::InstanceVariableReadNode) - end - def instance_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new InstanceVariableTargetNode node. - # - # source://prism//lib/prism/dsl.rb#472 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::InstanceVariableTargetNode) - end - def instance_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new InstanceVariableWriteNode node. - # - # source://prism//lib/prism/dsl.rb#477 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::InstanceVariableWriteNode) - end - def instance_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Retrieve the value of one of the IntegerBaseFlags flags. - # - # source://prism//lib/prism/dsl.rb#870 - sig { params(name: Symbol).returns(Integer) } - def integer_base_flag(name); end - - # Create a new IntegerNode node. - # - # source://prism//lib/prism/dsl.rb#482 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - value: Integer - ).returns(Prism::IntegerNode) - end - def integer_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new InterpolatedMatchLastLineNode node. - # - # source://prism//lib/prism/dsl.rb#487 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location - ).returns(Prism::InterpolatedMatchLastLineNode) - end - def interpolated_match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new InterpolatedRegularExpressionNode node. - # - # source://prism//lib/prism/dsl.rb#492 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location - ).returns(Prism::InterpolatedRegularExpressionNode) - end - def interpolated_regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new InterpolatedStringNode node. - # - # source://prism//lib/prism/dsl.rb#497 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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) - ).returns(Prism::InterpolatedStringNode) - end - def interpolated_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Retrieve the value of one of the InterpolatedStringNodeFlags flags. - # - # source://prism//lib/prism/dsl.rb#881 - sig { params(name: Symbol).returns(Integer) } - def interpolated_string_node_flag(name); end - - # Create a new InterpolatedSymbolNode node. - # - # source://prism//lib/prism/dsl.rb#502 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: T.nilable(Prism::Location), - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: T.nilable(Prism::Location) - ).returns(Prism::InterpolatedSymbolNode) - end - def interpolated_symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new InterpolatedXStringNode node. - # - # source://prism//lib/prism/dsl.rb#507 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location - ).returns(Prism::InterpolatedXStringNode) - end - def interpolated_x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new ItLocalVariableReadNode node. - # - # source://prism//lib/prism/dsl.rb#512 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::ItLocalVariableReadNode) - end - def it_local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new ItParametersNode node. - # - # source://prism//lib/prism/dsl.rb#517 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::ItParametersNode) - end - def it_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new KeywordHashNode node. - # - # source://prism//lib/prism/dsl.rb#522 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] - ).returns(Prism::KeywordHashNode) - end - def keyword_hash_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end - - # Retrieve the value of one of the KeywordHashNodeFlags flags. - # - # source://prism//lib/prism/dsl.rb#890 - sig { params(name: Symbol).returns(Integer) } - def keyword_hash_node_flag(name); end - - # Create a new KeywordRestParameterNode node. - # - # source://prism//lib/prism/dsl.rb#527 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location - ).returns(Prism::KeywordRestParameterNode) - end - def keyword_rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new LambdaNode node. - # - # source://prism//lib/prism/dsl.rb#532 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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) - ).returns(Prism::LambdaNode) - end - def lambda_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new LocalVariableAndWriteNode node. - # - # source://prism//lib/prism/dsl.rb#537 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - name: Symbol, - depth: Integer - ).returns(Prism::LocalVariableAndWriteNode) - end - def local_variable_and_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - - # Create a new LocalVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dsl.rb#542 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name_loc: Prism::Location, - binary_operator_loc: Prism::Location, - value: Prism::Node, - name: Symbol, - binary_operator: Symbol, - depth: Integer - ).returns(Prism::LocalVariableOperatorWriteNode) - end - def local_variable_operator_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new LocalVariableOrWriteNode node. - # - # source://prism//lib/prism/dsl.rb#547 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - name: Symbol, - depth: Integer - ).returns(Prism::LocalVariableOrWriteNode) - end - def local_variable_or_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - - # Create a new LocalVariableReadNode node. - # - # source://prism//lib/prism/dsl.rb#552 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - depth: Integer - ).returns(Prism::LocalVariableReadNode) - end - def local_variable_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - - # Create a new LocalVariableTargetNode node. - # - # source://prism//lib/prism/dsl.rb#557 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - depth: Integer - ).returns(Prism::LocalVariableTargetNode) - end - def local_variable_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - - # Create a new LocalVariableWriteNode node. - # - # source://prism//lib/prism/dsl.rb#562 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - depth: Integer, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::LocalVariableWriteNode) - end - def local_variable_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new Location object. - # - # source://prism//lib/prism/dsl.rb#72 - sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } - def location(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end - - # Retrieve the value of one of the LoopFlags flags. - # - # source://prism//lib/prism/dsl.rb#898 - sig { params(name: Symbol).returns(Integer) } - def loop_flag(name); end - - # Create a new MatchLastLineNode node. - # - # source://prism//lib/prism/dsl.rb#567 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String - ).returns(Prism::MatchLastLineNode) - end - def match_last_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # Create a new MatchPredicateNode node. - # - # source://prism//lib/prism/dsl.rb#572 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - value: Prism::Node, - pattern: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::MatchPredicateNode) - end - def match_predicate_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new MatchRequiredNode node. - # - # source://prism//lib/prism/dsl.rb#577 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - value: Prism::Node, - pattern: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::MatchRequiredNode) - end - def match_required_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new MatchWriteNode node. - # - # source://prism//lib/prism/dsl.rb#582 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - call: Prism::CallNode, - targets: T::Array[Prism::LocalVariableTargetNode] - ).returns(Prism::MatchWriteNode) - end - def match_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end - - # Create a new MissingNode node. - # - # source://prism//lib/prism/dsl.rb#587 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::MissingNode) - end - def missing_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new ModuleNode node. - # - # source://prism//lib/prism/dsl.rb#592 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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 - ).returns(Prism::ModuleNode) - end - def module_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new MultiTargetNode node. - # - # source://prism//lib/prism/dsl.rb#597 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), - 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) - ).returns(Prism::MultiTargetNode) - end - def multi_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - - # Create a new MultiWriteNode node. - # - # source://prism//lib/prism/dsl.rb#602 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), - 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 - ).returns(Prism::MultiWriteNode) - end - def multi_write_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new NextNode node. - # - # source://prism//lib/prism/dsl.rb#607 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location - ).returns(Prism::NextNode) - end - def next_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # Create a new NilNode node. - # - # source://prism//lib/prism/dsl.rb#612 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::NilNode) - end - def nil_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new NoKeywordsParameterNode node. - # - # source://prism//lib/prism/dsl.rb#617 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - operator_loc: Prism::Location, - keyword_loc: Prism::Location - ).returns(Prism::NoKeywordsParameterNode) - end - def no_keywords_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # Create a new NumberedParametersNode node. - # - # source://prism//lib/prism/dsl.rb#622 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - maximum: Integer - ).returns(Prism::NumberedParametersNode) - end - def numbered_parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end - - # Create a new NumberedReferenceReadNode node. - # - # source://prism//lib/prism/dsl.rb#627 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - number: Integer - ).returns(Prism::NumberedReferenceReadNode) - end - def numbered_reference_read_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end - - # Create a new OptionalKeywordParameterNode node. - # - # source://prism//lib/prism/dsl.rb#632 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::OptionalKeywordParameterNode) - end - def optional_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new OptionalParameterNode node. - # - # source://prism//lib/prism/dsl.rb#637 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::OptionalParameterNode) - end - def optional_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # Create a new OrNode node. - # - # source://prism//lib/prism/dsl.rb#642 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - left: Prism::Node, - right: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::OrNode) - end - def or_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Retrieve the value of one of the ParameterFlags flags. - # - # source://prism//lib/prism/dsl.rb#906 - sig { params(name: Symbol).returns(Integer) } - def parameter_flag(name); end - - # Create a new ParametersNode node. - # - # source://prism//lib/prism/dsl.rb#647 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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) - ).returns(Prism::ParametersNode) - end - def parameters_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end - - # Create a new ParenthesesNode node. - # - # source://prism//lib/prism/dsl.rb#652 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - body: T.nilable(Prism::Node), - opening_loc: Prism::Location, - closing_loc: Prism::Location - ).returns(Prism::ParenthesesNode) - end - def parentheses_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new PinnedExpressionNode node. - # - # source://prism//lib/prism/dsl.rb#657 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - expression: Prism::Node, - operator_loc: Prism::Location, - lparen_loc: Prism::Location, - rparen_loc: Prism::Location - ).returns(Prism::PinnedExpressionNode) - end - def pinned_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - - # Create a new PinnedVariableNode node. - # - # source://prism//lib/prism/dsl.rb#662 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - variable: Prism::Node, - operator_loc: Prism::Location - ).returns(Prism::PinnedVariableNode) - end - def pinned_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new PostExecutionNode node. - # - # source://prism//lib/prism/dsl.rb#667 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - statements: T.nilable(Prism::StatementsNode), - keyword_loc: Prism::Location, - opening_loc: Prism::Location, - closing_loc: Prism::Location - ).returns(Prism::PostExecutionNode) - end - def post_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new PreExecutionNode node. - # - # source://prism//lib/prism/dsl.rb#672 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - statements: T.nilable(Prism::StatementsNode), - keyword_loc: Prism::Location, - opening_loc: Prism::Location, - closing_loc: Prism::Location - ).returns(Prism::PreExecutionNode) - end - def pre_execution_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # Create a new ProgramNode node. - # - # source://prism//lib/prism/dsl.rb#677 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - locals: T::Array[Symbol], - statements: Prism::StatementsNode - ).returns(Prism::ProgramNode) - end - def program_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end - - # Retrieve the value of one of the RangeFlags flags. - # - # source://prism//lib/prism/dsl.rb#914 - sig { params(name: Symbol).returns(Integer) } - def range_flag(name); end - - # Create a new RangeNode node. - # - # source://prism//lib/prism/dsl.rb#682 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - left: T.nilable(Prism::Node), - right: T.nilable(Prism::Node), - operator_loc: Prism::Location - ).returns(Prism::RangeNode) - end - def range_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new RationalNode node. - # - # source://prism//lib/prism/dsl.rb#687 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - numerator: Integer, - denominator: Integer - ).returns(Prism::RationalNode) - end - def rational_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end - - # Create a new RedoNode node. - # - # source://prism//lib/prism/dsl.rb#692 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::RedoNode) - end - def redo_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Retrieve the value of one of the RegularExpressionFlags flags. - # - # source://prism//lib/prism/dsl.rb#922 - sig { params(name: Symbol).returns(Integer) } - def regular_expression_flag(name); end - - # Create a new RegularExpressionNode node. - # - # source://prism//lib/prism/dsl.rb#697 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String - ).returns(Prism::RegularExpressionNode) - end - def regular_expression_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # Create a new RequiredKeywordParameterNode node. - # - # source://prism//lib/prism/dsl.rb#702 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location - ).returns(Prism::RequiredKeywordParameterNode) - end - def required_keyword_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end - - # Create a new RequiredParameterNode node. - # - # source://prism//lib/prism/dsl.rb#707 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::RequiredParameterNode) - end - def required_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # Create a new RescueModifierNode node. - # - # source://prism//lib/prism/dsl.rb#712 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - expression: Prism::Node, - keyword_loc: Prism::Location, - rescue_expression: Prism::Node - ).returns(Prism::RescueModifierNode) - end - def rescue_modifier_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end - - # Create a new RescueNode node. - # - # source://prism//lib/prism/dsl.rb#717 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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), - subsequent: T.nilable(Prism::RescueNode) - ).returns(Prism::RescueNode) - end - def rescue_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end - - # Create a new RestParameterNode node. - # - # source://prism//lib/prism/dsl.rb#722 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location - ).returns(Prism::RestParameterNode) - end - def rest_parameter_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # Create a new RetryNode node. - # - # source://prism//lib/prism/dsl.rb#727 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::RetryNode) - end - def retry_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new ReturnNode node. - # - # source://prism//lib/prism/dsl.rb#732 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode) - ).returns(Prism::ReturnNode) - end - def return_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end - - # Create a new SelfNode node. - # - # source://prism//lib/prism/dsl.rb#737 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::SelfNode) - end - def self_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new ShareableConstantNode node. - # - # source://prism//lib/prism/dsl.rb#742 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) - ).returns(Prism::ShareableConstantNode) - end - def shareable_constant_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end - - # Retrieve the value of one of the ShareableConstantNodeFlags flags. - # - # source://prism//lib/prism/dsl.rb#940 - sig { params(name: Symbol).returns(Integer) } - def shareable_constant_node_flag(name); end - - # Create a new SingletonClassNode node. - # - # source://prism//lib/prism/dsl.rb#747 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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 - ).returns(Prism::SingletonClassNode) - end - def singleton_class_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # Create a new Source object. - # - # source://prism//lib/prism/dsl.rb#67 - sig { params(string: String).returns(Prism::Source) } - def source(string); end - - # Create a new SourceEncodingNode node. - # - # source://prism//lib/prism/dsl.rb#752 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::SourceEncodingNode) - end - def source_encoding_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new SourceFileNode node. - # - # source://prism//lib/prism/dsl.rb#757 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - filepath: String - ).returns(Prism::SourceFileNode) - end - def source_file_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end - - # Create a new SourceLineNode node. - # - # source://prism//lib/prism/dsl.rb#762 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::SourceLineNode) - end - def source_line_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new SplatNode node. - # - # source://prism//lib/prism/dsl.rb#767 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - operator_loc: Prism::Location, - expression: T.nilable(Prism::Node) - ).returns(Prism::SplatNode) - end - def splat_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end - - # Create a new StatementsNode node. - # - # source://prism//lib/prism/dsl.rb#772 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - body: T::Array[Prism::Node] - ).returns(Prism::StatementsNode) - end - def statements_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end - - # Retrieve the value of one of the StringFlags flags. - # - # source://prism//lib/prism/dsl.rb#950 - sig { params(name: Symbol).returns(Integer) } - def string_flag(name); end - - # Create a new StringNode node. - # - # source://prism//lib/prism/dsl.rb#777 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: T.nilable(Prism::Location), - content_loc: Prism::Location, - closing_loc: T.nilable(Prism::Location), - unescaped: String - ).returns(Prism::StringNode) - end - def string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # Create a new SuperNode node. - # - # source://prism//lib/prism/dsl.rb#782 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - 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) - ).returns(Prism::SuperNode) - end - def super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end - - # Retrieve the value of one of the SymbolFlags flags. - # - # source://prism//lib/prism/dsl.rb#961 - sig { params(name: Symbol).returns(Integer) } - def symbol_flag(name); end - - # Create a new SymbolNode node. - # - # source://prism//lib/prism/dsl.rb#787 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: T.nilable(Prism::Location), - value_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - unescaped: String - ).returns(Prism::SymbolNode) - end - def symbol_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # Create a new TrueNode node. - # - # source://prism//lib/prism/dsl.rb#792 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer - ).returns(Prism::TrueNode) - end - def true_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # Create a new UndefNode node. - # - # source://prism//lib/prism/dsl.rb#797 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], - keyword_loc: Prism::Location - ).returns(Prism::UndefNode) - end - def undef_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # Create a new UnlessNode node. - # - # source://prism//lib/prism/dsl.rb#802 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - predicate: Prism::Node, - then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode), - else_clause: T.nilable(Prism::ElseNode), - end_keyword_loc: T.nilable(Prism::Location) - ).returns(Prism::UnlessNode) - end - def unless_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # Create a new UntilNode node. - # - # source://prism//lib/prism/dsl.rb#807 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - closing_loc: T.nilable(Prism::Location), - predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode) - ).returns(Prism::UntilNode) - end - def until_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - - # Create a new WhenNode node. - # - # source://prism//lib/prism/dsl.rb#812 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - conditions: T::Array[Prism::Node], - then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode) - ).returns(Prism::WhenNode) - end - def when_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end - - # Create a new WhileNode node. - # - # source://prism//lib/prism/dsl.rb#817 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - closing_loc: T.nilable(Prism::Location), - predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode) - ).returns(Prism::WhileNode) - end - def while_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - - # Create a new XStringNode node. - # - # source://prism//lib/prism/dsl.rb#822 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String - ).returns(Prism::XStringNode) - end - def x_string_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # Create a new YieldNode node. - # - # source://prism//lib/prism/dsl.rb#827 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - lparen_loc: T.nilable(Prism::Location), - arguments: T.nilable(Prism::ArgumentsNode), - rparen_loc: T.nilable(Prism::Location) - ).returns(Prism::YieldNode) - end - def yield_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - - private - - # The default location object that gets attached to nodes if no location is - # specified, which uses the given source. - # - # source://prism//lib/prism/dsl.rb#980 - sig { returns(Prism::Location) } - def default_location; end - - # The default node that gets attached to nodes if no node is specified for a - # required node field. - # - # source://prism//lib/prism/dsl.rb#986 - sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } - def default_node(source, location); end - - # The default source object that gets attached to nodes and locations if no - # source is specified. - # - # source://prism//lib/prism/dsl.rb#974 - sig { returns(Prism::Source) } - def default_source; end -end - -# Represents a method definition. -# -# def method -# end -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5100 -class Prism::DefNode < ::Prism::Node - # Initialize a new DefNode node. - # - # @return [DefNode] a new instance of DefNode - # - # source://prism//lib/prism/node.rb#5102 - def initialize(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc); 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#5299 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5122 - def accept(visitor); end - - # attr_reader body: Prism::node? - # - # source://prism//lib/prism/node.rb#5175 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5127 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5141 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5132 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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?) -> DefNode - # - # source://prism//lib/prism/node.rb#5146 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5127 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, 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? } - # - # source://prism//lib/prism/node.rb#5154 - def deconstruct_keys(keys); end - - # def def_keyword: () -> String - # - # source://prism//lib/prism/node.rb#5253 - def def_keyword; end - - # attr_reader def_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5181 - def def_keyword_loc; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#5278 - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#5240 - def end_keyword_loc; end - - # def equal: () -> String? - # - # source://prism//lib/prism/node.rb#5273 - def equal; end - - # attr_reader equal_loc: Location? - # - # source://prism//lib/prism/node.rb#5227 - def equal_loc; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#5283 - sig { override.returns(String) } - def inspect; end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#5178 - def locals; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#5263 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#5201 - def lparen_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#5159 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#5162 - def name_loc; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#5258 - def operator; end - - # attr_reader operator_loc: Location? - # - # source://prism//lib/prism/node.rb#5188 - def operator_loc; end - - # attr_reader parameters: ParametersNode? - # - # source://prism//lib/prism/node.rb#5172 - def parameters; end - - # attr_reader receiver: Prism::node? - # - # source://prism//lib/prism/node.rb#5169 - def receiver; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#5268 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#5214 - def rparen_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#5288 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#5293 - def type; end - end -end - -# Represents the use of the `defined?` keyword. -# -# defined?(a) -# ^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5321 -class Prism::DefinedNode < ::Prism::Node - # Initialize a new DefinedNode node. - # - # @return [DefinedNode] a new instance of DefinedNode - # - # source://prism//lib/prism/node.rb#5323 - def initialize(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc); 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#5435 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5335 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5340 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5350 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5345 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode - # - # source://prism//lib/prism/node.rb#5355 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5340 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#5363 - 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#5419 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#5414 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5397 - def keyword_loc; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#5404 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#5368 - def lparen_loc; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#5409 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#5384 - def rparen_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#5424 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#5381 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#5429 - def type; end - end -end - -# source://prism//lib/prism/desugar_compiler.rb#4 -class Prism::DesugarAndWriteNode - include ::Prism::DSL - - # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#9 - def initialize(node, default_source, read_class, write_class, **arguments); end - - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#7 - def arguments; end - - # Desugar `x &&= y` to `x && x = y` - # - # source://prism//lib/prism/desugar_compiler.rb#18 - def compile; end - - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#7 - def default_source; end - - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#7 - def node; end - - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#7 - def read_class; end - - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#7 - 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#255 -class Prism::DesugarCompiler < ::Prism::MutationCompiler - # @@foo &&= bar - # - # becomes - # - # @@foo && @@foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#261 - def visit_class_variable_and_write_node(node); end - - # @@foo += bar - # - # becomes - # - # @@foo = @@foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#279 - def visit_class_variable_operator_write_node(node); end - - # @@foo ||= bar - # - # becomes - # - # defined?(@@foo) ? @@foo : @@foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#270 - def visit_class_variable_or_write_node(node); end - - # Foo &&= bar - # - # becomes - # - # Foo && Foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#288 - def visit_constant_and_write_node(node); end - - # Foo += bar - # - # becomes - # - # Foo = Foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#306 - def visit_constant_operator_write_node(node); end - - # Foo ||= bar - # - # becomes - # - # defined?(Foo) ? Foo : Foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#297 - def visit_constant_or_write_node(node); end - - # $foo &&= bar - # - # becomes - # - # $foo && $foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#315 - def visit_global_variable_and_write_node(node); end - - # $foo += bar - # - # becomes - # - # $foo = $foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#333 - def visit_global_variable_operator_write_node(node); end - - # $foo ||= bar - # - # becomes - # - # defined?($foo) ? $foo : $foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#324 - def visit_global_variable_or_write_node(node); end - - # becomes - # - # source://prism//lib/prism/desugar_compiler.rb#342 - def visit_instance_variable_and_write_node(node); end - - # becomes - # - # source://prism//lib/prism/desugar_compiler.rb#360 - def visit_instance_variable_operator_write_node(node); end - - # becomes - # - # source://prism//lib/prism/desugar_compiler.rb#351 - def visit_instance_variable_or_write_node(node); end - - # foo &&= bar - # - # becomes - # - # foo && foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#369 - def visit_local_variable_and_write_node(node); end - - # foo += bar - # - # becomes - # - # foo = foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#387 - def visit_local_variable_operator_write_node(node); end - - # foo ||= bar - # - # becomes - # - # foo || foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#378 - def visit_local_variable_or_write_node(node); end -end - -# source://prism//lib/prism/desugar_compiler.rb#86 -class Prism::DesugarOperatorWriteNode - include ::Prism::DSL - - # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#91 - def initialize(node, default_source, read_class, write_class, **arguments); end - - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#89 - def arguments; end - - # Desugar `x += y` to `x = x + y` - # - # source://prism//lib/prism/desugar_compiler.rb#100 - def compile; end - - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#89 - def default_source; end - - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#89 - def node; end - - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#89 - def read_class; end - - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#89 - def write_class; end -end - -# source://prism//lib/prism/desugar_compiler.rb#35 -class Prism::DesugarOrWriteDefinedNode - include ::Prism::DSL - - # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode - # - # source://prism//lib/prism/desugar_compiler.rb#40 - def initialize(node, default_source, read_class, write_class, **arguments); end - - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#38 - def arguments; end - - # Desugar `x ||= y` to `defined?(x) ? x : x = y` - # - # source://prism//lib/prism/desugar_compiler.rb#49 - def compile; end - - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#38 - def default_source; end - - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#38 - def node; end - - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#38 - def read_class; end - - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#38 - def write_class; end -end - -# source://prism//lib/prism/desugar_compiler.rb#130 -class Prism::DesugarOrWriteNode - include ::Prism::DSL - - # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode - # - # source://prism//lib/prism/desugar_compiler.rb#135 - def initialize(node, default_source, read_class, write_class, **arguments); end - - # Returns the value of attribute arguments. - # - # source://prism//lib/prism/desugar_compiler.rb#133 - def arguments; end - - # Desugar `x ||= y` to `x || x = y` - # - # source://prism//lib/prism/desugar_compiler.rb#144 - def compile; end - - # Returns the value of attribute default_source. - # - # source://prism//lib/prism/desugar_compiler.rb#133 - def default_source; end - - # Returns the value of attribute node. - # - # source://prism//lib/prism/desugar_compiler.rb#133 - def node; end - - # Returns the value of attribute read_class. - # - # source://prism//lib/prism/desugar_compiler.rb#133 - def read_class; end - - # Returns the value of attribute write_class. - # - # source://prism//lib/prism/desugar_compiler.rb#133 - 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 -# -# listener = OctalListener.new -# dispatcher = Prism::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#42 -class Prism::Dispatcher < ::Prism::Visitor - # Initialize a new dispatcher. - # - # @return [Dispatcher] a new instance of Dispatcher - # - # source://prism//lib/prism/dispatcher.rb#47 - 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#66 - def dispatch_once(node); end - - # attr_reader listeners: Hash[Symbol, Array[Listener]] - # - # source://prism//lib/prism/dispatcher.rb#44 - def listeners; end - - # Register a listener for one or more events. - # - # def register: (Listener, *Symbol) -> void - # - # source://prism//lib/prism/dispatcher.rb#54 - def register(listener, *events); end - - # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#72 - 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#80 - 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#88 - 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#96 - 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#104 - 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#112 - 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#120 - 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#128 - 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#136 - 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#144 - 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#152 - 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#160 - 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#168 - 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#176 - 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#184 - 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#192 - 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#200 - 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#208 - 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#216 - 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#224 - 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#232 - 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#240 - 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#248 - 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#256 - 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#264 - 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#272 - 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#280 - 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#288 - 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#296 - 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#304 - 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#312 - 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#320 - 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#328 - 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#336 - 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#344 - 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#352 - 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#360 - 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#368 - 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#376 - 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#384 - 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#392 - 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#400 - 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#408 - 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#416 - 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#424 - 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#432 - 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#440 - 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#448 - 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#456 - 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#464 - 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#472 - 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#480 - 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#488 - 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#496 - 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#504 - 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#512 - 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#520 - 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#528 - 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#536 - 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#544 - 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#552 - 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#560 - 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#568 - 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#576 - 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#584 - 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#592 - 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#600 - 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#608 - 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#616 - 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#624 - 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#632 - 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#640 - 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#648 - 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#656 - 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#664 - 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#672 - 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#680 - 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#688 - 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#696 - 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#704 - 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#712 - 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#720 - 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#728 - 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#736 - 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#744 - 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#752 - 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#760 - def visit_interpolated_x_string_node(node); end - - # Dispatch enter and leave events for ItLocalVariableReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#768 - def visit_it_local_variable_read_node(node); end - - # Dispatch enter and leave events for ItParametersNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#776 - 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#784 - 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#792 - 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#800 - 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#808 - 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#816 - 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#824 - 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#832 - 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#840 - 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#848 - 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#856 - 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#864 - 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#872 - 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#880 - 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#888 - 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#896 - 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#904 - 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#912 - 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#920 - 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#928 - 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#936 - 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#944 - 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#952 - 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#960 - 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#968 - 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#976 - 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#984 - 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#992 - 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#1000 - 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#1008 - 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#1016 - 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#1024 - 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#1032 - 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#1040 - 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#1048 - 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#1056 - 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#1064 - 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#1072 - 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#1080 - 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#1088 - 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#1096 - 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#1104 - 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#1112 - 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#1120 - 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#1128 - 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#1136 - 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#1144 - 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#1152 - 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#1160 - 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#1168 - 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#1176 - 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#1184 - 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#1192 - 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#1200 - 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#1208 - 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#1216 - 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#1224 - 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#1232 - 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#1240 - 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#1248 - 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#1256 - 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#1264 - 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#1272 - def visit_yield_node(node); end -end - -# source://prism//lib/prism/dispatcher.rb#1278 -class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor - # @return [DispatchOnce] a new instance of DispatchOnce - # - # source://prism//lib/prism/dispatcher.rb#1281 - def initialize(listeners); end - - # Returns the value of attribute listeners. - # - # source://prism//lib/prism/dispatcher.rb#1279 - def listeners; end - - # Dispatch enter and leave events for AliasGlobalVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1286 - def visit_alias_global_variable_node(node); end - - # Dispatch enter and leave events for AliasMethodNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1292 - def visit_alias_method_node(node); end - - # Dispatch enter and leave events for AlternationPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1298 - def visit_alternation_pattern_node(node); end - - # Dispatch enter and leave events for AndNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1304 - def visit_and_node(node); end - - # Dispatch enter and leave events for ArgumentsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1310 - def visit_arguments_node(node); end - - # Dispatch enter and leave events for ArrayNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1316 - def visit_array_node(node); end - - # Dispatch enter and leave events for ArrayPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1322 - def visit_array_pattern_node(node); end - - # Dispatch enter and leave events for AssocNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1328 - def visit_assoc_node(node); end - - # Dispatch enter and leave events for AssocSplatNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1334 - def visit_assoc_splat_node(node); end - - # Dispatch enter and leave events for BackReferenceReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1340 - def visit_back_reference_read_node(node); end - - # Dispatch enter and leave events for BeginNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1346 - def visit_begin_node(node); end - - # Dispatch enter and leave events for BlockArgumentNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1352 - def visit_block_argument_node(node); end - - # Dispatch enter and leave events for BlockLocalVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1358 - def visit_block_local_variable_node(node); end - - # Dispatch enter and leave events for BlockNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1364 - def visit_block_node(node); end - - # Dispatch enter and leave events for BlockParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1370 - def visit_block_parameter_node(node); end - - # Dispatch enter and leave events for BlockParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1376 - def visit_block_parameters_node(node); end - - # Dispatch enter and leave events for BreakNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1382 - def visit_break_node(node); end - - # Dispatch enter and leave events for CallAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1388 - def visit_call_and_write_node(node); end - - # Dispatch enter and leave events for CallNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1394 - def visit_call_node(node); end - - # Dispatch enter and leave events for CallOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1400 - def visit_call_operator_write_node(node); end - - # Dispatch enter and leave events for CallOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1406 - def visit_call_or_write_node(node); end - - # Dispatch enter and leave events for CallTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1412 - def visit_call_target_node(node); end - - # Dispatch enter and leave events for CapturePatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1418 - def visit_capture_pattern_node(node); end - - # Dispatch enter and leave events for CaseMatchNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1424 - def visit_case_match_node(node); end - - # Dispatch enter and leave events for CaseNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1430 - def visit_case_node(node); end - - # Dispatch enter and leave events for ClassNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1436 - def visit_class_node(node); end - - # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1442 - def visit_class_variable_and_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1448 - def visit_class_variable_operator_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1454 - def visit_class_variable_or_write_node(node); end - - # Dispatch enter and leave events for ClassVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1460 - def visit_class_variable_read_node(node); end - - # Dispatch enter and leave events for ClassVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1466 - def visit_class_variable_target_node(node); end - - # Dispatch enter and leave events for ClassVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1472 - def visit_class_variable_write_node(node); end - - # Dispatch enter and leave events for ConstantAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1478 - def visit_constant_and_write_node(node); end - - # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1484 - def visit_constant_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1490 - def visit_constant_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1496 - def visit_constant_path_and_write_node(node); end - - # Dispatch enter and leave events for ConstantPathNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1502 - def visit_constant_path_node(node); end - - # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1508 - def visit_constant_path_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1514 - def visit_constant_path_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1520 - def visit_constant_path_target_node(node); end - - # Dispatch enter and leave events for ConstantPathWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1526 - def visit_constant_path_write_node(node); end - - # Dispatch enter and leave events for ConstantReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1532 - def visit_constant_read_node(node); end - - # Dispatch enter and leave events for ConstantTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1538 - def visit_constant_target_node(node); end - - # Dispatch enter and leave events for ConstantWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1544 - def visit_constant_write_node(node); end - - # Dispatch enter and leave events for DefNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1550 - def visit_def_node(node); end - - # Dispatch enter and leave events for DefinedNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1556 - def visit_defined_node(node); end - - # Dispatch enter and leave events for ElseNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1562 - def visit_else_node(node); end - - # Dispatch enter and leave events for EmbeddedStatementsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1568 - def visit_embedded_statements_node(node); end - - # Dispatch enter and leave events for EmbeddedVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1574 - def visit_embedded_variable_node(node); end - - # Dispatch enter and leave events for EnsureNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1580 - def visit_ensure_node(node); end - - # Dispatch enter and leave events for FalseNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1586 - def visit_false_node(node); end - - # Dispatch enter and leave events for FindPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1592 - def visit_find_pattern_node(node); end - - # Dispatch enter and leave events for FlipFlopNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1598 - def visit_flip_flop_node(node); end - - # Dispatch enter and leave events for FloatNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1604 - def visit_float_node(node); end - - # Dispatch enter and leave events for ForNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1610 - def visit_for_node(node); end - - # Dispatch enter and leave events for ForwardingArgumentsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1616 - def visit_forwarding_arguments_node(node); end - - # Dispatch enter and leave events for ForwardingParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1622 - def visit_forwarding_parameter_node(node); end - - # Dispatch enter and leave events for ForwardingSuperNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1628 - def visit_forwarding_super_node(node); end - - # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1634 - def visit_global_variable_and_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1640 - def visit_global_variable_operator_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1646 - def visit_global_variable_or_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1652 - def visit_global_variable_read_node(node); end - - # Dispatch enter and leave events for GlobalVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1658 - def visit_global_variable_target_node(node); end - - # Dispatch enter and leave events for GlobalVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1664 - def visit_global_variable_write_node(node); end - - # Dispatch enter and leave events for HashNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1670 - def visit_hash_node(node); end - - # Dispatch enter and leave events for HashPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1676 - def visit_hash_pattern_node(node); end - - # Dispatch enter and leave events for IfNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1682 - def visit_if_node(node); end - - # Dispatch enter and leave events for ImaginaryNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1688 - def visit_imaginary_node(node); end - - # Dispatch enter and leave events for ImplicitNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1694 - def visit_implicit_node(node); end - - # Dispatch enter and leave events for ImplicitRestNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1700 - def visit_implicit_rest_node(node); end - - # Dispatch enter and leave events for InNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1706 - def visit_in_node(node); end - - # Dispatch enter and leave events for IndexAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1712 - def visit_index_and_write_node(node); end - - # Dispatch enter and leave events for IndexOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1718 - def visit_index_operator_write_node(node); end - - # Dispatch enter and leave events for IndexOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1724 - def visit_index_or_write_node(node); end - - # Dispatch enter and leave events for IndexTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1730 - def visit_index_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1736 - def visit_instance_variable_and_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1742 - def visit_instance_variable_operator_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1748 - def visit_instance_variable_or_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1754 - def visit_instance_variable_read_node(node); end - - # Dispatch enter and leave events for InstanceVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1760 - def visit_instance_variable_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1766 - def visit_instance_variable_write_node(node); end - - # Dispatch enter and leave events for IntegerNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1772 - def visit_integer_node(node); end - - # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1778 - def visit_interpolated_match_last_line_node(node); end - - # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1784 - def visit_interpolated_regular_expression_node(node); end - - # Dispatch enter and leave events for InterpolatedStringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1790 - def visit_interpolated_string_node(node); end - - # Dispatch enter and leave events for InterpolatedSymbolNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1796 - def visit_interpolated_symbol_node(node); end - - # Dispatch enter and leave events for InterpolatedXStringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1802 - def visit_interpolated_x_string_node(node); end - - # Dispatch enter and leave events for ItLocalVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1808 - def visit_it_local_variable_read_node(node); end - - # Dispatch enter and leave events for ItParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1814 - def visit_it_parameters_node(node); end - - # Dispatch enter and leave events for KeywordHashNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1820 - def visit_keyword_hash_node(node); end - - # Dispatch enter and leave events for KeywordRestParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1826 - def visit_keyword_rest_parameter_node(node); end - - # Dispatch enter and leave events for LambdaNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1832 - def visit_lambda_node(node); end - - # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1838 - def visit_local_variable_and_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1844 - def visit_local_variable_operator_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1850 - def visit_local_variable_or_write_node(node); end - - # Dispatch enter and leave events for LocalVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1856 - def visit_local_variable_read_node(node); end - - # Dispatch enter and leave events for LocalVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1862 - def visit_local_variable_target_node(node); end - - # Dispatch enter and leave events for LocalVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1868 - def visit_local_variable_write_node(node); end - - # Dispatch enter and leave events for MatchLastLineNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1874 - def visit_match_last_line_node(node); end - - # Dispatch enter and leave events for MatchPredicateNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1880 - def visit_match_predicate_node(node); end - - # Dispatch enter and leave events for MatchRequiredNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1886 - def visit_match_required_node(node); end - - # Dispatch enter and leave events for MatchWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1892 - def visit_match_write_node(node); end - - # Dispatch enter and leave events for MissingNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1898 - def visit_missing_node(node); end - - # Dispatch enter and leave events for ModuleNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1904 - def visit_module_node(node); end - - # Dispatch enter and leave events for MultiTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1910 - def visit_multi_target_node(node); end - - # Dispatch enter and leave events for MultiWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1916 - def visit_multi_write_node(node); end - - # Dispatch enter and leave events for NextNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1922 - def visit_next_node(node); end - - # Dispatch enter and leave events for NilNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1928 - def visit_nil_node(node); end - - # Dispatch enter and leave events for NoKeywordsParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1934 - def visit_no_keywords_parameter_node(node); end - - # Dispatch enter and leave events for NumberedParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1940 - def visit_numbered_parameters_node(node); end - - # Dispatch enter and leave events for NumberedReferenceReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1946 - def visit_numbered_reference_read_node(node); end - - # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1952 - def visit_optional_keyword_parameter_node(node); end - - # Dispatch enter and leave events for OptionalParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1958 - def visit_optional_parameter_node(node); end - - # Dispatch enter and leave events for OrNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1964 - def visit_or_node(node); end - - # Dispatch enter and leave events for ParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1970 - def visit_parameters_node(node); end - - # Dispatch enter and leave events for ParenthesesNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1976 - def visit_parentheses_node(node); end - - # Dispatch enter and leave events for PinnedExpressionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1982 - def visit_pinned_expression_node(node); end - - # Dispatch enter and leave events for PinnedVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1988 - def visit_pinned_variable_node(node); end - - # Dispatch enter and leave events for PostExecutionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1994 - def visit_post_execution_node(node); end - - # Dispatch enter and leave events for PreExecutionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2000 - def visit_pre_execution_node(node); end - - # Dispatch enter and leave events for ProgramNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2006 - def visit_program_node(node); end - - # Dispatch enter and leave events for RangeNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2012 - def visit_range_node(node); end - - # Dispatch enter and leave events for RationalNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2018 - def visit_rational_node(node); end - - # Dispatch enter and leave events for RedoNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2024 - def visit_redo_node(node); end - - # Dispatch enter and leave events for RegularExpressionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2030 - def visit_regular_expression_node(node); end - - # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2036 - def visit_required_keyword_parameter_node(node); end - - # Dispatch enter and leave events for RequiredParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2042 - def visit_required_parameter_node(node); end - - # Dispatch enter and leave events for RescueModifierNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2048 - def visit_rescue_modifier_node(node); end - - # Dispatch enter and leave events for RescueNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2054 - def visit_rescue_node(node); end - - # Dispatch enter and leave events for RestParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2060 - def visit_rest_parameter_node(node); end - - # Dispatch enter and leave events for RetryNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2066 - def visit_retry_node(node); end - - # Dispatch enter and leave events for ReturnNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2072 - def visit_return_node(node); end - - # Dispatch enter and leave events for SelfNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2078 - def visit_self_node(node); end - - # Dispatch enter and leave events for ShareableConstantNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2084 - def visit_shareable_constant_node(node); end - - # Dispatch enter and leave events for SingletonClassNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2090 - def visit_singleton_class_node(node); end - - # Dispatch enter and leave events for SourceEncodingNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2096 - def visit_source_encoding_node(node); end - - # Dispatch enter and leave events for SourceFileNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2102 - def visit_source_file_node(node); end - - # Dispatch enter and leave events for SourceLineNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2108 - def visit_source_line_node(node); end - - # Dispatch enter and leave events for SplatNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2114 - def visit_splat_node(node); end - - # Dispatch enter and leave events for StatementsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2120 - def visit_statements_node(node); end - - # Dispatch enter and leave events for StringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2126 - def visit_string_node(node); end - - # Dispatch enter and leave events for SuperNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2132 - def visit_super_node(node); end - - # Dispatch enter and leave events for SymbolNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2138 - def visit_symbol_node(node); end - - # Dispatch enter and leave events for TrueNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2144 - def visit_true_node(node); end - - # Dispatch enter and leave events for UndefNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2150 - def visit_undef_node(node); end - - # Dispatch enter and leave events for UnlessNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2156 - def visit_unless_node(node); end - - # Dispatch enter and leave events for UntilNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2162 - def visit_until_node(node); end - - # Dispatch enter and leave events for WhenNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2168 - def visit_when_node(node); end - - # Dispatch enter and leave events for WhileNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2174 - def visit_while_node(node); end - - # Dispatch enter and leave events for XStringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2180 - def visit_x_string_node(node); end - - # Dispatch enter and leave events for YieldNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2186 - 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 ItLocalVariableReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2784 - def visit_it_local_variable_read_node(node); end - - # Visit a ItParametersNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2798 - def visit_it_parameters_node(node); end - - # Visit a KeywordHashNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2812 - def visit_keyword_hash_node(node); end - - # Visit a KeywordRestParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2842 - def visit_keyword_rest_parameter_node(node); end - - # Visit a LambdaNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2870 - def visit_lambda_node(node); end - - # Visit a LocalVariableAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2908 - def visit_local_variable_and_write_node(node); end - - # Visit a LocalVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2938 - def visit_local_variable_operator_write_node(node); end - - # Visit a LocalVariableOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2971 - def visit_local_variable_or_write_node(node); end - - # Visit a LocalVariableReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3001 - def visit_local_variable_read_node(node); end - - # Visit a LocalVariableTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3021 - def visit_local_variable_target_node(node); end - - # Visit a LocalVariableWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3041 - def visit_local_variable_write_node(node); end - - # Visit a MatchLastLineNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3071 - def visit_match_last_line_node(node); end - - # Visit a MatchPredicateNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3100 - def visit_match_predicate_node(node); end - - # Visit a MatchRequiredNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3125 - def visit_match_required_node(node); end - - # Visit a MatchWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3150 - def visit_match_write_node(node); end - - # Visit a MissingNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3181 - def visit_missing_node(node); end - - # Visit a ModuleNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3195 - def visit_module_node(node); end - - # Visit a MultiTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3231 - def visit_multi_target_node(node); end - - # Visit a MultiWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3287 - def visit_multi_write_node(node); end - - # Visit a NextNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3350 - def visit_next_node(node); end - - # Visit a NilNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3373 - def visit_nil_node(node); end - - # Visit a NoKeywordsParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3387 - def visit_no_keywords_parameter_node(node); end - - # Visit a NumberedParametersNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3407 - def visit_numbered_parameters_node(node); end - - # Visit a NumberedReferenceReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3424 - def visit_numbered_reference_read_node(node); end - - # Visit a OptionalKeywordParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3441 - def visit_optional_keyword_parameter_node(node); end - - # Visit a OptionalParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3468 - def visit_optional_parameter_node(node); end - - # Visit a OrNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3498 - def visit_or_node(node); end - - # Visit a ParametersNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3523 - def visit_parameters_node(node); end - - # Visit a ParenthesesNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3607 - def visit_parentheses_node(node); end - - # Visit a PinnedExpressionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3633 - def visit_pinned_expression_node(node); end - - # Visit a PinnedVariableNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3660 - def visit_pinned_variable_node(node); end - - # Visit a PostExecutionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3681 - def visit_post_execution_node(node); end - - # Visit a PreExecutionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3710 - def visit_pre_execution_node(node); end - - # Visit a ProgramNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3739 - def visit_program_node(node); end - - # Visit a RangeNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3760 - def visit_range_node(node); end - - # Visit a RationalNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3792 - def visit_rational_node(node); end - - # Visit a RedoNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3815 - def visit_redo_node(node); end - - # Visit a RegularExpressionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3829 - def visit_regular_expression_node(node); end - - # Visit a RequiredKeywordParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3858 - def visit_required_keyword_parameter_node(node); end - - # Visit a RequiredParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3881 - def visit_required_parameter_node(node); end - - # Visit a RescueModifierNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3901 - def visit_rescue_modifier_node(node); end - - # Visit a RescueNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3926 - def visit_rescue_node(node); end - - # Visit a RestParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3979 - def visit_rest_parameter_node(node); end - - # Visit a RetryNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4007 - def visit_retry_node(node); end - - # Visit a ReturnNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4021 - def visit_return_node(node); end - - # Visit a SelfNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4044 - def visit_self_node(node); end - - # Visit a ShareableConstantNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4058 - def visit_shareable_constant_node(node); end - - # Visit a SingletonClassNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4079 - def visit_singleton_class_node(node); end - - # Visit a SourceEncodingNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4115 - def visit_source_encoding_node(node); end - - # Visit a SourceFileNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4129 - def visit_source_file_node(node); end - - # Visit a SourceLineNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4149 - def visit_source_line_node(node); end - - # Visit a SplatNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4163 - def visit_splat_node(node); end - - # Visit a StatementsNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4186 - def visit_statements_node(node); end - - # Visit a StringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4213 - def visit_string_node(node); end - - # Visit a SuperNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4246 - def visit_super_node(node); end - - # Visit a SymbolNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4285 - def visit_symbol_node(node); end - - # Visit a TrueNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4320 - def visit_true_node(node); end - - # Visit a UndefNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4334 - def visit_undef_node(node); end - - # Visit a UnlessNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4364 - def visit_unless_node(node); end - - # Visit a UntilNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4407 - def visit_until_node(node); end - - # Visit a WhenNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4442 - def visit_when_node(node); end - - # Visit a WhileNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4483 - def visit_while_node(node); end - - # Visit a XStringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4518 - def visit_x_string_node(node); end - - # Visit a YieldNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4547 - 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#4593 - 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#4603 - 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#4611 - 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#4622 - 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#4631 - 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#4642 - 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#4651 - 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#4587 - 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#4659 - def loop_flags_inspect(node); end - - # Generate a unique node ID for a node throughout the digraph. - # - # source://prism//lib/prism/dot_visitor.rb#4582 - 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#4667 - 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#4675 - 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#4683 - def regular_expression_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#4701 - 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#4711 - 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#4722 - 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#5448 -class Prism::ElseNode < ::Prism::Node - # Initialize a new ElseNode node. - # - # @return [ElseNode] a new instance of ElseNode - # - # source://prism//lib/prism/node.rb#5450 - def initialize(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc); 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#5545 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5461 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5466 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5478 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5471 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode - # - # source://prism//lib/prism/node.rb#5483 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5466 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } - # - # source://prism//lib/prism/node.rb#5491 - def deconstruct_keys(keys); end - - # def else_keyword: () -> String - # - # source://prism//lib/prism/node.rb#5519 - def else_keyword; end - - # attr_reader else_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5496 - def else_keyword_loc; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#5524 - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#5506 - 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#5529 - sig { override.returns(String) } - def inspect; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#5503 - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#5534 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#5539 - def type; end - end -end - -# EmbDocComment objects correspond to comments that are surrounded by =begin -# and =end. -# -# source://prism//lib/prism/parse_result.rb#412 -class Prism::EmbDocComment < ::Prism::Comment - # Returns a string representation of this comment. - # - # source://prism//lib/prism/parse_result.rb#419 - sig { returns(String) } - def inspect; end - - # This can only be true for inline comments. - # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#414 - sig { override.returns(T::Boolean) } - def trailing?; end -end - -# Represents an interpolated set of statements. -# -# "foo #{bar}" -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#5557 -class Prism::EmbeddedStatementsNode < ::Prism::Node - # Initialize a new EmbeddedStatementsNode node. - # - # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode - # - # source://prism//lib/prism/node.rb#5559 - def initialize(source, node_id, location, flags, opening_loc, statements, closing_loc); 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#5648 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5570 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5575 - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#5627 - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#5615 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5587 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5580 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode - # - # source://prism//lib/prism/node.rb#5592 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5575 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } - # - # source://prism//lib/prism/node.rb#5600 - 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#5632 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#5622 - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#5605 - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#5612 - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#5637 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#5642 - def type; end - end -end - -# Represents an interpolated variable. -# -# "foo #@bar" -# ^^^^^ -# -# source://prism//lib/prism/node.rb#5660 -class Prism::EmbeddedVariableNode < ::Prism::Node - # Initialize a new EmbeddedVariableNode node. - # - # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode - # - # source://prism//lib/prism/node.rb#5662 - def initialize(source, node_id, location, flags, operator_loc, variable); 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#5736 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5672 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5677 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5687 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5682 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: Prism::node) -> EmbeddedVariableNode - # - # source://prism//lib/prism/node.rb#5692 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5677 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: Prism::node } - # - # source://prism//lib/prism/node.rb#5700 - 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#5720 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#5715 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#5705 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#5725 - sig { override.returns(Symbol) } - def type; end - - # attr_reader variable: Prism::node - # - # source://prism//lib/prism/node.rb#5712 - def variable; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#5730 - def type; end - end -end - -# Flags for nodes that have unescaped content. -# -# source://prism//lib/prism/node.rb#16680 -module Prism::EncodingFlags; end - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#16685 -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#16682 -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#5751 -class Prism::EnsureNode < ::Prism::Node - # Initialize a new EnsureNode node. - # - # @return [EnsureNode] a new instance of EnsureNode - # - # source://prism//lib/prism/node.rb#5753 - def initialize(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc); 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#5842 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5764 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5769 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5781 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5774 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode - # - # source://prism//lib/prism/node.rb#5786 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5769 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#5794 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#5821 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5809 - def end_keyword_loc; end - - # def ensure_keyword: () -> String - # - # source://prism//lib/prism/node.rb#5816 - def ensure_keyword; end - - # attr_reader ensure_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5799 - 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#5826 - sig { override.returns(String) } - def inspect; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#5806 - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#5831 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#5836 - def type; end - end -end - -# Represents the use of the literal `false` keyword. -# -# false -# ^^^^^ -# -# source://prism//lib/prism/node.rb#5854 -class Prism::FalseNode < ::Prism::Node - # Initialize a new FalseNode node. - # - # @return [FalseNode] a new instance of FalseNode - # - # source://prism//lib/prism/node.rb#5856 - def initialize(source, node_id, location, flags); 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#5913 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5864 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5869 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5879 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5874 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode - # - # source://prism//lib/prism/node.rb#5884 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5869 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#5892 - 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#5897 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#5902 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#5907 - 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#5928 -class Prism::FindPatternNode < ::Prism::Node - # Initialize a new FindPatternNode node. - # - # @return [FindPatternNode] a new instance of FindPatternNode - # - # source://prism//lib/prism/node.rb#5930 - def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc); 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#6046 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5944 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5949 - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#6025 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#6007 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5964 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5954 - def compact_child_nodes; end - - # attr_reader constant: Prism::node? - # - # source://prism//lib/prism/node.rb#5982 - def constant; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: Prism::node?, ?left: Prism::node, ?requireds: Array[Prism::node], ?right: Prism::node, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode - # - # source://prism//lib/prism/node.rb#5969 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5949 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::node, opening_loc: Location?, closing_loc: Location? } - # - # source://prism//lib/prism/node.rb#5977 - 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#6030 - sig { override.returns(String) } - def inspect; end - - # attr_reader left: Prism::node - # - # source://prism//lib/prism/node.rb#5985 - def left; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#6020 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#5994 - def opening_loc; end - - # attr_reader requireds: Array[Prism::node] - # - # source://prism//lib/prism/node.rb#5988 - def requireds; end - - # attr_reader right: Prism::node - # - # source://prism//lib/prism/node.rb#5991 - def right; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6035 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6040 - 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#6062 -class Prism::FlipFlopNode < ::Prism::Node - # Initialize a new FlipFlopNode node. - # - # @return [FlipFlopNode] a new instance of FlipFlopNode - # - # source://prism//lib/prism/node.rb#6064 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - left: T.nilable(Prism::Node), - right: T.nilable(Prism::Node), - operator_loc: Prism::Location - ).void - end - def initialize(source, node_id, location, flags, left, right, operator_loc); 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#6150 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6075 - 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#6080 - 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#6093 - 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#6085 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> FlipFlopNode - # - # source://prism//lib/prism/node.rb#6098 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - left: T.nilable(Prism::Node), - right: T.nilable(Prism::Node), - operator_loc: Prism::Location - ).returns(Prism::FlipFlopNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6080 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#6106 - 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#6111 - 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#6134 - sig { override.returns(String) } - def inspect; end - - # attr_reader left: Prism::node? - # - # source://prism//lib/prism/node.rb#6116 - sig { returns(T.nilable(Prism::Node)) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#6129 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#6122 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader right: Prism::node? - # - # source://prism//lib/prism/node.rb#6119 - sig { returns(T.nilable(Prism::Node)) } - def right; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6139 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6144 - def type; end - end -end - -# Represents a floating point number literal. -# -# 1.0 -# ^^^ -# -# source://prism//lib/prism/node.rb#6163 -class Prism::FloatNode < ::Prism::Node - # Initialize a new FloatNode node. - # - # @return [FloatNode] a new instance of FloatNode - # - # source://prism//lib/prism/node.rb#6165 - def initialize(source, node_id, location, flags, value); 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#6226 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6174 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6179 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6189 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6184 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode - # - # source://prism//lib/prism/node.rb#6194 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6179 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } - # - # source://prism//lib/prism/node.rb#6202 - 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#6210 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6215 - sig { override.returns(Symbol) } - def type; end - - # The value of the floating point number as a Float. - # - # source://prism//lib/prism/node.rb#6207 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6220 - def type; end - end -end - -# Represents the use of the `for` keyword. -# -# for i in a end -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#6236 -class Prism::ForNode < ::Prism::Node - # Initialize a new ForNode node. - # - # @return [ForNode] a new instance of ForNode - # - # source://prism//lib/prism/node.rb#6238 - def initialize(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc); 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#6392 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6253 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6258 - def child_nodes; end - - # The collection to iterate over. - # - # for i in a end - # ^ - # - # source://prism//lib/prism/node.rb#6299 - def collection; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6272 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6263 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: Prism::node, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode - # - # source://prism//lib/prism/node.rb#6277 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6258 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: Prism::node, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#6285 - def deconstruct_keys(keys); end - - # def do_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#6366 - def do_keyword; end - - # The location of the `do` keyword, if present. - # - # for i in a do end - # ^^ - # - # source://prism//lib/prism/node.rb#6333 - def do_keyword_loc; end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#6371 - def end_keyword; end - - # The location of the `end` keyword. - # - # for i in a end - # ^^^ - # - # source://prism//lib/prism/node.rb#6349 - 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#6356 - def for_keyword; end - - # The location of the `for` keyword. - # - # for i in a end - # ^^^ - # - # source://prism//lib/prism/node.rb#6313 - def for_keyword_loc; end - - # def in_keyword: () -> String - # - # source://prism//lib/prism/node.rb#6361 - def in_keyword; end - - # The location of the `in` keyword. - # - # for i in a end - # ^^ - # - # source://prism//lib/prism/node.rb#6323 - def in_keyword_loc; end - - # The index expression for `for` loops. - # - # for i in a end - # ^ - # - # source://prism//lib/prism/node.rb#6293 - def index; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#6376 - sig { override.returns(String) } - def inspect; end - - # Represents the body of statements to execute for each iteration of the loop. - # - # for i in a - # foo(i) - # ^^^^^^ - # end - # - # source://prism//lib/prism/node.rb#6307 - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6381 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6386 - 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#6410 -class Prism::ForwardingArgumentsNode < ::Prism::Node - # Initialize a new ForwardingArgumentsNode node. - # - # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode - # - # source://prism//lib/prism/node.rb#6412 - def initialize(source, node_id, location, flags); 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#6420 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6425 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6435 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6430 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode - # - # source://prism//lib/prism/node.rb#6440 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6425 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#6448 - 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#6453 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6458 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6463 - 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#6479 -class Prism::ForwardingParameterNode < ::Prism::Node - # Initialize a new ForwardingParameterNode node. - # - # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode - # - # source://prism//lib/prism/node.rb#6481 - def initialize(source, node_id, location, flags); 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#6538 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6489 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6494 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6504 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6499 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode - # - # source://prism//lib/prism/node.rb#6509 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6494 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#6517 - 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#6522 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6527 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6532 - def type; end - end -end - -# Represents the use of the `super` keyword without parentheses or arguments. -# -# super -# ^^^^^ -# -# source://prism//lib/prism/node.rb#6547 -class Prism::ForwardingSuperNode < ::Prism::Node - # Initialize a new ForwardingSuperNode node. - # - # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode - # - # source://prism//lib/prism/node.rb#6549 - def initialize(source, node_id, location, flags, block); 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#6612 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6558 - def accept(visitor); end - - # attr_reader block: BlockNode? - # - # source://prism//lib/prism/node.rb#6593 - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6563 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6575 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6568 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode - # - # source://prism//lib/prism/node.rb#6580 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6563 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } - # - # source://prism//lib/prism/node.rb#6588 - 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#6596 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6601 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6606 - 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#6622 -class Prism::GlobalVariableAndWriteNode < ::Prism::Node - # Initialize a new GlobalVariableAndWriteNode node. - # - # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#6624 - def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); 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#6710 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6636 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6641 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6651 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6646 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#6656 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6641 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#6664 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#200 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#6694 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#6669 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#6672 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#6689 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#6679 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6699 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#6686 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6704 - 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#6723 -class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node - # Initialize a new GlobalVariableOperatorWriteNode node. - # - # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#6725 - def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); 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#6810 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6738 - def accept(visitor); end - - # attr_reader binary_operator: Symbol - # - # source://prism//lib/prism/node.rb#6791 - def binary_operator; end - - # attr_reader binary_operator_loc: Location - # - # source://prism//lib/prism/node.rb#6781 - def binary_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6743 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6753 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6748 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#6758 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6743 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } - # - # source://prism//lib/prism/node.rb#6766 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#212 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#6794 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#6771 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#6774 - 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 - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6799 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#6788 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6804 - 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#6824 -class Prism::GlobalVariableOrWriteNode < ::Prism::Node - # Initialize a new GlobalVariableOrWriteNode node. - # - # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#6826 - def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); 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#6912 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6838 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6843 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6853 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6848 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#6858 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6843 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#6866 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#206 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#6896 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#6871 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#6874 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#6891 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#6881 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6901 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#6888 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6906 - def type; end - end -end - -# Represents referencing a global variable. -# -# $foo -# ^^^^ -# -# source://prism//lib/prism/node.rb#6925 -class Prism::GlobalVariableReadNode < ::Prism::Node - # Initialize a new GlobalVariableReadNode node. - # - # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode - # - # source://prism//lib/prism/node.rb#6927 - def initialize(source, node_id, location, flags, name); 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#6992 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#6936 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6941 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6951 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6946 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode - # - # source://prism//lib/prism/node.rb#6956 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6941 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#6964 - 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#6976 - 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#6973 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#6981 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#6986 - 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#7002 -class Prism::GlobalVariableTargetNode < ::Prism::Node - # Initialize a new GlobalVariableTargetNode node. - # - # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode - # - # source://prism//lib/prism/node.rb#7004 - def initialize(source, node_id, location, flags, name); 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#7065 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7013 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7018 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7028 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7023 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode - # - # source://prism//lib/prism/node.rb#7033 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7018 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#7041 - 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#7049 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#7046 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#7054 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#7059 - def type; end - end -end - -# Represents writing to a global variable. -# -# $foo = 1 -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7075 -class Prism::GlobalVariableWriteNode < ::Prism::Node - # Initialize a new GlobalVariableWriteNode node. - # - # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode - # - # source://prism//lib/prism/node.rb#7077 - def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); 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#7179 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7089 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7094 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7104 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7099 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode - # - # source://prism//lib/prism/node.rb#7109 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7094 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#7117 - 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#7163 - 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#7126 - def name; end - - # The location of the global variable's name. - # - # $foo = :bar - # ^^^^ - # - # source://prism//lib/prism/node.rb#7132 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#7158 - def operator; end - - # The location of the `=` operator. - # - # $foo = :bar - # ^ - # - # source://prism//lib/prism/node.rb#7151 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#7168 - 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#7145 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#7173 - def type; end - end -end - -# Represents a hash literal. -# -# { a => b } -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7192 -class Prism::HashNode < ::Prism::Node - # Initialize a new HashNode node. - # - # @return [HashNode] a new instance of HashNode - # - # source://prism//lib/prism/node.rb#7194 - def initialize(source, node_id, location, flags, opening_loc, elements, closing_loc); 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#7293 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7205 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7210 - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#7272 - def closing; end - - # The location of the closing brace. - # - # { a => b } - # ^ - # - # source://prism//lib/prism/node.rb#7260 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7220 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7215 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode - # - # source://prism//lib/prism/node.rb#7225 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7210 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } - # - # source://prism//lib/prism/node.rb#7233 - 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#7254 - def elements; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#7277 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#7267 - def opening; end - - # The location of the opening brace. - # - # { a => b } - # ^ - # - # source://prism//lib/prism/node.rb#7241 - def opening_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#7282 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#7287 - 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#7309 -class Prism::HashPatternNode < ::Prism::Node - # Initialize a new HashPatternNode node. - # - # @return [HashPatternNode] a new instance of HashPatternNode - # - # source://prism//lib/prism/node.rb#7311 - def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc); 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#7422 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7324 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7329 - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#7401 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#7383 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7343 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7334 - def compact_child_nodes; end - - # attr_reader constant: Prism::node? - # - # source://prism//lib/prism/node.rb#7361 - def constant; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode - # - # source://prism//lib/prism/node.rb#7348 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7329 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } - # - # source://prism//lib/prism/node.rb#7356 - def deconstruct_keys(keys); end - - # attr_reader elements: Array[AssocNode] - # - # source://prism//lib/prism/node.rb#7364 - def elements; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#7406 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#7396 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#7370 - def opening_loc; end - - # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil - # - # source://prism//lib/prism/node.rb#7367 - def rest; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#7411 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#7416 - def type; end - end -end - -# source://prism//lib/prism/node_ext.rb#52 -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#54 - 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#7443 -class Prism::IfNode < ::Prism::Node - # Initialize a new IfNode node. - # - # @return [IfNode] a new instance of IfNode - # - # source://prism//lib/prism/node.rb#7445 - def initialize(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc); 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#7621 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7459 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7464 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7478 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7469 - def compact_child_nodes; end - - # Returns the subsequent if/elsif/else clause of the if node. This method is - # deprecated in favor of #subsequent. - # - # source://prism//lib/prism/node_ext.rb#485 - def consequent; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: ElseNode | IfNode | nil, ?end_keyword_loc: Location?) -> IfNode - # - # source://prism//lib/prism/node.rb#7483 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7464 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } - # - # source://prism//lib/prism/node.rb#7491 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#7600 - def end_keyword; end - - # The location of the `end` keyword if present, `nil` otherwise. - # - # if foo - # bar - # end - # ^^^ - # - # source://prism//lib/prism/node.rb#7577 - 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#7590 - 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#7501 - def if_keyword_loc; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#7605 - sig { override.returns(String) } - def inspect; end - - # source://prism//lib/prism/parse_result/newlines.rb#91 - def newline_flag!(lines); 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#7525 - def predicate; 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#7554 - def statements; 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#7569 - def subsequent; end - - # def then_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#7595 - 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#7534 - def then_keyword_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#7610 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#7615 - def type; end - end -end - -# Represents an imaginary number literal. -# -# 1.0i -# ^^^^ -# -# source://prism//lib/prism/node.rb#7636 -class Prism::ImaginaryNode < ::Prism::Node - # Initialize a new ImaginaryNode node. - # - # @return [ImaginaryNode] a new instance of ImaginaryNode - # - # source://prism//lib/prism/node.rb#7638 - def initialize(source, node_id, location, flags, numeric); 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#7699 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7647 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7652 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7662 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7657 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode - # - # source://prism//lib/prism/node.rb#7667 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7652 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } - # - # source://prism//lib/prism/node.rb#7675 - 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#7683 - sig { override.returns(String) } - def inspect; end - - # attr_reader numeric: FloatNode | IntegerNode | RationalNode - # - # source://prism//lib/prism/node.rb#7680 - def numeric; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#7688 - sig { override.returns(Symbol) } - def type; end - - # Returns the value of the node as a Ruby Complex. - # - # source://prism//lib/prism/node_ext.rb#107 - sig { returns(Complex) } - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#7693 - 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#7715 -class Prism::ImplicitNode < ::Prism::Node - # Initialize a new ImplicitNode node. - # - # @return [ImplicitNode] a new instance of ImplicitNode - # - # source://prism//lib/prism/node.rb#7717 - def initialize(source, node_id, location, flags, value); 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#7778 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7726 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7731 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7741 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7736 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node) -> ImplicitNode - # - # source://prism//lib/prism/node.rb#7746 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7731 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#7754 - 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#7762 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#7767 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#7759 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#7772 - 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#7797 -class Prism::ImplicitRestNode < ::Prism::Node - # Initialize a new ImplicitRestNode node. - # - # @return [ImplicitRestNode] a new instance of ImplicitRestNode - # - # source://prism//lib/prism/node.rb#7799 - def initialize(source, node_id, location, flags); 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#7856 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7807 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7812 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7822 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7817 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode - # - # source://prism//lib/prism/node.rb#7827 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7812 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#7835 - 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#7840 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#7845 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#7850 - 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#7865 -class Prism::InNode < ::Prism::Node - # Initialize a new InNode node. - # - # @return [InNode] a new instance of InNode - # - # source://prism//lib/prism/node.rb#7867 - def initialize(source, node_id, location, flags, pattern, statements, in_loc, then_loc); 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#7967 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7879 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7884 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7897 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7889 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode - # - # source://prism//lib/prism/node.rb#7902 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7884 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } - # - # source://prism//lib/prism/node.rb#7910 - 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#7941 - def in; end - - # attr_reader in_loc: Location - # - # source://prism//lib/prism/node.rb#7921 - def in_loc; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#7951 - sig { override.returns(String) } - def inspect; end - - # attr_reader pattern: Prism::node - # - # source://prism//lib/prism/node.rb#7915 - def pattern; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#7918 - def statements; end - - # def then: () -> String? - # - # source://prism//lib/prism/node.rb#7946 - def then; end - - # attr_reader then_loc: Location? - # - # source://prism//lib/prism/node.rb#7928 - def then_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#7956 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#7961 - 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#7980 -class Prism::IndexAndWriteNode < ::Prism::Node - # Initialize a new IndexAndWriteNode node. - # - # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode - # - # source://prism//lib/prism/node.rb#7982 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).void - end - def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); 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#8138 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#7998 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#8079 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8046 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Prism::node? - # - # source://prism//lib/prism/node.rb#8089 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#8102 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#8059 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8003 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#8112 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#8082 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8018 - 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#8008 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?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) -> IndexAndWriteNode - # - # source://prism//lib/prism/node.rb#8023 - sig do - params( - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::IndexAndWriteNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8003 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#8031 - 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#8051 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#8122 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#8107 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#8072 - sig { returns(Prism::Location) } - def opening_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#8117 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#8092 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader receiver: Prism::node? - # - # source://prism//lib/prism/node.rb#8056 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8036 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#8127 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#8099 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8041 - sig { returns(T::Boolean) } - def variable_call?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#8132 - 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#8156 -class Prism::IndexOperatorWriteNode < ::Prism::Node - # Initialize a new IndexOperatorWriteNode node. - # - # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode - # - # source://prism//lib/prism/node.rb#8158 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).void - end - def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value); 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#8313 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8175 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#8256 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8223 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader binary_operator: Symbol - # - # source://prism//lib/prism/node.rb#8269 - sig { returns(Symbol) } - def binary_operator; end - - # attr_reader binary_operator_loc: Location - # - # source://prism//lib/prism/node.rb#8272 - sig { returns(Prism::Location) } - def binary_operator_loc; end - - # attr_reader block: Prism::node? - # - # source://prism//lib/prism/node.rb#8266 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#8282 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#8236 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8180 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#8292 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#8259 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8195 - 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#8185 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?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) -> IndexOperatorWriteNode - # - # source://prism//lib/prism/node.rb#8200 - sig do - params( - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::IndexOperatorWriteNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8180 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, 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 } - # - # source://prism//lib/prism/node.rb#8208 - 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#8228 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#8297 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#8287 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#8249 - 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#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 - - # attr_reader receiver: Prism::node? - # - # source://prism//lib/prism/node.rb#8233 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8213 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#8302 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#8279 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8218 - sig { returns(T::Boolean) } - def variable_call?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#8307 - 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#8332 -class Prism::IndexOrWriteNode < ::Prism::Node - # Initialize a new IndexOrWriteNode node. - # - # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode - # - # source://prism//lib/prism/node.rb#8334 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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 - ).void - end - def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value); 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#8490 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8350 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#8431 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8398 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Prism::node? - # - # source://prism//lib/prism/node.rb#8441 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#8454 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#8411 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8355 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#8464 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#8434 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8370 - 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#8360 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?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) -> IndexOrWriteNode - # - # source://prism//lib/prism/node.rb#8375 - sig do - params( - node_id: Integer, - location: Prism::Location, - 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 - ).returns(Prism::IndexOrWriteNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8355 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#8383 - 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#8403 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#8474 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#8459 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#8424 - sig { returns(Prism::Location) } - def opening_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#8469 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#8444 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader receiver: Prism::node? - # - # source://prism//lib/prism/node.rb#8408 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8388 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#8479 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#8451 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8393 - sig { returns(T::Boolean) } - def variable_call?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#8484 - 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#8516 -class Prism::IndexTargetNode < ::Prism::Node - # Initialize a new IndexTargetNode node. - # - # @return [IndexTargetNode] a new instance of IndexTargetNode - # - # source://prism//lib/prism/node.rb#8518 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - receiver: Prism::Node, - opening_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - closing_loc: Prism::Location, - block: T.nilable(Prism::Node) - ).void - end - def initialize(source, node_id, location, flags, receiver, opening_loc, arguments, closing_loc, block); 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#8637 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8531 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#8598 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8578 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Prism::node? - # - # source://prism//lib/prism/node.rb#8608 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8536 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#8616 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#8601 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8550 - 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#8541 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?) -> IndexTargetNode - # - # source://prism//lib/prism/node.rb#8555 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - receiver: Prism::Node, - opening_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - closing_loc: Prism::Location, - block: T.nilable(Prism::Node) - ).returns(Prism::IndexTargetNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8536 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node? } - # - # source://prism//lib/prism/node.rb#8563 - 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#8583 - sig { returns(T::Boolean) } - def ignore_visibility?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#8621 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#8611 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#8591 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader receiver: Prism::node - # - # source://prism//lib/prism/node.rb#8588 - sig { returns(Prism::Node) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8568 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#8626 - sig { override.returns(Symbol) } - def type; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8573 - sig { returns(T::Boolean) } - def variable_call?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#8631 - 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#397 -class Prism::InlineComment < ::Prism::Comment - # Returns a string representation of this comment. - # - # source://prism//lib/prism/parse_result.rb#405 - 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#400 - 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#89 - def visit_alias_method_node(node); end - - # Inspect a AlternationPatternNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#101 - def visit_alternation_pattern_node(node); end - - # Inspect a AndNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#113 - def visit_and_node(node); end - - # Inspect a ArgumentsNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#125 - def visit_arguments_node(node); end - - # Inspect a ArrayNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#141 - def visit_array_node(node); end - - # Inspect a ArrayPatternNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#159 - def visit_array_pattern_node(node); end - - # Inspect a AssocNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#198 - def visit_assoc_node(node); end - - # Inspect a AssocSplatNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#210 - def visit_assoc_splat_node(node); end - - # Inspect a BackReferenceReadNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#224 - def visit_back_reference_read_node(node); end - - # Inspect a BeginNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#232 - def visit_begin_node(node); end - - # Inspect a BlockArgumentNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#265 - def visit_block_argument_node(node); end - - # Inspect a BlockLocalVariableNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#279 - def visit_block_local_variable_node(node); end - - # Inspect a BlockNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#287 - def visit_block_node(node); end - - # Inspect a BlockParameterNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#309 - def visit_block_parameter_node(node); end - - # Inspect a BlockParametersNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#323 - def visit_block_parameters_node(node); end - - # Inspect a BreakNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#347 - def visit_break_node(node); end - - # Inspect a CallAndWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#361 - def visit_call_and_write_node(node); end - - # Inspect a CallNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#381 - def visit_call_node(node); end - - # Inspect a CallOperatorWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#411 - def visit_call_operator_write_node(node); end - - # Inspect a CallOrWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#432 - def visit_call_or_write_node(node); end - - # Inspect a CallTargetNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#452 - def visit_call_target_node(node); end - - # Inspect a CapturePatternNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#464 - def visit_capture_pattern_node(node); end - - # Inspect a CaseMatchNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#476 - def visit_case_match_node(node); end - - # Inspect a CaseNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#506 - def visit_case_node(node); end - - # Inspect a ClassNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#536 - def visit_class_node(node); end - - # Inspect a ClassVariableAndWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#562 - def visit_class_variable_and_write_node(node); end - - # Inspect a ClassVariableOperatorWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#574 - def visit_class_variable_operator_write_node(node); end - - # Inspect a ClassVariableOrWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#587 - def visit_class_variable_or_write_node(node); end - - # Inspect a ClassVariableReadNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#599 - def visit_class_variable_read_node(node); end - - # Inspect a ClassVariableTargetNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#607 - def visit_class_variable_target_node(node); end - - # Inspect a ClassVariableWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#615 - def visit_class_variable_write_node(node); end - - # Inspect a ConstantAndWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#627 - def visit_constant_and_write_node(node); end - - # Inspect a ConstantOperatorWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#639 - def visit_constant_operator_write_node(node); end - - # Inspect a ConstantOrWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#652 - def visit_constant_or_write_node(node); end - - # Inspect a ConstantPathAndWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#664 - def visit_constant_path_and_write_node(node); end - - # Inspect a ConstantPathNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#676 - def visit_constant_path_node(node); end - - # Inspect a ConstantPathOperatorWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#696 - def visit_constant_path_operator_write_node(node); end - - # Inspect a ConstantPathOrWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#709 - def visit_constant_path_or_write_node(node); end - - # Inspect a ConstantPathTargetNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#721 - def visit_constant_path_target_node(node); end - - # Inspect a ConstantPathWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#741 - def visit_constant_path_write_node(node); end - - # Inspect a ConstantReadNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#753 - def visit_constant_read_node(node); end - - # Inspect a ConstantTargetNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#761 - def visit_constant_target_node(node); end - - # Inspect a ConstantWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#769 - def visit_constant_write_node(node); end - - # Inspect a DefNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#781 - def visit_def_node(node); end - - # Inspect a DefinedNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#815 - def visit_defined_node(node); end - - # Inspect a ElseNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#827 - def visit_else_node(node); end - - # Inspect a EmbeddedStatementsNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#842 - def visit_embedded_statements_node(node); end - - # Inspect a EmbeddedVariableNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#857 - def visit_embedded_variable_node(node); end - - # Inspect a EnsureNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#867 - def visit_ensure_node(node); end - - # Inspect a FalseNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#882 - def visit_false_node(node); end - - # Inspect a FindPatternNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#889 - def visit_find_pattern_node(node); end - - # Inspect a FlipFlopNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#917 - def visit_flip_flop_node(node); end - - # Inspect a FloatNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#937 - def visit_float_node(node); end - - # Inspect a ForNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#945 - def visit_for_node(node); end - - # Inspect a ForwardingArgumentsNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#966 - def visit_forwarding_arguments_node(node); end - - # Inspect a ForwardingParameterNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#973 - def visit_forwarding_parameter_node(node); end - - # Inspect a ForwardingSuperNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#980 - def visit_forwarding_super_node(node); end - - # Inspect a GlobalVariableAndWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#993 - def visit_global_variable_and_write_node(node); end - - # Inspect a GlobalVariableOperatorWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1005 - def visit_global_variable_operator_write_node(node); end - - # Inspect a GlobalVariableOrWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1018 - def visit_global_variable_or_write_node(node); end - - # Inspect a GlobalVariableReadNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1030 - def visit_global_variable_read_node(node); end - - # Inspect a GlobalVariableTargetNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1038 - def visit_global_variable_target_node(node); end - - # Inspect a GlobalVariableWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1046 - def visit_global_variable_write_node(node); end - - # Inspect a HashNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1058 - def visit_hash_node(node); end - - # Inspect a HashPatternNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1076 - def visit_hash_pattern_node(node); end - - # Inspect a IfNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1106 - def visit_if_node(node); end - - # Inspect a ImaginaryNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1130 - def visit_imaginary_node(node); end - - # Inspect a ImplicitNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1139 - def visit_implicit_node(node); end - - # Inspect a ImplicitRestNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1148 - def visit_implicit_rest_node(node); end - - # Inspect a InNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1155 - def visit_in_node(node); end - - # Inspect a IndexAndWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1172 - def visit_index_and_write_node(node); end - - # Inspect a IndexOperatorWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1203 - def visit_index_operator_write_node(node); end - - # Inspect a IndexOrWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1235 - def visit_index_or_write_node(node); end - - # Inspect a IndexTargetNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1266 - def visit_index_target_node(node); end - - # Inspect a InstanceVariableAndWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1289 - def visit_instance_variable_and_write_node(node); end - - # Inspect a InstanceVariableOperatorWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1301 - def visit_instance_variable_operator_write_node(node); end - - # Inspect a InstanceVariableOrWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1314 - def visit_instance_variable_or_write_node(node); end - - # Inspect a InstanceVariableReadNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1326 - def visit_instance_variable_read_node(node); end - - # Inspect a InstanceVariableTargetNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1334 - def visit_instance_variable_target_node(node); end - - # Inspect a InstanceVariableWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1342 - def visit_instance_variable_write_node(node); end - - # Inspect a IntegerNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1354 - def visit_integer_node(node); end - - # Inspect a InterpolatedMatchLastLineNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1362 - def visit_interpolated_match_last_line_node(node); end - - # Inspect a InterpolatedRegularExpressionNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1380 - def visit_interpolated_regular_expression_node(node); end - - # Inspect a InterpolatedStringNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1398 - def visit_interpolated_string_node(node); end - - # Inspect a InterpolatedSymbolNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1416 - def visit_interpolated_symbol_node(node); end - - # Inspect a InterpolatedXStringNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1434 - def visit_interpolated_x_string_node(node); end - - # Inspect a ItLocalVariableReadNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1452 - def visit_it_local_variable_read_node(node); end - - # Inspect a ItParametersNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1459 - def visit_it_parameters_node(node); end - - # Inspect a KeywordHashNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1466 - def visit_keyword_hash_node(node); end - - # Inspect a KeywordRestParameterNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1482 - def visit_keyword_rest_parameter_node(node); end - - # Inspect a LambdaNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1496 - def visit_lambda_node(node); end - - # Inspect a LocalVariableAndWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1519 - def visit_local_variable_and_write_node(node); end - - # Inspect a LocalVariableOperatorWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1532 - def visit_local_variable_operator_write_node(node); end - - # Inspect a LocalVariableOrWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1546 - def visit_local_variable_or_write_node(node); end - - # Inspect a LocalVariableReadNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1559 - def visit_local_variable_read_node(node); end - - # Inspect a LocalVariableTargetNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1568 - def visit_local_variable_target_node(node); end - - # Inspect a LocalVariableWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1577 - def visit_local_variable_write_node(node); end - - # Inspect a MatchLastLineNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1590 - def visit_match_last_line_node(node); end - - # Inspect a MatchPredicateNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1601 - def visit_match_predicate_node(node); end - - # Inspect a MatchRequiredNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1613 - def visit_match_required_node(node); end - - # Inspect a MatchWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1625 - def visit_match_write_node(node); end - - # Inspect a MissingNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1643 - def visit_missing_node(node); end - - # Inspect a ModuleNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1650 - def visit_module_node(node); end - - # Inspect a MultiTargetNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1669 - def visit_multi_target_node(node); end - - # Inspect a MultiWriteNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1702 - def visit_multi_write_node(node); end - - # Inspect a NextNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1738 - def visit_next_node(node); end - - # Inspect a NilNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1752 - def visit_nil_node(node); end - - # Inspect a NoKeywordsParameterNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1759 - def visit_no_keywords_parameter_node(node); end - - # Inspect a NumberedParametersNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1768 - def visit_numbered_parameters_node(node); end - - # Inspect a NumberedReferenceReadNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1776 - def visit_numbered_reference_read_node(node); end - - # Inspect a OptionalKeywordParameterNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1784 - def visit_optional_keyword_parameter_node(node); end - - # Inspect a OptionalParameterNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1795 - def visit_optional_parameter_node(node); end - - # Inspect a OrNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1807 - def visit_or_node(node); end - - # Inspect a ParametersNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1819 - def visit_parameters_node(node); end - - # Inspect a ParenthesesNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1880 - def visit_parentheses_node(node); end - - # Inspect a PinnedExpressionNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1895 - def visit_pinned_expression_node(node); end - - # Inspect a PinnedVariableNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1907 - def visit_pinned_variable_node(node); end - - # Inspect a PostExecutionNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1917 - def visit_post_execution_node(node); end - - # Inspect a PreExecutionNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1933 - def visit_pre_execution_node(node); end - - # Inspect a ProgramNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1949 - def visit_program_node(node); end - - # Inspect a RangeNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1959 - def visit_range_node(node); end - - # Inspect a RationalNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1979 - def visit_rational_node(node); end - - # Inspect a RedoNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1988 - def visit_redo_node(node); end - - # Inspect a RegularExpressionNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#1995 - def visit_regular_expression_node(node); end - - # Inspect a RequiredKeywordParameterNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2006 - def visit_required_keyword_parameter_node(node); end - - # Inspect a RequiredParameterNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2015 - def visit_required_parameter_node(node); end - - # Inspect a RescueModifierNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2023 - def visit_rescue_modifier_node(node); end - - # Inspect a RescueNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2035 - def visit_rescue_node(node); end - - # Inspect a RestParameterNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2071 - def visit_rest_parameter_node(node); end - - # Inspect a RetryNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2085 - def visit_retry_node(node); end - - # Inspect a ReturnNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2092 - def visit_return_node(node); end - - # Inspect a SelfNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2106 - def visit_self_node(node); end - - # Inspect a ShareableConstantNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2113 - def visit_shareable_constant_node(node); end - - # Inspect a SingletonClassNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2122 - def visit_singleton_class_node(node); end - - # Inspect a SourceEncodingNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2141 - def visit_source_encoding_node(node); end - - # Inspect a SourceFileNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2148 - def visit_source_file_node(node); end - - # Inspect a SourceLineNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2156 - def visit_source_line_node(node); end - - # Inspect a SplatNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2163 - def visit_splat_node(node); end - - # Inspect a StatementsNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2177 - def visit_statements_node(node); end - - # Inspect a StringNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2193 - def visit_string_node(node); end - - # Inspect a SuperNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2204 - def visit_super_node(node); end - - # Inspect a SymbolNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2226 - def visit_symbol_node(node); end - - # Inspect a TrueNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2237 - def visit_true_node(node); end - - # Inspect a UndefNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2244 - def visit_undef_node(node); end - - # Inspect a UnlessNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2261 - def visit_unless_node(node); end - - # Inspect a UntilNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2285 - def visit_until_node(node); end - - # Inspect a WhenNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2302 - def visit_when_node(node); end - - # Inspect a WhileNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2326 - def visit_while_node(node); end - - # Inspect a XStringNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2343 - def visit_x_string_node(node); end - - # Inspect a YieldNode node. - # - # source://prism//lib/prism/inspect_visitor.rb#2354 - def visit_yield_node(node); end - - private - - # Compose a string representing the given inner location field. - # - # source://prism//lib/prism/inspect_visitor.rb#2378 - def inspect_location(location); end - - # Compose a header for the given node. - # - # source://prism//lib/prism/inspect_visitor.rb#2372 - 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#8652 -class Prism::InstanceVariableAndWriteNode < ::Prism::Node - # Initialize a new InstanceVariableAndWriteNode node. - # - # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#8654 - def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); 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#8740 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8666 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8671 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8681 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8676 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#8686 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8671 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#8694 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#218 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#8724 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#8699 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#8702 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#8719 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#8709 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#8729 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#8716 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#8734 - 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#8753 -class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node - # Initialize a new InstanceVariableOperatorWriteNode node. - # - # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#8755 - def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); 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#8840 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8768 - def accept(visitor); end - - # attr_reader binary_operator: Symbol - # - # source://prism//lib/prism/node.rb#8821 - def binary_operator; end - - # attr_reader binary_operator_loc: Location - # - # source://prism//lib/prism/node.rb#8811 - def binary_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8773 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8783 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8778 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#8788 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8773 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } - # - # source://prism//lib/prism/node.rb#8796 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#230 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#8824 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#8801 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#8804 - 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#435 - 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#442 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#8829 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#8818 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#8834 - 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#8854 -class Prism::InstanceVariableOrWriteNode < ::Prism::Node - # Initialize a new InstanceVariableOrWriteNode node. - # - # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#8856 - def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); 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#8868 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8873 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8883 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8878 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#8888 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8873 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#8896 - def deconstruct_keys(keys); end - - # source://prism//lib/prism/desugar_compiler.rb#224 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#8926 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#8901 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#8904 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#8921 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#8911 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#8931 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#8918 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#8936 - def type; end - end -end - -# Represents referencing an instance variable. -# -# @foo -# ^^^^ -# -# source://prism//lib/prism/node.rb#8955 -class Prism::InstanceVariableReadNode < ::Prism::Node - # Initialize a new InstanceVariableReadNode node. - # - # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode - # - # source://prism//lib/prism/node.rb#8957 - def initialize(source, node_id, location, flags, name); 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#9022 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#8966 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8971 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8981 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8976 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode - # - # source://prism//lib/prism/node.rb#8986 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8971 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#8994 - 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#9006 - 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#9003 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#9011 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#9016 - 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#9032 -class Prism::InstanceVariableTargetNode < ::Prism::Node - # Initialize a new InstanceVariableTargetNode node. - # - # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode - # - # source://prism//lib/prism/node.rb#9034 - def initialize(source, node_id, location, flags, name); 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#9095 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9043 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9048 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9058 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9053 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode - # - # source://prism//lib/prism/node.rb#9063 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9048 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#9071 - 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#9079 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#9076 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#9084 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#9089 - def type; end - end -end - -# Represents writing to an instance variable. -# -# @foo = 1 -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9105 -class Prism::InstanceVariableWriteNode < ::Prism::Node - # Initialize a new InstanceVariableWriteNode node. - # - # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode - # - # source://prism//lib/prism/node.rb#9107 - def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); 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#9209 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9119 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9124 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9134 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9129 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode - # - # source://prism//lib/prism/node.rb#9139 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9124 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#9147 - 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#9193 - 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#9156 - def name; end - - # The location of the variable name. - # - # @_x = 1 - # ^^^ - # - # source://prism//lib/prism/node.rb#9162 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#9188 - def operator; end - - # The location of the `=` operator. - # - # @x = y - # ^ - # - # source://prism//lib/prism/node.rb#9181 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#9198 - 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#9175 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#9203 - def type; end - end -end - -# Flags for integer nodes that correspond to the base of the integer. -# -# source://prism//lib/prism/node.rb#16689 -module Prism::IntegerBaseFlags; end - -# 0b prefix -# -# source://prism//lib/prism/node.rb#16691 -Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) - -# 0d or no prefix -# -# source://prism//lib/prism/node.rb#16694 -Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) - -# 0x prefix -# -# source://prism//lib/prism/node.rb#16700 -Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) - -# 0o or 0 prefix -# -# source://prism//lib/prism/node.rb#16697 -Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) - -# Represents an integer number literal. -# -# 1 -# ^ -# -# source://prism//lib/prism/node.rb#9222 -class Prism::IntegerNode < ::Prism::Node - # Initialize a new IntegerNode node. - # - # @return [IntegerNode] a new instance of IntegerNode - # - # source://prism//lib/prism/node.rb#9224 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - value: Integer - ).void - end - def initialize(source, node_id, location, flags, value); 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#9305 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9233 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # def binary?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9266 - sig { returns(T::Boolean) } - def binary?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9238 - 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#9248 - 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#9243 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode - # - # source://prism//lib/prism/node.rb#9253 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - value: Integer - ).returns(Prism::IntegerNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end - - # def decimal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9271 - sig { returns(T::Boolean) } - def decimal?; end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9238 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } - # - # source://prism//lib/prism/node.rb#9261 - 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#9281 - sig { returns(T::Boolean) } - def hexadecimal?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#9289 - sig { override.returns(String) } - def inspect; end - - # def octal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9276 - sig { returns(T::Boolean) } - def octal?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#9294 - sig { override.returns(Symbol) } - def type; end - - # The value of the integer literal as a number. - # - # source://prism//lib/prism/node.rb#9286 - sig { returns(Integer) } - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#9299 - 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#9316 -class Prism::InterpolatedMatchLastLineNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # Initialize a new InterpolatedMatchLastLineNode node. - # - # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode - # - # source://prism//lib/prism/node.rb#9318 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location - ).void - end - def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#9460 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9329 - 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#9387 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9334 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#9439 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#9427 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9344 - 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#9339 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedMatchLastLineNode - # - # source://prism//lib/prism/node.rb#9349 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location - ).returns(Prism::InterpolatedMatchLastLineNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9334 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } - # - # source://prism//lib/prism/node.rb#9357 - 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#9382 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9367 - 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#9407 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9412 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9402 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9362 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#9444 - sig { override.returns(String) } - def inspect; end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9372 - sig { returns(T::Boolean) } - def multi_line?; end - - # source://prism//lib/prism/parse_result/newlines.rb#121 - def newline_flag!(lines); end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9377 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#9434 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#9417 - 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#9424 - sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } - def parts; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#9449 - sig { override.returns(Symbol) } - def type; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9397 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9392 - sig { returns(T::Boolean) } - def windows_31j?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#9454 - def type; end - end -end - -# Represents a regular expression literal that contains interpolation. -# -# /foo #{bar} baz/ -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9474 -class Prism::InterpolatedRegularExpressionNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # Initialize a new InterpolatedRegularExpressionNode node. - # - # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode - # - # source://prism//lib/prism/node.rb#9476 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location - ).void - end - def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#9618 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9487 - 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#9545 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9492 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#9597 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#9585 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9502 - 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#9497 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedRegularExpressionNode - # - # source://prism//lib/prism/node.rb#9507 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location - ).returns(Prism::InterpolatedRegularExpressionNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9492 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } - # - # source://prism//lib/prism/node.rb#9515 - 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#9540 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9525 - 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#9565 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9570 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9560 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9520 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#9602 - sig { override.returns(String) } - def inspect; end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9530 - sig { returns(T::Boolean) } - def multi_line?; end - - # source://prism//lib/prism/parse_result/newlines.rb#128 - def newline_flag!(lines); end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9535 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#9592 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#9575 - 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#9582 - sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } - def parts; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#9607 - sig { override.returns(Symbol) } - def type; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9555 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9550 - sig { returns(T::Boolean) } - def windows_31j?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#9612 - def type; end - end -end - -# Represents a string literal that contains interpolation. -# -# "foo #{bar} baz" -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9632 -class Prism::InterpolatedStringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # Initialize a new InterpolatedStringNode node. - # - # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode - # - # source://prism//lib/prism/node.rb#9634 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - 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) - ).void - end - def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#9743 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9645 - 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#9650 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#9722 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#9704 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9660 - 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#9655 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?) -> InterpolatedStringNode - # - # source://prism//lib/prism/node.rb#9665 - sig do - params( - node_id: Integer, - location: Prism::Location, - 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) - ).returns(Prism::InterpolatedStringNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9650 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location? } - # - # source://prism//lib/prism/node.rb#9673 - 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#9678 - sig { returns(T::Boolean) } - def frozen?; end - - sig { returns(T::Boolean) } - def heredoc?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#9727 - sig { override.returns(String) } - def inspect; end - - # def mutable?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9683 - sig { returns(T::Boolean) } - def mutable?; end - - # source://prism//lib/prism/parse_result/newlines.rb#135 - def newline_flag!(lines); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#9717 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#9688 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] - # - # source://prism//lib/prism/node.rb#9701 - sig do - returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) - end - def parts; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#9732 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#9737 - 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#16704 -module Prism::InterpolatedStringNodeFlags; end - -# source://prism//lib/prism/node.rb#16706 -Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) - -# source://prism//lib/prism/node.rb#16709 -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#9757 -class Prism::InterpolatedSymbolNode < ::Prism::Node - # Initialize a new InterpolatedSymbolNode node. - # - # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode - # - # source://prism//lib/prism/node.rb#9759 - def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#9858 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9770 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9775 - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#9837 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#9819 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9785 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9780 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode - # - # source://prism//lib/prism/node.rb#9790 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9775 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } - # - # source://prism//lib/prism/node.rb#9798 - 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#9842 - sig { override.returns(String) } - def inspect; end - - # source://prism//lib/prism/parse_result/newlines.rb#142 - def newline_flag!(lines); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#9832 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#9803 - def opening_loc; end - - # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] - # - # source://prism//lib/prism/node.rb#9816 - def parts; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#9847 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#9852 - def type; end - end -end - -# Represents an xstring literal that contains interpolation. -# -# `foo #{bar} baz` -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9871 -class Prism::InterpolatedXStringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # Initialize a new InterpolatedXStringNode node. - # - # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode - # - # source://prism//lib/prism/node.rb#9873 - def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#9960 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9884 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9889 - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#9939 - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#9927 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9899 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9894 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode - # - # source://prism//lib/prism/node.rb#9904 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9889 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } - # - # source://prism//lib/prism/node.rb#9912 - 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#9944 - sig { override.returns(String) } - def inspect; end - - # source://prism//lib/prism/parse_result/newlines.rb#149 - def newline_flag!(lines); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#9934 - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#9917 - def opening_loc; end - - # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] - # - # source://prism//lib/prism/node.rb#9924 - def parts; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#9949 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#9954 - def type; end - end -end - -# Represents reading from the implicit `it` local variable. -# -# -> { it } -# ^^ -# -# source://prism//lib/prism/node.rb#9973 -class Prism::ItLocalVariableReadNode < ::Prism::Node - # Initialize a new ItLocalVariableReadNode node. - # - # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode - # - # source://prism//lib/prism/node.rb#9975 - def initialize(source, node_id, location, flags); 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#10032 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#9983 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9988 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9998 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9993 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode - # - # source://prism//lib/prism/node.rb#10003 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9988 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#10011 - 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#10016 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10021 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10026 - 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#10041 -class Prism::ItParametersNode < ::Prism::Node - # Initialize a new ItParametersNode node. - # - # @return [ItParametersNode] a new instance of ItParametersNode - # - # source://prism//lib/prism/node.rb#10043 - def initialize(source, node_id, location, flags); 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#10100 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10051 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10056 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10066 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10061 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode - # - # source://prism//lib/prism/node.rb#10071 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10056 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#10079 - 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#10084 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10089 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10094 - def type; end - end -end - -# Represents a hash literal without opening and closing braces. -# -# foo(a: b) -# ^^^^ -# -# source://prism//lib/prism/node.rb#10109 -class Prism::KeywordHashNode < ::Prism::Node - # Initialize a new KeywordHashNode node. - # - # @return [KeywordHashNode] a new instance of KeywordHashNode - # - # source://prism//lib/prism/node.rb#10111 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] - ).void - end - def initialize(source, node_id, location, flags, elements); 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#10177 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10120 - 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#10125 - 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#10135 - 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#10130 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode - # - # source://prism//lib/prism/node.rb#10140 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] - ).returns(Prism::KeywordHashNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10125 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } - # - # source://prism//lib/prism/node.rb#10148 - 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#10158 - 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#10161 - sig { override.returns(String) } - def inspect; end - - # def symbol_keys?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10153 - sig { returns(T::Boolean) } - def symbol_keys?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10166 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10171 - def type; end - end -end - -# Flags for keyword hash nodes. -# -# source://prism//lib/prism/node.rb#16713 -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#16715 -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#10190 -class Prism::KeywordRestParameterNode < ::Prism::Node - # Initialize a new KeywordRestParameterNode node. - # - # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode - # - # source://prism//lib/prism/node.rb#10192 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location - ).void - end - def initialize(source, node_id, location, flags, name, name_loc, operator_loc); 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#10285 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10203 - 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#10208 - 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#10218 - 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#10213 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode - # - # source://prism//lib/prism/node.rb#10223 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location - ).returns(Prism::KeywordRestParameterNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10208 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#10231 - 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#10269 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#10241 - sig { returns(T.nilable(Symbol)) } - def name; end - - # attr_reader name_loc: Location? - # - # source://prism//lib/prism/node.rb#10244 - sig { returns(T.nilable(Prism::Location)) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10264 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10257 - sig { returns(Prism::Location) } - def operator_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10236 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10274 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10279 - def type; end - end -end - -# Represents using a lambda literal (not the lambda method call). -# -# ->(value) { value * 2 } -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10298 -class Prism::LambdaNode < ::Prism::Node - # Initialize a new LambdaNode node. - # - # @return [LambdaNode] a new instance of LambdaNode - # - # source://prism//lib/prism/node.rb#10300 - def initialize(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body); 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#10411 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10314 - def accept(visitor); end - - # attr_reader body: Prism::node? - # - # source://prism//lib/prism/node.rb#10377 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10319 - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#10390 - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#10367 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10332 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10324 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: Prism::node?, ?body: Prism::node?) -> LambdaNode - # - # source://prism//lib/prism/node.rb#10337 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10319 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::node? } - # - # source://prism//lib/prism/node.rb#10345 - 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#10395 - sig { override.returns(String) } - def inspect; end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#10350 - def locals; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#10385 - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#10360 - def opening_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10380 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10353 - def operator_loc; end - - # attr_reader parameters: Prism::node? - # - # source://prism//lib/prism/node.rb#10374 - def parameters; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10400 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10405 - 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#627 -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#632 - 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#638 - 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#629 - 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#10427 -class Prism::LocalVariableAndWriteNode < ::Prism::Node - # Initialize a new LocalVariableAndWriteNode node. - # - # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#10429 - def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); 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#10519 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10442 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10447 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10457 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10452 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#10462 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10447 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } - # - # source://prism//lib/prism/node.rb#10470 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#10495 - def depth; end - - # source://prism//lib/prism/desugar_compiler.rb#236 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#10503 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10492 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10475 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10498 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10482 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10508 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#10489 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10513 - 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#10533 -class Prism::LocalVariableOperatorWriteNode < ::Prism::Node - # Initialize a new LocalVariableOperatorWriteNode node. - # - # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#10535 - def initialize(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth); 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#10624 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10549 - def accept(visitor); end - - # attr_reader binary_operator: Symbol - # - # source://prism//lib/prism/node.rb#10602 - def binary_operator; end - - # attr_reader binary_operator_loc: Location - # - # source://prism//lib/prism/node.rb#10589 - def binary_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10554 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10564 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10559 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#10569 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10554 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } - # - # source://prism//lib/prism/node.rb#10577 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#10605 - def depth; end - - # source://prism//lib/prism/desugar_compiler.rb#248 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#10608 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10599 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10582 - 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#451 - 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#458 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10613 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#10596 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10618 - 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#10639 -class Prism::LocalVariableOrWriteNode < ::Prism::Node - # Initialize a new LocalVariableOrWriteNode node. - # - # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#10641 - def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); 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#10731 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10654 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10659 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10669 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10664 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#10674 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10659 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } - # - # source://prism//lib/prism/node.rb#10682 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#10707 - def depth; end - - # source://prism//lib/prism/desugar_compiler.rb#242 - def desugar; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#10715 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10704 - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10687 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10710 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10694 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10720 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#10701 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10725 - 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#10745 -class Prism::LocalVariableReadNode < ::Prism::Node - # Initialize a new LocalVariableReadNode node. - # - # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode - # - # source://prism//lib/prism/node.rb#10747 - def initialize(source, node_id, location, flags, name, depth); 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#10826 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10757 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10762 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10772 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10767 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode - # - # source://prism//lib/prism/node.rb#10777 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10762 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } - # - # source://prism//lib/prism/node.rb#10785 - 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#10807 - def depth; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#10810 - 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` - # - # source://prism//lib/prism/node.rb#10798 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10815 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10820 - 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#10837 -class Prism::LocalVariableTargetNode < ::Prism::Node - # Initialize a new LocalVariableTargetNode node. - # - # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode - # - # source://prism//lib/prism/node.rb#10839 - def initialize(source, node_id, location, flags, name, depth); 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#10904 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10849 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10854 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10864 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10859 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode - # - # source://prism//lib/prism/node.rb#10869 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10854 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } - # - # source://prism//lib/prism/node.rb#10877 - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#10885 - def depth; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#10888 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10882 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#10893 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#10898 - def type; end - end -end - -# Represents writing to a local variable. -# -# foo = 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#10915 -class Prism::LocalVariableWriteNode < ::Prism::Node - # Initialize a new LocalVariableWriteNode node. - # - # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode - # - # source://prism//lib/prism/node.rb#10917 - def initialize(source, node_id, location, flags, name, depth, name_loc, value, operator_loc); 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#11033 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#10930 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10935 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10945 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10940 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode - # - # source://prism//lib/prism/node.rb#10950 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10935 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#10958 - 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#10976 - def depth; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#11017 - 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#10967 - def name; end - - # The location of the variable name. - # - # foo = :bar - # ^^^ - # - # source://prism//lib/prism/node.rb#10982 - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11012 - def operator; end - - # The location of the `=` operator. - # - # x = :y - # ^ - # - # source://prism//lib/prism/node.rb#11005 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#11022 - 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#10999 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#11027 - def type; end - end -end - -# This represents a location in the source. -# -# source://prism//lib/prism/parse_result.rb#165 -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#180 - 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#344 - 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#363 - 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#226 - 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#216 - 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#221 - 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#334 - 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#323 - 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#272 - 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#329 - 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#277 - 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#317 - sig { returns(Integer) } - def end_column; end - - # The line number where this location ends. - # - # source://prism//lib/prism/parse_result.rb#293 - 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#266 - sig { returns(Integer) } - def end_offset; end - - # Returns a string representation of this location. - # - # source://prism//lib/prism/parse_result.rb#231 - 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#353 - 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#199 - 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#194 - sig { returns(T::Array[Prism::Comment]) } - def leading_comments; end - - # The length of this location in bytes. - # - # source://prism//lib/prism/parse_result.rb#176 - sig { returns(Integer) } - def length; end - - # Implement the pretty print interface for Location. - # - # source://prism//lib/prism/parse_result.rb#339 - 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#241 - 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#248 - def slice_lines; end - - # Returns all of the lines of the source code associated with this location. - # - # source://prism//lib/prism/parse_result.rb#236 - 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#305 - 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#256 - 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#311 - 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#261 - 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#299 - sig { returns(Integer) } - def start_column; end - - # The line number where this location starts. - # - # source://prism//lib/prism/parse_result.rb#282 - 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#287 - 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#173 - sig { returns(Integer) } - def start_offset; end - - # Attach a comment to the trailing comments of this location. - # - # source://prism//lib/prism/parse_result.rb#210 - 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#205 - 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#168 - sig { returns(Prism::Source) } - def source; end -end - -# Flags for while and until loop nodes. -# -# source://prism//lib/prism/node.rb#16719 -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#16721 -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#425 -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#433 - 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#449 - 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#454 - 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#439 - 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#427 - 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#444 - 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#430 - 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#11047 -class Prism::MatchLastLineNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # Initialize a new MatchLastLineNode node. - # - # @return [MatchLastLineNode] a new instance of MatchLastLineNode - # - # source://prism//lib/prism/node.rb#11049 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String - ).void - end - def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); 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#11204 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11061 - 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#11119 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11066 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#11183 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#11163 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11076 - 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#11071 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#11178 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#11156 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode - # - # source://prism//lib/prism/node.rb#11081 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String - ).returns(Prism::MatchLastLineNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11066 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } - # - # source://prism//lib/prism/node.rb#11089 - 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#11114 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11099 - 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#11139 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11144 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11134 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11094 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#11188 - sig { override.returns(String) } - def inspect; end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11104 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11109 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#11173 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#11149 - sig { returns(Prism::Location) } - def opening_loc; end - - sig { returns(Integer) } - def options; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#11193 - sig { override.returns(Symbol) } - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#11170 - sig { returns(String) } - def unescaped; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11129 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11124 - sig { returns(T::Boolean) } - def windows_31j?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#11198 - def type; end - end -end - -# Represents the use of the modifier `in` operator. -# -# foo in bar -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11218 -class Prism::MatchPredicateNode < ::Prism::Node - # Initialize a new MatchPredicateNode node. - # - # @return [MatchPredicateNode] a new instance of MatchPredicateNode - # - # source://prism//lib/prism/node.rb#11220 - def initialize(source, node_id, location, flags, value, pattern, operator_loc); 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#11298 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11231 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11236 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11246 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11241 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode - # - # source://prism//lib/prism/node.rb#11251 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11236 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#11259 - 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#11282 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11277 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#11270 - def operator_loc; end - - # attr_reader pattern: Prism::node - # - # source://prism//lib/prism/node.rb#11267 - def pattern; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#11287 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#11264 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#11292 - def type; end - end -end - -# Represents the use of the `=>` operator. -# -# foo => bar -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11310 -class Prism::MatchRequiredNode < ::Prism::Node - # Initialize a new MatchRequiredNode node. - # - # @return [MatchRequiredNode] a new instance of MatchRequiredNode - # - # source://prism//lib/prism/node.rb#11312 - def initialize(source, node_id, location, flags, value, pattern, operator_loc); 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#11390 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11323 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11328 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11338 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11333 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode - # - # source://prism//lib/prism/node.rb#11343 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11328 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#11351 - 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#11374 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11369 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#11362 - def operator_loc; end - - # attr_reader pattern: Prism::node - # - # source://prism//lib/prism/node.rb#11359 - def pattern; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#11379 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#11356 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#11384 - def type; end - end -end - -# Represents writing local variables using a regular expression match with named capture groups. -# -# /(?<foo>bar)/ =~ baz -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11402 -class Prism::MatchWriteNode < ::Prism::Node - # Initialize a new MatchWriteNode node. - # - # @return [MatchWriteNode] a new instance of MatchWriteNode - # - # source://prism//lib/prism/node.rb#11404 - def initialize(source, node_id, location, flags, call, targets); 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#11469 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11414 - def accept(visitor); end - - # attr_reader call: CallNode - # - # source://prism//lib/prism/node.rb#11447 - def call; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11419 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11429 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11424 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode - # - # source://prism//lib/prism/node.rb#11434 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11419 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } - # - # source://prism//lib/prism/node.rb#11442 - 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#11453 - sig { override.returns(String) } - def inspect; end - - # attr_reader targets: Array[LocalVariableTargetNode] - # - # source://prism//lib/prism/node.rb#11450 - def targets; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#11458 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#11463 - 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#11478 -class Prism::MissingNode < ::Prism::Node - # Initialize a new MissingNode node. - # - # @return [MissingNode] a new instance of MissingNode - # - # source://prism//lib/prism/node.rb#11480 - def initialize(source, node_id, location, flags); 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#11537 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11488 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11493 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11503 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11498 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode - # - # source://prism//lib/prism/node.rb#11508 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11493 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#11516 - 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#11521 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#11526 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#11531 - def type; end - end -end - -# Represents a module declaration involving the `module` keyword. -# -# module Foo end -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11546 -class Prism::ModuleNode < ::Prism::Node - # Initialize a new ModuleNode node. - # - # @return [ModuleNode] a new instance of ModuleNode - # - # source://prism//lib/prism/node.rb#11548 - def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name); 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#11650 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11562 - def accept(visitor); end - - # attr_reader body: Prism::node? - # - # source://prism//lib/prism/node.rb#11611 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11567 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11580 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11572 - def compact_child_nodes; end - - # attr_reader constant_path: Prism::node - # - # source://prism//lib/prism/node.rb#11608 - def constant_path; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode - # - # source://prism//lib/prism/node.rb#11585 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11567 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#11593 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#11629 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#11614 - 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#11634 - sig { override.returns(String) } - def inspect; end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#11598 - def locals; end - - # def module_keyword: () -> String - # - # source://prism//lib/prism/node.rb#11624 - def module_keyword; end - - # attr_reader module_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#11601 - def module_keyword_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#11621 - def name; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#11639 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#11644 - def type; end - end -end - -# Represents a multi-target expression. -# -# a, (b, c) = 1, 2, 3 -# ^^^^^^ -# -# This can be a part of `MultiWriteNode` as above, or the target of a `for` loop -# -# for a, b in [[1, 2], [3, 4]] -# ^^^^ -# -# source://prism//lib/prism/node.rb#11671 -class Prism::MultiTargetNode < ::Prism::Node - # Initialize a new MultiTargetNode node. - # - # @return [MultiTargetNode] a new instance of MultiTargetNode - # - # source://prism//lib/prism/node.rb#11673 - def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc); 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#11814 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11686 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11691 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11705 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11696 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode - # - # source://prism//lib/prism/node.rb#11710 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11691 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } - # - # source://prism//lib/prism/node.rb#11718 - 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#11798 - sig { override.returns(String) } - def inspect; end - - # Represents the targets expressions before a splat node. - # - # a, (b, c, *) = 1, 2, 3, 4, 5 - # ^^^^ - # - # The splat node can be absent, in that case all target expressions are in the left field. - # - # a, (b, c) = 1, 2, 3, 4, 5 - # ^^^^ - # - # source://prism//lib/prism/node.rb#11731 - def lefts; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#11788 - def lparen; end - - # The location of the opening parenthesis. - # - # a, (b, c) = 1, 2, 3 - # ^ - # - # source://prism//lib/prism/node.rb#11759 - def lparen_loc; end - - # Represents a splat node in the target expression. - # - # a, (b, *c) = 1, 2, 3, 4 - # ^^ - # - # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. - # - # a, (b, *) = 1, 2, 3, 4 - # ^ - # - # If the `*` is omitted, the field will containt an `ImplicitRestNode` - # - # a, (b,) = 1, 2, 3, 4 - # ^ - # - # source://prism//lib/prism/node.rb#11747 - def rest; end - - # Represents the targets expressions after a splat node. - # - # a, (*, b, c) = 1, 2, 3, 4, 5 - # ^^^^ - # - # source://prism//lib/prism/node.rb#11753 - def rights; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#11793 - def rparen; end - - # The location of the closing parenthesis. - # - # a, (b, c) = 1, 2, 3 - # ^ - # - # source://prism//lib/prism/node.rb#11775 - def rparen_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#11803 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#11808 - 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#11830 -class Prism::MultiWriteNode < ::Prism::Node - # Initialize a new MultiWriteNode node. - # - # @return [MultiWriteNode] a new instance of MultiWriteNode - # - # source://prism//lib/prism/node.rb#11832 - def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value); 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#11997 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#11847 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11852 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11867 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11857 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode - # - # source://prism//lib/prism/node.rb#11872 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11852 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#11880 - 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#11981 - sig { override.returns(String) } - def inspect; end - - # Represents the targets expressions before a splat node. - # - # a, b, * = 1, 2, 3, 4, 5 - # ^^^^ - # - # The splat node can be absent, in that case all target expressions are in the left field. - # - # a, b, c = 1, 2, 3, 4, 5 - # ^^^^^^^ - # - # source://prism//lib/prism/node.rb#11893 - def lefts; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#11966 - def lparen; end - - # The location of the opening parenthesis. - # - # (a, b, c) = 1, 2, 3 - # ^ - # - # source://prism//lib/prism/node.rb#11921 - def lparen_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11976 - def operator; end - - # The location of the operator. - # - # a, b, c = 1, 2, 3 - # ^ - # - # source://prism//lib/prism/node.rb#11953 - def operator_loc; end - - # Represents a splat node in the target expression. - # - # a, b, *c = 1, 2, 3, 4 - # ^^ - # - # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. - # - # a, b, * = 1, 2, 3, 4 - # ^ - # - # If the `*` is omitted, the field will containt an `ImplicitRestNode` - # - # a, b, = 1, 2, 3, 4 - # ^ - # - # source://prism//lib/prism/node.rb#11909 - def rest; end - - # Represents the targets expressions after a splat node. - # - # a, *, b, c = 1, 2, 3, 4, 5 - # ^^^^ - # - # source://prism//lib/prism/node.rb#11915 - def rights; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#11971 - def rparen; end - - # The location of the closing parenthesis. - # - # (a, b, c) = 1, 2, 3 - # ^ - # - # source://prism//lib/prism/node.rb#11937 - def rparen_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#11986 - sig { override.returns(Symbol) } - def type; end - - # The value to write to the targets. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). - # - # a, b, c = 1, 2, 3 - # ^^^^^^^ - # - # source://prism//lib/prism/node.rb#11963 - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#11991 - 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 ItLocalVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#450 - def visit_it_local_variable_read_node(node); end - - # Copy a ItParametersNode node - # - # source://prism//lib/prism/mutation_compiler.rb#455 - def visit_it_parameters_node(node); end - - # Copy a KeywordHashNode node - # - # source://prism//lib/prism/mutation_compiler.rb#460 - def visit_keyword_hash_node(node); end - - # Copy a KeywordRestParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#465 - def visit_keyword_rest_parameter_node(node); end - - # Copy a LambdaNode node - # - # source://prism//lib/prism/mutation_compiler.rb#470 - def visit_lambda_node(node); end - - # Copy a LocalVariableAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#475 - def visit_local_variable_and_write_node(node); end - - # Copy a LocalVariableOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#480 - def visit_local_variable_operator_write_node(node); end - - # Copy a LocalVariableOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#485 - def visit_local_variable_or_write_node(node); end - - # Copy a LocalVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#490 - def visit_local_variable_read_node(node); end - - # Copy a LocalVariableTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#495 - def visit_local_variable_target_node(node); end - - # Copy a LocalVariableWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#500 - def visit_local_variable_write_node(node); end - - # Copy a MatchLastLineNode node - # - # source://prism//lib/prism/mutation_compiler.rb#505 - def visit_match_last_line_node(node); end - - # Copy a MatchPredicateNode node - # - # source://prism//lib/prism/mutation_compiler.rb#510 - def visit_match_predicate_node(node); end - - # Copy a MatchRequiredNode node - # - # source://prism//lib/prism/mutation_compiler.rb#515 - def visit_match_required_node(node); end - - # Copy a MatchWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#520 - def visit_match_write_node(node); end - - # Copy a MissingNode node - # - # source://prism//lib/prism/mutation_compiler.rb#525 - def visit_missing_node(node); end - - # Copy a ModuleNode node - # - # source://prism//lib/prism/mutation_compiler.rb#530 - def visit_module_node(node); end - - # Copy a MultiTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#535 - def visit_multi_target_node(node); end - - # Copy a MultiWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#540 - def visit_multi_write_node(node); end - - # Copy a NextNode node - # - # source://prism//lib/prism/mutation_compiler.rb#545 - def visit_next_node(node); end - - # Copy a NilNode node - # - # source://prism//lib/prism/mutation_compiler.rb#550 - def visit_nil_node(node); end - - # Copy a NoKeywordsParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#555 - def visit_no_keywords_parameter_node(node); end - - # Copy a NumberedParametersNode node - # - # source://prism//lib/prism/mutation_compiler.rb#560 - def visit_numbered_parameters_node(node); end - - # Copy a NumberedReferenceReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#565 - def visit_numbered_reference_read_node(node); end - - # Copy a OptionalKeywordParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#570 - def visit_optional_keyword_parameter_node(node); end - - # Copy a OptionalParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#575 - def visit_optional_parameter_node(node); end - - # Copy a OrNode node - # - # source://prism//lib/prism/mutation_compiler.rb#580 - def visit_or_node(node); end - - # Copy a ParametersNode node - # - # source://prism//lib/prism/mutation_compiler.rb#585 - def visit_parameters_node(node); end - - # Copy a ParenthesesNode node - # - # source://prism//lib/prism/mutation_compiler.rb#590 - def visit_parentheses_node(node); end - - # Copy a PinnedExpressionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#595 - def visit_pinned_expression_node(node); end - - # Copy a PinnedVariableNode node - # - # source://prism//lib/prism/mutation_compiler.rb#600 - def visit_pinned_variable_node(node); end - - # Copy a PostExecutionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#605 - def visit_post_execution_node(node); end - - # Copy a PreExecutionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#610 - def visit_pre_execution_node(node); end - - # Copy a ProgramNode node - # - # source://prism//lib/prism/mutation_compiler.rb#615 - def visit_program_node(node); end - - # Copy a RangeNode node - # - # source://prism//lib/prism/mutation_compiler.rb#620 - def visit_range_node(node); end - - # Copy a RationalNode node - # - # source://prism//lib/prism/mutation_compiler.rb#625 - def visit_rational_node(node); end - - # Copy a RedoNode node - # - # source://prism//lib/prism/mutation_compiler.rb#630 - def visit_redo_node(node); end - - # Copy a RegularExpressionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#635 - def visit_regular_expression_node(node); end - - # Copy a RequiredKeywordParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#640 - def visit_required_keyword_parameter_node(node); end - - # Copy a RequiredParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#645 - def visit_required_parameter_node(node); end - - # Copy a RescueModifierNode node - # - # source://prism//lib/prism/mutation_compiler.rb#650 - def visit_rescue_modifier_node(node); end - - # Copy a RescueNode node - # - # source://prism//lib/prism/mutation_compiler.rb#655 - def visit_rescue_node(node); end - - # Copy a RestParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#660 - def visit_rest_parameter_node(node); end - - # Copy a RetryNode node - # - # source://prism//lib/prism/mutation_compiler.rb#665 - def visit_retry_node(node); end - - # Copy a ReturnNode node - # - # source://prism//lib/prism/mutation_compiler.rb#670 - def visit_return_node(node); end - - # Copy a SelfNode node - # - # source://prism//lib/prism/mutation_compiler.rb#675 - def visit_self_node(node); end - - # Copy a ShareableConstantNode node - # - # source://prism//lib/prism/mutation_compiler.rb#680 - def visit_shareable_constant_node(node); end - - # Copy a SingletonClassNode node - # - # source://prism//lib/prism/mutation_compiler.rb#685 - def visit_singleton_class_node(node); end - - # Copy a SourceEncodingNode node - # - # source://prism//lib/prism/mutation_compiler.rb#690 - def visit_source_encoding_node(node); end - - # Copy a SourceFileNode node - # - # source://prism//lib/prism/mutation_compiler.rb#695 - def visit_source_file_node(node); end - - # Copy a SourceLineNode node - # - # source://prism//lib/prism/mutation_compiler.rb#700 - def visit_source_line_node(node); end - - # Copy a SplatNode node - # - # source://prism//lib/prism/mutation_compiler.rb#705 - def visit_splat_node(node); end - - # Copy a StatementsNode node - # - # source://prism//lib/prism/mutation_compiler.rb#710 - def visit_statements_node(node); end - - # Copy a StringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#715 - def visit_string_node(node); end - - # Copy a SuperNode node - # - # source://prism//lib/prism/mutation_compiler.rb#720 - def visit_super_node(node); end - - # Copy a SymbolNode node - # - # source://prism//lib/prism/mutation_compiler.rb#725 - def visit_symbol_node(node); end - - # Copy a TrueNode node - # - # source://prism//lib/prism/mutation_compiler.rb#730 - def visit_true_node(node); end - - # Copy a UndefNode node - # - # source://prism//lib/prism/mutation_compiler.rb#735 - def visit_undef_node(node); end - - # Copy a UnlessNode node - # - # source://prism//lib/prism/mutation_compiler.rb#740 - def visit_unless_node(node); end - - # Copy a UntilNode node - # - # source://prism//lib/prism/mutation_compiler.rb#745 - def visit_until_node(node); end - - # Copy a WhenNode node - # - # source://prism//lib/prism/mutation_compiler.rb#750 - def visit_when_node(node); end - - # Copy a WhileNode node - # - # source://prism//lib/prism/mutation_compiler.rb#755 - def visit_while_node(node); end - - # Copy a XStringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#760 - def visit_x_string_node(node); end - - # Copy a YieldNode node - # - # source://prism//lib/prism/mutation_compiler.rb#765 - def visit_yield_node(node); end -end - -# Represents the use of the `next` keyword. -# -# next 1 -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#12015 -class Prism::NextNode < ::Prism::Node - # Initialize a new NextNode node. - # - # @return [NextNode] a new instance of NextNode - # - # source://prism//lib/prism/node.rb#12017 - def initialize(source, node_id, location, flags, arguments, keyword_loc); 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#12093 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12027 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#12062 - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12032 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12044 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12037 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode - # - # source://prism//lib/prism/node.rb#12049 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12032 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#12057 - 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#12077 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#12072 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#12065 - def keyword_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12082 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12087 - def type; end - end -end - -# Represents the use of the `nil` keyword. -# -# nil -# ^^^ -# -# source://prism//lib/prism/node.rb#12104 -class Prism::NilNode < ::Prism::Node - # Initialize a new NilNode node. - # - # @return [NilNode] a new instance of NilNode - # - # source://prism//lib/prism/node.rb#12106 - def initialize(source, node_id, location, flags); 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#12163 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12114 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12119 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12129 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12124 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode - # - # source://prism//lib/prism/node.rb#12134 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12119 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#12142 - 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#12147 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12152 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12157 - def type; end - end -end - -# Represents the use of `**nil` inside method arguments. -# -# def a(**nil) -# ^^^^^ -# end -# -# source://prism//lib/prism/node.rb#12173 -class Prism::NoKeywordsParameterNode < ::Prism::Node - # Initialize a new NoKeywordsParameterNode node. - # - # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode - # - # source://prism//lib/prism/node.rb#12175 - def initialize(source, node_id, location, flags, operator_loc, keyword_loc); 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#12258 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12185 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12190 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12200 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12195 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode - # - # source://prism//lib/prism/node.rb#12205 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12190 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#12213 - 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#12242 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#12237 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#12225 - def keyword_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#12232 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12218 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12247 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12252 - 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#169 - sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # Returns the first node that matches the given block when visited in a - # depth-first search. This is useful for finding a node that matches a - # particular condition. - # - # node.breadth_first_search { |node| node.node_id == node_id } - # - # source://prism//lib/prism/node.rb#139 - sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } - def breadth_first_search(&block); 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#175 - 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#189 - 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#183 - 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#175 - 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#40 - 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#194 - 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#25 - sig { returns(Prism::Location) } - def location; end - - # Returns true if the node has the newline flag set. - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#72 - sig { returns(T::Boolean) } - def newline?; end - - # source://prism//lib/prism/parse_result/newlines.rb#69 - def newline_flag!(lines); end - - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/newlines.rb#65 - def newline_flag?; end - - # A unique identifier for this node. This is used in a very specific - # use case where you want to keep around a reference to a node without - # having to keep around the syntax tree in memory. This unique identifier - # will be consistent across multiple parses of the same source code. - # - # source://prism//lib/prism/node.rb#21 - sig { returns(Integer) } - def node_id; end - - # Similar to inspect, but respects the current level of indentation given by - # the pretty print object. - # - # source://prism//lib/prism/node.rb#83 - 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#46 - sig { returns(T::Array[String]) } - def script_lines; end - - # Slice the location of the node from the source. - # - # source://prism//lib/prism/node.rb#55 - 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#62 - 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#46 - 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#33 - sig { returns(Integer) } - def start_offset; end - - # Returns true if the node has the static literal flag set. - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#77 - sig { returns(T::Boolean) } - def static_literal?; end - - # Convert this node into a graphviz dot graph string. - # - # source://prism//lib/prism/node.rb#91 - 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#102 - sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } - def tunnel(line, column); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#210 - sig { abstract.returns(Symbol) } - def type; end - - protected - - # An bitset of flags for this node. There are certain flags that are common - # for all nodes, and then some nodes have specific flags. - # - # source://prism//lib/prism/node.rb#68 - sig { returns(Integer) } - def flags; 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#153 - def fields; end - - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # @raise [NoMethodError] - # - # source://prism//lib/prism/node.rb#218 - def type; end - end -end - -# The flags that are common to all nodes. -# -# source://prism//lib/prism/node.rb#16812 -module Prism::NodeFlags; end - -# A flag to indicate that the node is a candidate to emit a :line event -# through tracepoint when compiled. -# -# source://prism//lib/prism/node.rb#16815 -Prism::NodeFlags::NEWLINE = T.let(T.unsafe(nil), Integer) - -# A flag to indicate that the value that the node represents is a value that -# can be determined at parse-time. -# -# source://prism//lib/prism/node.rb#16819 -Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) - -# 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#12269 -class Prism::NumberedParametersNode < ::Prism::Node - # Initialize a new NumberedParametersNode node. - # - # @return [NumberedParametersNode] a new instance of NumberedParametersNode - # - # source://prism//lib/prism/node.rb#12271 - def initialize(source, node_id, location, flags, maximum); 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#12332 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12280 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12285 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12295 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12290 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode - # - # source://prism//lib/prism/node.rb#12300 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12285 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } - # - # source://prism//lib/prism/node.rb#12308 - 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#12316 - sig { override.returns(String) } - def inspect; end - - # attr_reader maximum: Integer - # - # source://prism//lib/prism/node.rb#12313 - def maximum; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12321 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12326 - def type; end - end -end - -# Represents reading a numbered reference to a capture in the previous match. -# -# $1 -# ^^ -# -# source://prism//lib/prism/node.rb#12342 -class Prism::NumberedReferenceReadNode < ::Prism::Node - # Initialize a new NumberedReferenceReadNode node. - # - # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode - # - # source://prism//lib/prism/node.rb#12344 - def initialize(source, node_id, location, flags, number); 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#12411 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12353 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12358 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12368 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12363 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode - # - # source://prism//lib/prism/node.rb#12373 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12358 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } - # - # source://prism//lib/prism/node.rb#12381 - 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#12395 - 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#12392 - def number; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12400 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12405 - 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#12422 -class Prism::OptionalKeywordParameterNode < ::Prism::Node - # Initialize a new OptionalKeywordParameterNode node. - # - # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode - # - # source://prism//lib/prism/node.rb#12424 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node - ).void - end - def initialize(source, node_id, location, flags, name, name_loc, value); 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#12502 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12435 - 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#12440 - 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#12450 - 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#12445 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode - # - # source://prism//lib/prism/node.rb#12455 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::OptionalKeywordParameterNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12440 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#12463 - 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#12486 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12473 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#12476 - sig { returns(Prism::Location) } - def name_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12468 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12491 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#12483 - sig { returns(Prism::Node) } - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12496 - 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#12516 -class Prism::OptionalParameterNode < ::Prism::Node - # Initialize a new OptionalParameterNode node. - # - # @return [OptionalParameterNode] a new instance of OptionalParameterNode - # - # source://prism//lib/prism/node.rb#12518 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).void - end - def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); 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#12609 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12530 - 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#12535 - 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#12545 - 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#12540 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> OptionalParameterNode - # - # source://prism//lib/prism/node.rb#12550 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node - ).returns(Prism::OptionalParameterNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12535 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } - # - # source://prism//lib/prism/node.rb#12558 - 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#12593 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12568 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#12571 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#12588 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12578 - sig { returns(Prism::Location) } - def operator_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#12563 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12598 - sig { override.returns(Symbol) } - def type; end - - # attr_reader value: Prism::node - # - # source://prism//lib/prism/node.rb#12585 - sig { returns(Prism::Node) } - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12603 - def type; end - end -end - -# Represents the use of the `||` operator or the `or` keyword. -# -# left or right -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#12623 -class Prism::OrNode < ::Prism::Node - # Initialize a new OrNode node. - # - # @return [OrNode] a new instance of OrNode - # - # source://prism//lib/prism/node.rb#12625 - def initialize(source, node_id, location, flags, left, right, operator_loc); 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#12718 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12636 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12641 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12651 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12646 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode - # - # source://prism//lib/prism/node.rb#12656 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12641 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#12664 - 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#12702 - 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#12675 - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#12697 - def operator; end - - # The location of the `or` keyword or the `||` operator. - # - # left or right - # ^^ - # - # source://prism//lib/prism/node.rb#12690 - 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#12684 - def right; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12707 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12712 - 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#16725 -module Prism::ParameterFlags; end - -# a parameter name that has been repeated in the method signature -# -# source://prism//lib/prism/node.rb#16727 -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#12731 -class Prism::ParametersNode < ::Prism::Node - # Initialize a new ParametersNode node. - # - # @return [ParametersNode] a new instance of ParametersNode - # - # source://prism//lib/prism/node.rb#12733 - def initialize(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block); 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#12826 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12748 - def accept(visitor); end - - # attr_reader block: BlockParameterNode? - # - # source://prism//lib/prism/node.rb#12807 - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12753 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12771 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12758 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?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?) -> ParametersNode - # - # source://prism//lib/prism/node.rb#12776 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12753 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, 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? } - # - # source://prism//lib/prism/node.rb#12784 - 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#12810 - sig { override.returns(String) } - def inspect; end - - # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil - # - # source://prism//lib/prism/node.rb#12804 - def keyword_rest; end - - # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] - # - # source://prism//lib/prism/node.rb#12801 - def keywords; end - - # attr_reader optionals: Array[OptionalParameterNode] - # - # source://prism//lib/prism/node.rb#12792 - def optionals; end - - # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] - # - # source://prism//lib/prism/node.rb#12798 - def posts; end - - # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] - # - # source://prism//lib/prism/node.rb#12789 - def requireds; end - - # attr_reader rest: RestParameterNode | ImplicitRestNode | nil - # - # source://prism//lib/prism/node.rb#12795 - def rest; end - - # Mirrors the Method#parameters method. - # - # source://prism//lib/prism/node_ext.rb#269 - sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } - def signature; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12815 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12820 - def type; end - end -end - -# Represents a parenthesized expression -# -# (10 + 34) -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#12846 -class Prism::ParenthesesNode < ::Prism::Node - # Initialize a new ParenthesesNode node. - # - # @return [ParenthesesNode] a new instance of ParenthesesNode - # - # source://prism//lib/prism/node.rb#12848 - def initialize(source, node_id, location, flags, body, opening_loc, closing_loc); 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#12937 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12859 - def accept(visitor); end - - # attr_reader body: Prism::node? - # - # source://prism//lib/prism/node.rb#12894 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12864 - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#12916 - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#12904 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12876 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12869 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode - # - # source://prism//lib/prism/node.rb#12881 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12864 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } - # - # source://prism//lib/prism/node.rb#12889 - 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#12921 - sig { override.returns(String) } - def inspect; end - - # source://prism//lib/prism/parse_result/newlines.rb#85 - def newline_flag!(lines); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#12911 - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#12897 - def opening_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#12926 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#12931 - def type; end - end -end - -# This represents an error that was encountered during parsing. -# -# source://prism//lib/prism/parse_result.rb#460 -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#475 - 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#483 - 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#488 - sig { returns(String) } - def inspect; end - - # The level of this error. - # - # source://prism//lib/prism/parse_result.rb#472 - 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#469 - sig { returns(Prism::Location) } - def location; end - - # The message associated with this error. - # - # source://prism//lib/prism/parse_result.rb#466 - 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#463 - 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#644 -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#650 - 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#656 - 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#647 - 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#585 -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#598 - 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.rb#609 - def attach_comments!; end - - # Implement the hash pattern matching interface for ParseResult. - # - # 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 - - # Returns a string representation of the syntax tree with the errors - # displayed inline. - # - # source://prism//lib/prism/parse_result.rb#621 - def errors_format; end - - # Walk the tree and mark nodes that are on a new line, loosely emulating - # the behavior of CRuby's `:line` tracepoint event. - # - # source://prism//lib/prism/parse_result.rb#615 - def mark_newlines!; end - - # The syntax tree that was parsed from the source code. - # - # source://prism//lib/prism/parse_result.rb#595 - 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 - -# An object to represent the set of errors on a parse result. This object -# can be used to format the errors in a human-readable way. -# -# source://prism//lib/prism/parse_result/errors.rb#9 -class Prism::ParseResult::Errors - # Initialize a new set of errors from the given parse result. - # - # @return [Errors] a new instance of Errors - # - # source://prism//lib/prism/parse_result/errors.rb#14 - def initialize(parse_result); end - - # Formats the errors in a human-readable way and return them as a string. - # - # source://prism//lib/prism/parse_result/errors.rb#19 - def format; end - - # The parse result that contains the errors. - # - # source://prism//lib/prism/parse_result/errors.rb#11 - def parse_result; 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. -# -# This file is autoloaded only when `mark_newlines!` is called, so the -# re-opening of the various nodes in this file will only be performed in -# that case. We do that to avoid storing the extra `@newline` instance -# variable on every node if we don't need it. -# -# source://prism//lib/prism/parse_result/newlines.rb#25 -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#27 - def initialize(lines); end - - # Permit block/lambda nodes to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#33 - def visit_block_node(node); end - - # Mark if/unless nodes as newlines. - # - # source://prism//lib/prism/parse_result/newlines.rb#47 - def visit_if_node(node); end - - # Permit block/lambda nodes to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#33 - def visit_lambda_node(node); end - - # Permit statements lists to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#55 - def visit_statements_node(node); end - - # Mark if/unless nodes as newlines. - # - # source://prism//lib/prism/parse_result/newlines.rb#47 - def visit_unless_node(node); end -end - -# This represents a warning that was encountered during parsing. -# -# source://prism//lib/prism/parse_result.rb#494 -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#509 - 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#517 - 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#522 - sig { returns(String) } - def inspect; end - - # The level of this warning. - # - # source://prism//lib/prism/parse_result.rb#506 - 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#503 - sig { returns(Prism::Location) } - def location; end - - # The message associated with this warning. - # - # source://prism//lib/prism/parse_result.rb#500 - 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#497 - 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 <tt>ConstantPathNode[...]</tt> 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#12949 -class Prism::PinnedExpressionNode < ::Prism::Node - # Initialize a new PinnedExpressionNode node. - # - # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode - # - # source://prism//lib/prism/node.rb#12951 - def initialize(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc); 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#13051 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#12963 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12968 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12978 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12973 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode - # - # source://prism//lib/prism/node.rb#12983 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12968 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } - # - # source://prism//lib/prism/node.rb#12991 - def deconstruct_keys(keys); end - - # attr_reader expression: Prism::node - # - # source://prism//lib/prism/node.rb#12996 - def expression; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#13035 - sig { override.returns(String) } - def inspect; end - - # def lparen: () -> String - # - # source://prism//lib/prism/node.rb#13025 - def lparen; end - - # attr_reader lparen_loc: Location - # - # source://prism//lib/prism/node.rb#13006 - def lparen_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13020 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12999 - def operator_loc; end - - # def rparen: () -> String - # - # source://prism//lib/prism/node.rb#13030 - def rparen; end - - # attr_reader rparen_loc: Location - # - # source://prism//lib/prism/node.rb#13013 - def rparen_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13040 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13045 - 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#13064 -class Prism::PinnedVariableNode < ::Prism::Node - # Initialize a new PinnedVariableNode node. - # - # @return [PinnedVariableNode] a new instance of PinnedVariableNode - # - # source://prism//lib/prism/node.rb#13066 - def initialize(source, node_id, location, flags, variable, operator_loc); 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#13140 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13076 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13081 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13091 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13086 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: Prism::node, ?operator_loc: Location) -> PinnedVariableNode - # - # source://prism//lib/prism/node.rb#13096 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13081 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: Prism::node, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#13104 - 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#13124 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13119 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#13112 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13129 - sig { override.returns(Symbol) } - def type; end - - # attr_reader variable: Prism::node - # - # source://prism//lib/prism/node.rb#13109 - def variable; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13134 - def type; end - end -end - -# Represents the use of the `END` keyword. -# -# END { foo } -# ^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13151 -class Prism::PostExecutionNode < ::Prism::Node - # Initialize a new PostExecutionNode node. - # - # @return [PostExecutionNode] a new instance of PostExecutionNode - # - # source://prism//lib/prism/node.rb#13153 - def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); 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#13255 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13165 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13170 - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#13234 - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#13217 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13182 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13175 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode - # - # source://prism//lib/prism/node.rb#13187 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13170 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } - # - # source://prism//lib/prism/node.rb#13195 - 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#13239 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#13224 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#13203 - def keyword_loc; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#13229 - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#13210 - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#13200 - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13244 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13249 - def type; end - end -end - -# Represents the use of the `BEGIN` keyword. -# -# BEGIN { foo } -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13268 -class Prism::PreExecutionNode < ::Prism::Node - # Initialize a new PreExecutionNode node. - # - # @return [PreExecutionNode] a new instance of PreExecutionNode - # - # source://prism//lib/prism/node.rb#13270 - def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); 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#13372 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13282 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13287 - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#13351 - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#13334 - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13299 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13292 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode - # - # source://prism//lib/prism/node.rb#13304 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13287 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } - # - # source://prism//lib/prism/node.rb#13312 - 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#13356 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#13341 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#13320 - def keyword_loc; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#13346 - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#13327 - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#13317 - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13361 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13366 - def type; end - end -end - -# The top level node of any parse tree. -# -# source://prism//lib/prism/node.rb#13382 -class Prism::ProgramNode < ::Prism::Node - # Initialize a new ProgramNode node. - # - # @return [ProgramNode] a new instance of ProgramNode - # - # source://prism//lib/prism/node.rb#13384 - def initialize(source, node_id, location, flags, locals, statements); 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#13449 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13394 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13399 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13409 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13404 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode - # - # source://prism//lib/prism/node.rb#13414 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13399 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } - # - # source://prism//lib/prism/node.rb#13422 - 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#13433 - sig { override.returns(String) } - def inspect; end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#13427 - def locals; end - - # attr_reader statements: StatementsNode - # - # source://prism//lib/prism/node.rb#13430 - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13438 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13443 - def type; end - end -end - -# Flags for range and flip-flop nodes. -# -# source://prism//lib/prism/node.rb#16731 -module Prism::RangeFlags; end - -# ... operator -# -# source://prism//lib/prism/node.rb#16733 -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#13464 -class Prism::RangeNode < ::Prism::Node - # Initialize a new RangeNode node. - # - # @return [RangeNode] a new instance of RangeNode - # - # source://prism//lib/prism/node.rb#13466 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - left: T.nilable(Prism::Node), - right: T.nilable(Prism::Node), - operator_loc: Prism::Location - ).void - end - def initialize(source, node_id, location, flags, left, right, operator_loc); 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#13565 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13477 - 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#13482 - 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#13495 - 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#13487 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode - # - # source://prism//lib/prism/node.rb#13500 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - left: T.nilable(Prism::Node), - right: T.nilable(Prism::Node), - operator_loc: Prism::Location - ).returns(Prism::RangeNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13482 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#13508 - 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#13513 - 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#13549 - 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#13524 - sig { returns(T.nilable(Prism::Node)) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13544 - sig { returns(String) } - def operator; end - - # The location of the `..` or `...` operator. - # - # source://prism//lib/prism/node.rb#13537 - 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#13534 - sig { returns(T.nilable(Prism::Node)) } - def right; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13554 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13559 - def type; end - end -end - -# Represents a rational number literal. -# -# 1.0r -# ^^^^ -# -# source://prism//lib/prism/node.rb#13578 -class Prism::RationalNode < ::Prism::Node - # Initialize a new RationalNode node. - # - # @return [RationalNode] a new instance of RationalNode - # - # source://prism//lib/prism/node.rb#13580 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - numerator: Integer, - denominator: Integer - ).void - end - def initialize(source, node_id, location, flags, numerator, denominator); 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#13669 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13590 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # def binary?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13623 - sig { returns(T::Boolean) } - def binary?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13595 - 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#13605 - 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#13600 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode - # - # source://prism//lib/prism/node.rb#13610 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - numerator: Integer, - denominator: Integer - ).returns(Prism::RationalNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil)); end - - # def decimal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13628 - sig { returns(T::Boolean) } - def decimal?; end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13595 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } - # - # source://prism//lib/prism/node.rb#13618 - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); end - - # The denominator of the rational number. - # - # 1.5r # denominator 2 - # - # source://prism//lib/prism/node.rb#13650 - sig { returns(Integer) } - def denominator; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def hexadecimal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13638 - sig { returns(T::Boolean) } - def hexadecimal?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#13653 - sig { override.returns(String) } - def inspect; end - - # The numerator of the rational number. - # - # 1.5r # numerator 3 - # - # source://prism//lib/prism/node.rb#13645 - sig { returns(Integer) } - def numerator; end - - # Returns the value of the node as an IntegerNode or a FloatNode. This - # method is deprecated in favor of #value or #numerator/#denominator. - # - # source://prism//lib/prism/node_ext.rb#120 - def numeric; end - - # def octal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13633 - sig { returns(T::Boolean) } - def octal?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13658 - sig { override.returns(Symbol) } - def type; end - - # Returns the value of the node as a Ruby Rational. - # - # source://prism//lib/prism/node_ext.rb#114 - sig { returns(Rational) } - def value; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13663 - def type; end - end -end - -# Represents the use of the `redo` keyword. -# -# redo -# ^^^^ -# -# source://prism//lib/prism/node.rb#13681 -class Prism::RedoNode < ::Prism::Node - # Initialize a new RedoNode node. - # - # @return [RedoNode] a new instance of RedoNode - # - # source://prism//lib/prism/node.rb#13683 - def initialize(source, node_id, location, flags); 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#13740 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13691 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13696 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13706 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13701 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode - # - # source://prism//lib/prism/node.rb#13711 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13696 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#13719 - 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#13724 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13729 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13734 - 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#16737 -module Prism::RegularExpressionFlags; end - -# n - forces the ASCII-8BIT encoding -# -# source://prism//lib/prism/node.rb#16754 -Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) - -# e - forces the EUC-JP encoding -# -# source://prism//lib/prism/node.rb#16751 -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#16742 -Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#16766 -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#16769 -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#16763 -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#16739 -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#16745 -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#16748 -Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) - -# u - forces the UTF-8 encoding -# -# source://prism//lib/prism/node.rb#16760 -Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) - -# s - forces the Windows-31J encoding -# -# source://prism//lib/prism/node.rb#16757 -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#13749 -class Prism::RegularExpressionNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # Initialize a new RegularExpressionNode node. - # - # @return [RegularExpressionNode] a new instance of RegularExpressionNode - # - # source://prism//lib/prism/node.rb#13751 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String - ).void - end - def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); 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#13906 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13763 - 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#13821 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13768 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#13885 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#13865 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13778 - 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#13773 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#13880 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#13858 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode - # - # source://prism//lib/prism/node.rb#13783 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String - ).returns(Prism::RegularExpressionNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13768 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } - # - # source://prism//lib/prism/node.rb#13791 - 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#13816 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13801 - 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#13841 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13846 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13836 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13796 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#13890 - sig { override.returns(String) } - def inspect; end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13806 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13811 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#13875 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#13851 - sig { returns(Prism::Location) } - def opening_loc; end - - sig { returns(Integer) } - def options; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13895 - sig { override.returns(Symbol) } - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#13872 - sig { returns(String) } - def unescaped; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13831 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13826 - sig { returns(T::Boolean) } - def windows_31j?; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13900 - def type; end - end -end - -# source://prism//lib/prism/node_ext.rb#20 -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#23 - 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#13921 -class Prism::RequiredKeywordParameterNode < ::Prism::Node - # Initialize a new RequiredKeywordParameterNode node. - # - # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode - # - # source://prism//lib/prism/node.rb#13923 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location - ).void - end - def initialize(source, node_id, location, flags, name, name_loc); 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#13997 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#13933 - 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#13938 - 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#13948 - 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#13943 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode - # - # source://prism//lib/prism/node.rb#13953 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol, - name_loc: Prism::Location - ).returns(Prism::RequiredKeywordParameterNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13938 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } - # - # source://prism//lib/prism/node.rb#13961 - 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#13981 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#13971 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#13974 - sig { returns(Prism::Location) } - def name_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#13966 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#13986 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#13991 - 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#14010 -class Prism::RequiredParameterNode < ::Prism::Node - # Initialize a new RequiredParameterNode node. - # - # @return [RequiredParameterNode] a new instance of RequiredParameterNode - # - # source://prism//lib/prism/node.rb#14012 - sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } - def initialize(source, node_id, location, flags, name); 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#14078 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14021 - 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#14026 - 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#14036 - 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#14031 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode - # - # source://prism//lib/prism/node.rb#14041 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: Symbol - ).returns(Prism::RequiredParameterNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14026 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism//lib/prism/node.rb#14049 - 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#14062 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#14059 - sig { returns(Symbol) } - def name; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14054 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14067 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14072 - def type; end - end -end - -# Represents an expression modified with a rescue. -# -# foo rescue nil -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#14089 -class Prism::RescueModifierNode < ::Prism::Node - # Initialize a new RescueModifierNode node. - # - # @return [RescueModifierNode] a new instance of RescueModifierNode - # - # source://prism//lib/prism/node.rb#14091 - def initialize(source, node_id, location, flags, expression, keyword_loc, rescue_expression); 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#14169 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14102 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14107 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14117 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14112 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode - # - # source://prism//lib/prism/node.rb#14122 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14107 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } - # - # source://prism//lib/prism/node.rb#14130 - def deconstruct_keys(keys); end - - # attr_reader expression: Prism::node - # - # source://prism//lib/prism/node.rb#14135 - def expression; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#14153 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#14148 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#14138 - def keyword_loc; end - - # source://prism//lib/prism/parse_result/newlines.rb#115 - def newline_flag!(lines); end - - # attr_reader rescue_expression: Prism::node - # - # source://prism//lib/prism/node.rb#14145 - def rescue_expression; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14158 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14163 - 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#14186 -class Prism::RescueNode < ::Prism::Node - # Initialize a new RescueNode node. - # - # @return [RescueNode] a new instance of RescueNode - # - # source://prism//lib/prism/node.rb#14188 - def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, statements, subsequent); 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#14298 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14202 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14207 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14222 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14212 - def compact_child_nodes; end - - # Returns the subsequent rescue clause of the rescue node. This method is - # deprecated in favor of #subsequent. - # - # source://prism//lib/prism/node_ext.rb#494 - def consequent; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: Prism::node?, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode - # - # source://prism//lib/prism/node.rb#14227 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14207 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::node?, statements: StatementsNode?, subsequent: RescueNode? } - # - # source://prism//lib/prism/node.rb#14235 - def deconstruct_keys(keys); end - - # attr_reader exceptions: Array[Prism::node] - # - # source://prism//lib/prism/node.rb#14247 - def exceptions; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#14282 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#14272 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#14240 - def keyword_loc; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#14277 - def operator; end - - # attr_reader operator_loc: Location? - # - # source://prism//lib/prism/node.rb#14250 - def operator_loc; end - - # attr_reader reference: Prism::node? - # - # source://prism//lib/prism/node.rb#14263 - def reference; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#14266 - def statements; end - - # attr_reader subsequent: RescueNode? - # - # source://prism//lib/prism/node.rb#14269 - def subsequent; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14287 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14292 - 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#14315 -class Prism::RestParameterNode < ::Prism::Node - # Initialize a new RestParameterNode node. - # - # @return [RestParameterNode] a new instance of RestParameterNode - # - # source://prism//lib/prism/node.rb#14317 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location - ).void - end - def initialize(source, node_id, location, flags, name, name_loc, operator_loc); 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#14410 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14328 - 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#14333 - 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#14343 - 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#14338 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode - # - # source://prism//lib/prism/node.rb#14348 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location - ).returns(Prism::RestParameterNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14333 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } - # - # source://prism//lib/prism/node.rb#14356 - 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#14394 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#14366 - sig { returns(T.nilable(Symbol)) } - def name; end - - # attr_reader name_loc: Location? - # - # source://prism//lib/prism/node.rb#14369 - sig { returns(T.nilable(Prism::Location)) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#14389 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#14382 - sig { returns(Prism::Location) } - def operator_loc; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14361 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14399 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14404 - 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#530 -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#552 - 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#532 - 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#540 - 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#562 - 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#567 - sig { returns(Encoding) } - def encoding; end - - # The list of errors that were generated during parsing. - # - # source://prism//lib/prism/parse_result.rb#543 - 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#579 - sig { returns(T::Boolean) } - def failure?; end - - # The list of magic comments that were encountered during parsing. - # - # source://prism//lib/prism/parse_result.rb#535 - 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#549 - 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#573 - sig { returns(T::Boolean) } - def success?; end - - # The list of warnings that were generated during parsing. - # - # source://prism//lib/prism/parse_result.rb#546 - sig { returns(T::Array[Prism::ParseWarning]) } - def warnings; end -end - -# Represents the use of the `retry` keyword. -# -# retry -# ^^^^^ -# -# source://prism//lib/prism/node.rb#14423 -class Prism::RetryNode < ::Prism::Node - # Initialize a new RetryNode node. - # - # @return [RetryNode] a new instance of RetryNode - # - # source://prism//lib/prism/node.rb#14425 - def initialize(source, node_id, location, flags); 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#14482 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14433 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14438 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14448 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14443 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode - # - # source://prism//lib/prism/node.rb#14453 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14438 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#14461 - 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#14466 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14471 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14476 - def type; end - end -end - -# Represents the use of the `return` keyword. -# -# return 1 -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#14491 -class Prism::ReturnNode < ::Prism::Node - # Initialize a new ReturnNode node. - # - # @return [ReturnNode] a new instance of ReturnNode - # - # source://prism//lib/prism/node.rb#14493 - def initialize(source, node_id, location, flags, keyword_loc, arguments); 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#14569 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14503 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#14545 - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14508 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14520 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14513 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode - # - # source://prism//lib/prism/node.rb#14525 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14508 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } - # - # source://prism//lib/prism/node.rb#14533 - 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#14553 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#14548 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#14538 - def keyword_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14558 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14563 - def type; end - end -end - -# Represents the `self` keyword. -# -# self -# ^^^^ -# -# source://prism//lib/prism/node.rb#14580 -class Prism::SelfNode < ::Prism::Node - # Initialize a new SelfNode node. - # - # @return [SelfNode] a new instance of SelfNode - # - # source://prism//lib/prism/node.rb#14582 - def initialize(source, node_id, location, flags); 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#14639 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14590 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14595 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14605 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14600 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode - # - # source://prism//lib/prism/node.rb#14610 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14595 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#14618 - 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#14623 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14628 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14633 - 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#446 - def load_metadata; end - - # source://prism//lib/prism/serialize.rb#480 - def load_nodes; end - - # source://prism//lib/prism/serialize.rb#494 - def load_result; end - - # source://prism//lib/prism/serialize.rb#110 - def load_start_line; end - - # source://prism//lib/prism/serialize.rb#455 - def load_tokens; end - - # source://prism//lib/prism/serialize.rb#468 - 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#580 - def load_constant(index); end - - # source://prism//lib/prism/serialize.rb#533 - def load_double; end - - # source://prism//lib/prism/serialize.rb#548 - def load_embedded_string; end - - # source://prism//lib/prism/serialize.rb#610 - def load_error_level; end - - # source://prism//lib/prism/serialize.rb#522 - def load_integer; end - - # source://prism//lib/prism/serialize.rb#564 - def load_location; end - - # source://prism//lib/prism/serialize.rb#568 - def load_location_object; end - - # source://prism//lib/prism/serialize.rb#639 - def load_node; end - - # source://prism//lib/prism/serialize.rb#605 - def load_optional_constant; end - - # source://prism//lib/prism/serialize.rb#572 - def load_optional_location; end - - # source://prism//lib/prism/serialize.rb#576 - def load_optional_location_object; end - - # source://prism//lib/prism/serialize.rb#541 - def load_optional_node; end - - # source://prism//lib/prism/serialize.rb#601 - def load_required_constant; end - - # source://prism//lib/prism/serialize.rb#552 - def load_string; end - - # source://prism//lib/prism/serialize.rb#537 - def load_uint32; end - - # source://prism//lib/prism/serialize.rb#517 - 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#503 - def load_varuint; end - - # source://prism//lib/prism/serialize.rb#625 - 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#1721 -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#14649 -class Prism::ShareableConstantNode < ::Prism::Node - # Initialize a new ShareableConstantNode node. - # - # @return [ShareableConstantNode] a new instance of ShareableConstantNode - # - # source://prism//lib/prism/node.rb#14651 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) - ).void - end - def initialize(source, node_id, location, flags, write); 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#14727 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14660 - 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#14665 - 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#14675 - 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#14670 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode) -> ShareableConstantNode - # - # source://prism//lib/prism/node.rb#14680 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) - ).returns(Prism::ShareableConstantNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14665 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode } - # - # source://prism//lib/prism/node.rb#14688 - 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#14703 - sig { returns(T::Boolean) } - def experimental_copy?; end - - # def experimental_everything?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14698 - 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#14711 - sig { override.returns(String) } - def inspect; end - - # def literal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14693 - sig { returns(T::Boolean) } - def literal?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14716 - sig { override.returns(Symbol) } - def type; end - - # The constant write that should be modified with the shareability state. - # - # source://prism//lib/prism/node.rb#14708 - 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 - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14721 - def type; end - end -end - -# Flags for shareable constant nodes. -# -# source://prism//lib/prism/node.rb#16773 -module Prism::ShareableConstantNodeFlags; end - -# constant writes that should be modified with shareable constant value experimental copy -# -# source://prism//lib/prism/node.rb#16781 -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#16778 -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#16775 -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#14738 -class Prism::SingletonClassNode < ::Prism::Node - # Initialize a new SingletonClassNode node. - # - # @return [SingletonClassNode] a new instance of SingletonClassNode - # - # source://prism//lib/prism/node.rb#14740 - def initialize(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc); 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#14851 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14754 - def accept(visitor); end - - # attr_reader body: Prism::node? - # - # source://prism//lib/prism/node.rb#14810 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14759 - def child_nodes; end - - # def class_keyword: () -> String - # - # source://prism//lib/prism/node.rb#14820 - def class_keyword; end - - # attr_reader class_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#14793 - def class_keyword_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14772 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14764 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location) -> SingletonClassNode - # - # source://prism//lib/prism/node.rb#14777 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), 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)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14759 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: Prism::node?, end_keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#14785 - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#14830 - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#14813 - def end_keyword_loc; end - - # attr_reader expression: Prism::node - # - # source://prism//lib/prism/node.rb#14807 - def expression; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#14835 - sig { override.returns(String) } - def inspect; end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#14790 - def locals; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#14825 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#14800 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14840 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14845 - 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#30 - 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#82 - 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#77 - 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#104 - 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#92 - 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#72 - 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#38 - 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#55 - 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#67 - 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#61 - 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#43 - 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#27 - 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#49 - 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#21 - sig { returns(String) } - def source; end - - # The line number where this source starts. - # - # source://prism//lib/prism/parse_result.rb#24 - 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#112 - 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#14867 -class Prism::SourceEncodingNode < ::Prism::Node - # Initialize a new SourceEncodingNode node. - # - # @return [SourceEncodingNode] a new instance of SourceEncodingNode - # - # source://prism//lib/prism/node.rb#14869 - def initialize(source, node_id, location, flags); 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#14926 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14877 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14882 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14892 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14887 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode - # - # source://prism//lib/prism/node.rb#14897 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14882 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#14905 - 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#14910 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#14915 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#14920 - def type; end - end -end - -# Represents the use of the `__FILE__` keyword. -# -# __FILE__ -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#14935 -class Prism::SourceFileNode < ::Prism::Node - # Initialize a new SourceFileNode node. - # - # @return [SourceFileNode] a new instance of SourceFileNode - # - # source://prism//lib/prism/node.rb#14937 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - filepath: String - ).void - end - def initialize(source, node_id, location, flags, filepath); 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#15018 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#14946 - 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#14951 - 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#14961 - 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#14956 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode - # - # source://prism//lib/prism/node.rb#14966 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - filepath: String - ).returns(Prism::SourceFileNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), filepath: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14951 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } - # - # source://prism//lib/prism/node.rb#14974 - 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#14999 - sig { returns(String) } - def filepath; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14984 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14979 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def frozen?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14989 - sig { returns(T::Boolean) } - def frozen?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#15002 - sig { override.returns(String) } - def inspect; end - - # def mutable?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14994 - sig { returns(T::Boolean) } - def mutable?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#15007 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#15012 - def type; end - end -end - -# Represents the use of the `__LINE__` keyword. -# -# __LINE__ -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15029 -class Prism::SourceLineNode < ::Prism::Node - # Initialize a new SourceLineNode node. - # - # @return [SourceLineNode] a new instance of SourceLineNode - # - # source://prism//lib/prism/node.rb#15031 - def initialize(source, node_id, location, flags); 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#15088 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15039 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15044 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15054 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15049 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode - # - # source://prism//lib/prism/node.rb#15059 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15044 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#15067 - 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#15072 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#15077 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#15082 - def type; end - end -end - -# Represents the use of the splat operator. -# -# [*a] -# ^^ -# -# source://prism//lib/prism/node.rb#15097 -class Prism::SplatNode < ::Prism::Node - # Initialize a new SplatNode node. - # - # @return [SplatNode] a new instance of SplatNode - # - # source://prism//lib/prism/node.rb#15099 - def initialize(source, node_id, location, flags, operator_loc, expression); 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#15175 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15109 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15114 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15126 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15119 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode - # - # source://prism//lib/prism/node.rb#15131 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15114 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } - # - # source://prism//lib/prism/node.rb#15139 - def deconstruct_keys(keys); end - - # attr_reader expression: Prism::node? - # - # source://prism//lib/prism/node.rb#15151 - def expression; end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#15159 - sig { override.returns(String) } - def inspect; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#15154 - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#15144 - def operator_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#15164 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#15169 - def type; end - end -end - -# Represents a set of statements contained within some scope. -# -# foo; bar; baz -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15186 -class Prism::StatementsNode < ::Prism::Node - # Initialize a new StatementsNode node. - # - # @return [StatementsNode] a new instance of StatementsNode - # - # source://prism//lib/prism/node.rb#15188 - def initialize(source, node_id, location, flags, body); 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#15249 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15197 - def accept(visitor); end - - # attr_reader body: Array[Prism::node] - # - # source://prism//lib/prism/node.rb#15230 - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15202 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15212 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15207 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode - # - # source://prism//lib/prism/node.rb#15217 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15202 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } - # - # source://prism//lib/prism/node.rb#15225 - 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#15233 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#15238 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#15243 - def type; end - end -end - -# Flags for string nodes. -# -# source://prism//lib/prism/node.rb#16785 -module Prism::StringFlags; end - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#16790 -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#16787 -Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) - -# source://prism//lib/prism/node.rb#16793 -Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) - -# source://prism//lib/prism/node.rb#16796 -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#15266 -class Prism::StringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # Initialize a new StringNode node. - # - # @return [StringNode] a new instance of StringNode - # - # source://prism//lib/prism/node.rb#15268 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: T.nilable(Prism::Location), - content_loc: Prism::Location, - closing_loc: T.nilable(Prism::Location), - unescaped: String - ).void - end - def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); 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#15400 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15280 - 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#15285 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#15379 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#15353 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15295 - 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#15290 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#15374 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#15346 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode - # - # source://prism//lib/prism/node.rb#15300 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: T.nilable(Prism::Location), - content_loc: Prism::Location, - closing_loc: T.nilable(Prism::Location), - unescaped: String - ).returns(Prism::StringNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15285 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String } - # - # source://prism//lib/prism/node.rb#15308 - 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#15318 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15313 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def frozen?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15323 - sig { returns(T::Boolean) } - def frozen?; end - - sig { returns(T::Boolean) } - def heredoc?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#15384 - sig { override.returns(String) } - def inspect; end - - # def mutable?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15328 - sig { returns(T::Boolean) } - def mutable?; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#15369 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#15333 - 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#72 - sig { returns(Prism::InterpolatedStringNode) } - def to_interpolated; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#15389 - sig { override.returns(Symbol) } - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#15366 - sig { returns(String) } - def unescaped; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#15394 - 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#15417 -class Prism::SuperNode < ::Prism::Node - # Initialize a new SuperNode node. - # - # @return [SuperNode] a new instance of SuperNode - # - # source://prism//lib/prism/node.rb#15419 - def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block); 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#15538 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15432 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#15488 - def arguments; end - - # attr_reader block: Prism::node? - # - # source://prism//lib/prism/node.rb#15504 - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15437 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15450 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15442 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: Prism::node?) -> SuperNode - # - # source://prism//lib/prism/node.rb#15455 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15437 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::node? } - # - # source://prism//lib/prism/node.rb#15463 - 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#15522 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#15507 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#15468 - def keyword_loc; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#15512 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#15475 - def lparen_loc; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#15517 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#15491 - def rparen_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#15527 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#15532 - def type; end - end -end - -# Flags for symbol nodes. -# -# source://prism//lib/prism/node.rb#16800 -module Prism::SymbolFlags; end - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#16805 -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#16808 -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#16802 -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#15555 -class Prism::SymbolNode < ::Prism::Node - # Initialize a new SymbolNode node. - # - # @return [SymbolNode] a new instance of SymbolNode - # - # source://prism//lib/prism/node.rb#15557 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: T.nilable(Prism::Location), - value_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - unescaped: String - ).void - end - def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); 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#15690 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15569 - 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#15574 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#15669 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#15643 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15584 - 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#15579 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String) -> SymbolNode - # - # source://prism//lib/prism/node.rb#15589 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: T.nilable(Prism::Location), - value_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - unescaped: String - ).returns(Prism::SymbolNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15574 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String } - # - # source://prism//lib/prism/node.rb#15597 - 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#15607 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15612 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15602 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#15674 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#15659 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#15617 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#15679 - sig { override.returns(Symbol) } - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#15656 - sig { returns(String) } - def unescaped; end - - # def value: () -> String? - # - # source://prism//lib/prism/node.rb#15664 - sig { returns(T.nilable(String)) } - def value; end - - # attr_reader value_loc: Location? - # - # source://prism//lib/prism/node.rb#15630 - sig { returns(T.nilable(Prism::Location)) } - def value_loc; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#15684 - def type; end - end -end - -# This represents a token from the Ruby source. -# -# source://prism//lib/prism/parse_result.rb#662 -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#674 - 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#709 - 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#682 - 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 token. - # - # source://prism//lib/prism/parse_result.rb#716 - def inspect; end - - # A Location object representing the location of this token in the source. - # - # source://prism//lib/prism/parse_result.rb#687 - sig { returns(Prism::Location) } - def location; end - - # Implement the pretty print interface for Token. - # - # source://prism//lib/prism/parse_result.rb#694 - 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#668 - sig { returns(Symbol) } - def type; end - - # A byteslice of the source that this token represents. - # - # source://prism//lib/prism/parse_result.rb#671 - 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#664 - 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 - -class Prism::Translation::Parser < Parser::Base - sig { overridable.returns(Integer) } - def version; end -end - -class Prism::Translation::Parser33 < Prism::Translation::Parser - sig { override.returns(Integer) } - def version; end -end - -class Prism::Translation::Parser34 < Prism::Translation::Parser - sig { override.returns(Integer) } - def version; end -end - -# 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_local_variable_read_node(node); end - - # -> { it } - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2229 - def visit_it_parameters_node(node); end - - # foo(bar: baz) - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2234 - def visit_keyword_hash_node(node); end - - # def foo(**bar); end - # ^^^^^ - # - # def foo(**); end - # ^^ - # - # source://prism//lib/prism/translation/ripper.rb#2246 - def visit_keyword_rest_parameter_node(node); end - - # -> {} - # - # source://prism//lib/prism/translation/ripper.rb#2260 - def visit_lambda_node(node); end - - # foo &&= bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2352 - def visit_local_variable_and_write_node(node); end - - # foo += bar - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2338 - def visit_local_variable_operator_write_node(node); end - - # foo ||= bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2366 - def visit_local_variable_or_write_node(node); end - - # foo - # ^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2320 - def visit_local_variable_read_node(node); end - - # foo, = bar - # ^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2380 - def visit_local_variable_target_node(node); end - - # foo = 1 - # ^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2327 - def visit_local_variable_write_node(node); end - - # if /foo/ then end - # ^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2387 - def visit_match_last_line_node(node); end - - # foo in bar - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2402 - def visit_match_predicate_node(node); end - - # foo => bar - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2411 - def visit_match_required_node(node); end - - # /(?<foo>foo)/ =~ bar - # ^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2420 - 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#2426 - def visit_missing_node(node); end - - # module Foo; end - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2432 - def visit_module_node(node); end - - # (foo, bar), bar = qux - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2449 - def visit_multi_target_node(node); end - - # foo, bar = baz - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2503 - def visit_multi_write_node(node); end - - # next - # ^^^^ - # - # next foo - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2523 - def visit_next_node(node); end - - # nil - # ^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2537 - def visit_nil_node(node); end - - # def foo(**nil); end - # ^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2544 - def visit_no_keywords_parameter_node(node); end - - # -> { _1 + _2 } - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2553 - def visit_numbered_parameters_node(node); end - - # $1 - # ^^ - # - # source://prism//lib/prism/translation/ripper.rb#2558 - def visit_numbered_reference_read_node(node); end - - # def foo(bar: baz); end - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2565 - def visit_optional_keyword_parameter_node(node); end - - # def foo(bar = 1); end - # ^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2575 - def visit_optional_parameter_node(node); end - - # a or b - # ^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2585 - def visit_or_node(node); end - - # def foo(bar, *baz); end - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2595 - def visit_parameters_node(node); end - - # () - # ^^ - # - # (1) - # ^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2622 - def visit_parentheses_node(node); end - - # foo => ^(bar) - # ^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2636 - def visit_pinned_expression_node(node); end - - # foo = 1 and bar => ^foo - # ^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2645 - def visit_pinned_variable_node(node); end - - # END {} - # ^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2651 - def visit_post_execution_node(node); end - - # BEGIN {} - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2666 - def visit_pre_execution_node(node); end - - # The top-level program node. - # - # source://prism//lib/prism/translation/ripper.rb#2680 - def visit_program_node(node); end - - # 0..5 - # ^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2691 - def visit_range_node(node); end - - # 1r - # ^^ - # - # source://prism//lib/prism/translation/ripper.rb#2705 - def visit_rational_node(node); end - - # redo - # ^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2711 - def visit_redo_node(node); end - - # /foo/ - # ^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2718 - def visit_regular_expression_node(node); end - - # def foo(bar:); end - # ^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2740 - def visit_required_keyword_parameter_node(node); end - - # def foo(bar); end - # ^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2747 - def visit_required_parameter_node(node); end - - # foo rescue bar - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2754 - def visit_rescue_modifier_node(node); end - - # begin; rescue; end - # ^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2764 - def visit_rescue_node(node); end - - # def foo(*bar); end - # ^^^^ - # - # def foo(*); end - # ^ - # - # source://prism//lib/prism/translation/ripper.rb#2822 - def visit_rest_parameter_node(node); end - - # retry - # ^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2834 - def visit_retry_node(node); end - - # return - # ^^^^^^ - # - # return 1 - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2844 - def visit_return_node(node); end - - # self - # ^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2858 - def visit_self_node(node); end - - # A shareable constant. - # - # source://prism//lib/prism/translation/ripper.rb#2864 - def visit_shareable_constant_node(node); end - - # class << self; end - # ^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2870 - def visit_singleton_class_node(node); end - - # __ENCODING__ - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2880 - def visit_source_encoding_node(node); end - - # __FILE__ - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2887 - def visit_source_file_node(node); end - - # __LINE__ - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2894 - 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#2907 - def visit_splat_node(node); end - - # A list of statements. - # - # source://prism//lib/prism/translation/ripper.rb#2912 - def visit_statements_node(node); end - - # "foo" - # ^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#2929 - def visit_string_node(node); end - - # super(foo) - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3061 - def visit_super_node(node); end - - # :foo - # ^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3082 - def visit_symbol_node(node); end - - # true - # ^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3106 - def visit_true_node(node); end - - # undef foo - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3113 - def visit_undef_node(node); end - - # unless foo; bar end - # ^^^^^^^^^^^^^^^^^^^ - # - # bar unless foo - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3125 - def visit_unless_node(node); end - - # until foo; bar end - # ^^^^^^^^^^^^^^^^^ - # - # bar until foo - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3153 - def visit_until_node(node); end - - # case foo; when bar; end - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3177 - def visit_when_node(node); end - - # while foo; bar end - # ^^^^^^^^^^^^^^^^^^ - # - # bar while foo - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3198 - def visit_while_node(node); end - - # `foo` - # ^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3222 - def visit_x_string_node(node); end - - # yield - # ^^^^^ - # - # yield 1 - # ^^^^^^^ - # - # source://prism//lib/prism/translation/ripper.rb#3245 - def visit_yield_node(node); end - - private - - # :stopdoc: - # - # source://prism//lib/prism/translation/ripper.rb#3389 - def _dispatch_0; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def _dispatch_1(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def _dispatch_2(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def _dispatch_3(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3393 - def _dispatch_4(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3394 - def _dispatch_5(_, _, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3395 - 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#3379 - 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#3417 - 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#3432 - def dedent_string(string, width); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_BEGIN(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_CHAR(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_END(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on___end__(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_alias(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_alias_error(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_aref(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_aref_field(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_arg_ambiguous(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_arg_paren(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_args_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_args_add_block(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_args_add_star(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_args_forward; end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_args_new; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_array(_); end - - # source://prism//lib/prism/translation/ripper.rb#3393 - def on_aryptn(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_assign(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_assign_error(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_assoc_new(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_assoc_splat(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_assoclist_from_args(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_backref(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_backtick(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_bare_assoc_hash(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_begin(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_binary(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_block_var(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_blockarg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3393 - def on_bodystmt(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_brace_block(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_break(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_call(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_case(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_class(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_class_name_error(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_comma(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_command(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3393 - def on_command_call(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_comment(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_const(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_const_path_field(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_const_path_ref(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_const_ref(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_cvar(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_def(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_defined(_); end - - # source://prism//lib/prism/translation/ripper.rb#3394 - def on_defs(_, _, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_do_block(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_dot2(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_dot3(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_dyna_symbol(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_else(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_elsif(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_embdoc(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_embdoc_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_embdoc_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_embexpr_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_embexpr_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_embvar(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_ensure(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_excessed_comma; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_fcall(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_field(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_float(_); end - - # source://prism//lib/prism/translation/ripper.rb#3393 - def on_fndptn(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_for(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_gvar(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_hash(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_heredoc_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_heredoc_dedent(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_heredoc_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_hshptn(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_ident(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_if(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_if_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_ifop(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_ignored_nl(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_ignored_sp(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_imaginary(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_in(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_int(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_ivar(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_kw(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_kwrest_param(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_label(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_label_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_lambda(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_lbrace(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_lbracket(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_lparen(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_magic_comment(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_massign(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_method_add_arg(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_method_add_block(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_mlhs_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_mlhs_add_post(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_mlhs_add_star(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_mlhs_new; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_mlhs_paren(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_module(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_mrhs_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_mrhs_add_star(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_mrhs_new; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_mrhs_new_from_args(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_next(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_nl(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_nokw_param(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_op(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_opassign(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_operator_ambiguous(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_param_error(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3395 - def on_params(_, _, _, _, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_paren(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_parse_error(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_period(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_program(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_qsymbols_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_qsymbols_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_qsymbols_new; end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_qwords_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_qwords_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_qwords_new; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_rational(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_rbrace(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_rbracket(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_redo; end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_regexp_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_regexp_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_regexp_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_regexp_literal(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_regexp_new; end - - # source://prism//lib/prism/translation/ripper.rb#3393 - def on_rescue(_, _, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_rescue_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_rest_param(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_retry; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_return(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_return0; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_rparen(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_sclass(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_semicolon(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_sp(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_stmts_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_stmts_new; end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_string_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_string_concat(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_string_content; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_string_dvar(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_string_embexpr(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_string_literal(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_super(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_symbeg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_symbol(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_symbol_literal(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_symbols_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_symbols_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_symbols_new; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_tlambda(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_tlambeg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_top_const_field(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_top_const_ref(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_tstring_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_tstring_content(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_tstring_end(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_unary(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_undef(_); end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_unless(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_unless_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_until(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_until_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_var_alias(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_var_field(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_var_ref(_); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_vcall(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_void_stmt; end - - # source://prism//lib/prism/translation/ripper.rb#3392 - def on_when(_, _, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_while(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_while_mod(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_word_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_word_new; end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_words_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_words_beg(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_words_new; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_words_sep(_); end - - # source://prism//lib/prism/translation/ripper.rb#3391 - def on_xstring_add(_, _); end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_xstring_literal(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_xstring_new; end - - # source://prism//lib/prism/translation/ripper.rb#3390 - def on_yield(_); end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_yield0; end - - # source://prism//lib/prism/translation/ripper.rb#3389 - def on_zsuper; end - - # Lazily initialize the parse result. - # - # source://prism//lib/prism/translation/ripper.rb#3271 - def result; end - - # Returns true if there is a comma between the two locations. - # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ripper.rb#3284 - 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#2609 - def visit_destructured_parameter_node(node); end - - # Visit a string that is expressed using a <<~ heredoc. - # - # source://prism//lib/prism/translation/ripper.rb#2980 - 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#2955 - def visit_heredoc_node_whitespace(parts); end - - # Visit a heredoc node that is representing a string. - # - # source://prism//lib/prism/translation/ripper.rb#3026 - def visit_heredoc_string_node(node); end - - # Visit a heredoc node that is representing an xstring. - # - # source://prism//lib/prism/translation/ripper.rb#3043 - def visit_heredoc_x_string_node(node); end - - # Visit the targets of a multi-target node. - # - # source://prism//lib/prism/translation/ripper.rb#2462 - 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#3323 - 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#2921 - 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#3296 - 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#3341 - 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#3289 - 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#3408 - 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#3413 - def warning(fmt, *args); end - - class << self - # Tokenizes the Ruby program and returns an array of an array, - # which is formatted like - # <code>[[lineno, column], type, token, state]</code>. - # 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 - -# This module is the entry-point for converting a prism syntax tree into the -# seattlerb/ruby_parser gem's syntax tree. -# -# source://prism//lib/prism/translation/ruby_parser.rb#14 -class Prism::Translation::RubyParser - # Parse the given source and translate it into the seattlerb/ruby_parser - # gem's Sexp format. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1592 - def parse(source, filepath = T.unsafe(nil)); end - - # Parse the given file and translate it into the seattlerb/ruby_parser - # gem's Sexp format. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1598 - def parse_file(filepath); end - - private - - # Translate the given parse result and filepath into the - # seattlerb/ruby_parser gem's Sexp format. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1620 - def translate(result, filepath); end - - class << self - # Parse the given source and translate it into the seattlerb/ruby_parser - # gem's Sexp format. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1605 - def parse(source, filepath = T.unsafe(nil)); end - - # Parse the given file and translate it into the seattlerb/ruby_parser - # gem's Sexp format. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1611 - def parse_file(filepath); end - end -end - -# A prism visitor that builds Sexp objects. -# -# source://prism//lib/prism/translation/ruby_parser.rb#16 -class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler - # Initialize a new compiler with the given file name. - # - # @return [Compiler] a new instance of Compiler - # - # source://prism//lib/prism/translation/ruby_parser.rb#31 - def initialize(file, in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end - - # This is the name of the file that we are compiling. We set it on every - # Sexp object that is generated, and also use it to compile __FILE__ - # nodes. - # - # source://prism//lib/prism/translation/ruby_parser.rb#20 - def file; end - - # Class variables will change their type based on if they are inside of - # a method definition or not, so we need to track that state. - # - # source://prism//lib/prism/translation/ruby_parser.rb#24 - def in_def; end - - # Some nodes will change their representation if they are inside of a - # pattern, so we need to track that state. - # - # source://prism//lib/prism/translation/ruby_parser.rb#28 - def in_pattern; end - - # alias $foo $bar - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#45 - def visit_alias_global_variable_node(node); end - - # alias foo bar - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#39 - def visit_alias_method_node(node); end - - # foo => bar | baz - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#51 - def visit_alternation_pattern_node(node); end - - # a and b - # ^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#57 - def visit_and_node(node); end - - # foo(bar) - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#108 - def visit_arguments_node(node); end - - # [] - # ^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#75 - def visit_array_node(node); end - - # foo => [bar] - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#85 - def visit_array_pattern_node(node); end - - # { a: 1 } - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#114 - def visit_assoc_node(node); end - - # def foo(**); bar(**); end - # ^^ - # - # { **foo } - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#123 - def visit_assoc_splat_node(node); end - - # $+ - # ^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#133 - def visit_back_reference_read_node(node); end - - # begin end - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#139 - def visit_begin_node(node); end - - # foo(&bar) - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#172 - def visit_block_argument_node(node); end - - # foo { |; bar| } - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#180 - def visit_block_local_variable_node(node); end - - # A block on a keyword or method call. - # - # source://prism//lib/prism/translation/ruby_parser.rb#185 - def visit_block_node(node); end - - # def foo(&bar); end - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#191 - def visit_block_parameter_node(node); end - - # A block's parameters. - # - # source://prism//lib/prism/translation/ruby_parser.rb#196 - def visit_block_parameters_node(node); end - - # break - # ^^^^^ - # - # break foo - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#236 - def visit_break_node(node); end - - # foo.bar &&= baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#304 - def visit_call_and_write_node(node); end - - # foo - # ^^^ - # - # foo.bar - # ^^^^^^^ - # - # foo.bar() {} - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#254 - def visit_call_node(node); end - - # foo.bar += baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#294 - def visit_call_operator_write_node(node); end - - # foo.bar ||= baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#314 - def visit_call_or_write_node(node); end - - # foo.bar, = 1 - # ^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#337 - def visit_call_target_node(node); end - - # foo => bar => baz - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#343 - def visit_capture_pattern_node(node); end - - # case foo; in bar; end - # ^^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#355 - def visit_case_match_node(node); end - - # case foo; when bar; end - # ^^^^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#349 - def visit_case_node(node); end - - # class Foo; end - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#361 - def visit_class_node(node); end - - # @@foo &&= bar - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#402 - def visit_class_variable_and_write_node(node); end - - # @@foo += bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#396 - def visit_class_variable_operator_write_node(node); end - - # @@foo ||= bar - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#408 - def visit_class_variable_or_write_node(node); end - - # @@foo - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#381 - def visit_class_variable_read_node(node); end - - # @@foo, = bar - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#414 - def visit_class_variable_target_node(node); end - - # @@foo = 1 - # ^^^^^^^^^ - # - # @@foo, @@bar = 1 - # ^^^^^ ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#390 - def visit_class_variable_write_node(node); end - - # Foo &&= bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#447 - def visit_constant_and_write_node(node); end - - # Foo += bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#441 - def visit_constant_operator_write_node(node); end - - # Foo ||= bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#453 - def visit_constant_or_write_node(node); end - - # Foo::Bar &&= baz - # ^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#490 - def visit_constant_path_and_write_node(node); end - - # Foo::Bar - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#465 - def visit_constant_path_node(node); end - - # Foo::Bar += baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#484 - def visit_constant_path_operator_write_node(node); end - - # Foo::Bar ||= baz - # ^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#496 - def visit_constant_path_or_write_node(node); end - - # Foo::Bar, = baz - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#502 - def visit_constant_path_target_node(node); end - - # Foo::Bar = 1 - # ^^^^^^^^^^^^ - # - # Foo::Foo, Bar::Bar = 1 - # ^^^^^^^^ ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#478 - def visit_constant_path_write_node(node); end - - # Foo - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#426 - def visit_constant_read_node(node); end - - # Foo, = bar - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#459 - def visit_constant_target_node(node); end - - # Foo = 1 - # ^^^^^^^ - # - # Foo, Bar = 1 - # ^^^ ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#435 - def visit_constant_write_node(node); end - - # def foo; end - # ^^^^^^^^^^^^ - # - # def self.foo; end - # ^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#518 - def visit_def_node(node); end - - # defined? a - # ^^^^^^^^^^ - # - # defined?(a) - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#549 - def visit_defined_node(node); end - - # if foo then bar else baz end - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#555 - def visit_else_node(node); end - - # "foo #{bar}" - # ^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#561 - def visit_embedded_statements_node(node); end - - # "foo #@bar" - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#569 - def visit_embedded_variable_node(node); end - - # begin; foo; ensure; bar; end - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#575 - def visit_ensure_node(node); end - - # false - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#581 - def visit_false_node(node); end - - # foo => [*, bar, *] - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#587 - def visit_find_pattern_node(node); end - - # if foo .. bar; end - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#593 - def visit_flip_flop_node(node); end - - # 1.0 - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#603 - def visit_float_node(node); end - - # for foo in bar do end - # ^^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#609 - def visit_for_node(node); end - - # def foo(...); bar(...); end - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#615 - def visit_forwarding_arguments_node(node); end - - # def foo(...); end - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#621 - def visit_forwarding_parameter_node(node); end - - # super - # ^^^^^ - # - # super {} - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#630 - def visit_forwarding_super_node(node); end - - # $foo &&= bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#657 - def visit_global_variable_and_write_node(node); end - - # $foo += bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#651 - def visit_global_variable_operator_write_node(node); end - - # $foo ||= bar - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#663 - def visit_global_variable_or_write_node(node); end - - # $foo - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#636 - def visit_global_variable_read_node(node); end - - # $foo, = bar - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#669 - def visit_global_variable_target_node(node); end - - # $foo = 1 - # ^^^^^^^^ - # - # $foo, $bar = 1 - # ^^^^ ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#645 - def visit_global_variable_write_node(node); end - - # {} - # ^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#675 - def visit_hash_node(node); end - - # foo => {} - # ^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#681 - def visit_hash_pattern_node(node); end - - # if foo then bar end - # ^^^^^^^^^^^^^^^^^^^ - # - # bar if foo - # ^^^^^^^^^^ - # - # foo ? bar : baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#702 - def visit_if_node(node); end - - # 1i - # - # source://prism//lib/prism/translation/ruby_parser.rb#707 - def visit_imaginary_node(node); end - - # { foo: } - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#713 - def visit_implicit_node(node); end - - # foo { |bar,| } - # ^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#718 - def visit_implicit_rest_node(node); end - - # case foo; in bar; end - # ^^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#723 - def visit_in_node(node); end - - # foo[bar] &&= baz - # ^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#749 - def visit_index_and_write_node(node); end - - # foo[bar] += baz - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#736 - def visit_index_operator_write_node(node); end - - # foo[bar] ||= baz - # ^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#762 - def visit_index_or_write_node(node); end - - # foo[bar], = 1 - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#775 - def visit_index_target_node(node); end - - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#805 - def visit_instance_variable_and_write_node(node); end - - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#799 - def visit_instance_variable_operator_write_node(node); end - - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#811 - def visit_instance_variable_or_write_node(node); end - - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#784 - def visit_instance_variable_read_node(node); end - - # @foo, = bar - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#817 - def visit_instance_variable_target_node(node); end - - # ^^^^^^^^ - # - # @foo, @bar = 1 - # ^^^^ ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#793 - def visit_instance_variable_write_node(node); end - - # 1 - # ^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#823 - def visit_integer_node(node); end - - # if /foo #{bar}/ then end - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#829 - def visit_interpolated_match_last_line_node(node); end - - # /foo #{bar}/ - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#846 - def visit_interpolated_regular_expression_node(node); end - - # "foo #{bar}" - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#861 - def visit_interpolated_string_node(node); end - - # :"foo #{bar}" - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#868 - def visit_interpolated_symbol_node(node); end - - # `foo #{bar}` - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#875 - def visit_interpolated_x_string_node(node); end - - # -> { it } - # ^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#947 - def visit_it_local_variable_read_node(node); end - - # foo(bar: baz) - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#953 - def visit_keyword_hash_node(node); end - - # def foo(**bar); end - # ^^^^^ - # - # def foo(**); end - # ^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#962 - def visit_keyword_rest_parameter_node(node); end - - # -> {} - # - # source://prism//lib/prism/translation/ruby_parser.rb#967 - def visit_lambda_node(node); end - - # foo &&= bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1010 - def visit_local_variable_and_write_node(node); end - - # foo += bar - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1004 - def visit_local_variable_operator_write_node(node); end - - # foo ||= bar - # ^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1016 - def visit_local_variable_or_write_node(node); end - - # foo - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#985 - def visit_local_variable_read_node(node); end - - # foo, = bar - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1022 - def visit_local_variable_target_node(node); end - - # foo = 1 - # ^^^^^^^ - # - # foo, bar = 1 - # ^^^ ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#998 - def visit_local_variable_write_node(node); end - - # if /foo/ then end - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1028 - def visit_match_last_line_node(node); end - - # foo in bar - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1034 - def visit_match_predicate_node(node); end - - # foo => bar - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1040 - def visit_match_required_node(node); end - - # /(?<foo>foo)/ =~ bar - # ^^^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1046 - 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/ruby_parser.rb#1053 - def visit_missing_node(node); end - - # module Foo; end - # ^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1059 - def visit_module_node(node); end - - # foo, bar = baz - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1079 - def visit_multi_target_node(node); end - - # foo, bar = baz - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1089 - def visit_multi_write_node(node); end - - # next - # ^^^^ - # - # next foo - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1113 - def visit_next_node(node); end - - # nil - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1126 - def visit_nil_node(node); end - - # def foo(**nil); end - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1132 - def visit_no_keywords_parameter_node(node); end - - # -> { _1 + _2 } - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1138 - def visit_numbered_parameters_node(node); end - - # $1 - # ^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1144 - def visit_numbered_reference_read_node(node); end - - # def foo(bar: baz); end - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1150 - def visit_optional_keyword_parameter_node(node); end - - # def foo(bar = 1); end - # ^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1156 - def visit_optional_parameter_node(node); end - - # a or b - # ^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1162 - def visit_or_node(node); end - - # def foo(bar, *baz); end - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1180 - def visit_parameters_node(node); end - - # () - # ^^ - # - # (1) - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1218 - def visit_parentheses_node(node); end - - # foo => ^(bar) - # ^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1228 - def visit_pinned_expression_node(node); end - - # foo = 1 and bar => ^foo - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1234 - def visit_pinned_variable_node(node); end - - # END {} - # - # source://prism//lib/prism/translation/ruby_parser.rb#1243 - def visit_post_execution_node(node); end - - # BEGIN {} - # - # source://prism//lib/prism/translation/ruby_parser.rb#1248 - def visit_pre_execution_node(node); end - - # The top-level program node. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1253 - def visit_program_node(node); end - - # 0..5 - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1259 - def visit_range_node(node); end - - # 1r - # ^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1281 - def visit_rational_node(node); end - - # redo - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1287 - def visit_redo_node(node); end - - # /foo/ - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1293 - def visit_regular_expression_node(node); end - - # def foo(bar:); end - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1299 - def visit_required_keyword_parameter_node(node); end - - # def foo(bar); end - # ^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1305 - def visit_required_parameter_node(node); end - - # foo rescue bar - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1311 - def visit_rescue_modifier_node(node); end - - # begin; rescue; end - # ^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1317 - def visit_rescue_node(node); end - - # def foo(*bar); end - # ^^^^ - # - # def foo(*); end - # ^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1337 - def visit_rest_parameter_node(node); end - - # retry - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1343 - def visit_retry_node(node); end - - # return - # ^^^^^^ - # - # return 1 - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1352 - def visit_return_node(node); end - - # self - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1365 - def visit_self_node(node); end - - # A shareable constant. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1370 - def visit_shareable_constant_node(node); end - - # class << self; end - # ^^^^^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1376 - def visit_singleton_class_node(node); end - - # __ENCODING__ - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1384 - def visit_source_encoding_node(node); end - - # __FILE__ - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1391 - def visit_source_file_node(node); end - - # __LINE__ - # ^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1397 - def visit_source_line_node(node); end - - # foo(*bar) - # ^^^^ - # - # def foo((bar, *baz)); end - # ^^^^ - # - # def foo(*); bar(*); end - # ^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1409 - def visit_splat_node(node); end - - # A list of statements. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1418 - def visit_statements_node(node); end - - # "foo" - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1430 - def visit_string_node(node); end - - # super(foo) - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1436 - def visit_super_node(node); end - - # :foo - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1450 - def visit_symbol_node(node); end - - # true - # ^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1456 - def visit_true_node(node); end - - # undef foo - # ^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1462 - def visit_undef_node(node); end - - # unless foo; bar end - # ^^^^^^^^^^^^^^^^^^^ - # - # bar unless foo - # ^^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1472 - def visit_unless_node(node); end - - # until foo; bar end - # ^^^^^^^^^^^^^^^^^ - # - # bar until foo - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1481 - def visit_until_node(node); end - - # case foo; when bar; end - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1487 - def visit_when_node(node); end - - # while foo; bar end - # ^^^^^^^^^^^^^^^^^^ - # - # bar while foo - # ^^^^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1496 - def visit_while_node(node); end - - # `foo` - # ^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1502 - def visit_x_string_node(node); end - - # yield - # ^^^^^ - # - # yield 1 - # ^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1518 - def visit_yield_node(node); end - - private - - # If a class variable is written within a method definition, it has a - # different type than everywhere else. - # - # source://prism//lib/prism/translation/ruby_parser.rb#420 - def class_variable_write_type; end - - # Create a new compiler with the given options. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1525 - def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end - - # Call nodes with operators following them will either be op_asgn or - # op_asgn2 nodes. That is determined by their call operator and their - # right-hand side. - # - # @return [Boolean] - # - # source://prism//lib/prism/translation/ruby_parser.rb#325 - def op_asgn?(node); end - - # Call nodes with operators following them can use &. as an operator, - # which changes their type by prefixing "safe_". - # - # source://prism//lib/prism/translation/ruby_parser.rb#331 - def op_asgn_type(node, type); end - - # Create a new Sexp object from the given prism node and arguments. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1530 - def s(node, *arguments); end - - # Visit a block node, which will modify the AST by wrapping the given - # visited node in an iter node. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1540 - def visit_block(node, sexp, block); end - - # def foo((bar, baz)); end - # ^^^^^^^^^^ - # - # source://prism//lib/prism/translation/ruby_parser.rb#1195 - def visit_destructured_parameter(node); end - - # Visit the interpolated content of the string-like node. - # - # source://prism//lib/prism/translation/ruby_parser.rb#882 - def visit_interpolated_parts(parts); end - - # Pattern constants get wrapped in another layer of :const. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1561 - def visit_pattern_constant(node); end - - # If the bounds of a range node are empty parentheses, then they do not - # get replaced by their usual s(:nil), but instead are s(:begin). - # - # source://prism//lib/prism/translation/ruby_parser.rb#1271 - def visit_range_bounds_node(node); end - - # Visit the value of a write, which will be on the right-hand side of - # a write operator. Because implicit arrays can have splats, those could - # potentially be wrapped in an svalue node. - # - # source://prism//lib/prism/translation/ruby_parser.rb#1575 - def visit_write_value(node); end -end - -# Represents the use of the literal `true` keyword. -# -# true -# ^^^^ -# -# source://prism//lib/prism/node.rb#15704 -class Prism::TrueNode < ::Prism::Node - # Initialize a new TrueNode node. - # - # @return [TrueNode] a new instance of TrueNode - # - # source://prism//lib/prism/node.rb#15706 - def initialize(source, node_id, location, flags); 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#15763 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15714 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15719 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15729 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15724 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode - # - # source://prism//lib/prism/node.rb#15734 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15719 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } - # - # source://prism//lib/prism/node.rb#15742 - 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#15747 - sig { override.returns(String) } - def inspect; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#15752 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#15757 - def type; end - end -end - -# Represents the use of the `undef` keyword. -# -# undef :foo, :bar, :baz -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15772 -class Prism::UndefNode < ::Prism::Node - # Initialize a new UndefNode node. - # - # @return [UndefNode] a new instance of UndefNode - # - # source://prism//lib/prism/node.rb#15774 - def initialize(source, node_id, location, flags, names, keyword_loc); 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#15848 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15784 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15789 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15799 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15794 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode - # - # source://prism//lib/prism/node.rb#15804 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15789 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location } - # - # source://prism//lib/prism/node.rb#15812 - 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#15832 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#15827 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#15820 - def keyword_loc; end - - # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] - # - # source://prism//lib/prism/node.rb#15817 - def names; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#15837 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#15842 - 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#15863 -class Prism::UnlessNode < ::Prism::Node - # Initialize a new UnlessNode node. - # - # @return [UnlessNode] a new instance of UnlessNode - # - # source://prism//lib/prism/node.rb#15865 - def initialize(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc); 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#16014 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#15879 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15884 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15898 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15889 - def compact_child_nodes; end - - # Returns the else clause of the unless node. This method is deprecated in - # favor of #else_clause. - # - # source://prism//lib/prism/node_ext.rb#503 - def consequent; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?else_clause: ElseNode?, ?end_keyword_loc: Location?) -> UnlessNode - # - # source://prism//lib/prism/node.rb#15903 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15884 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } - # - # source://prism//lib/prism/node.rb#15911 - def deconstruct_keys(keys); end - - # The else clause of the unless expression, if present. - # - # unless cond then bar else baz end - # ^^^^^^^^ - # - # source://prism//lib/prism/node.rb#15964 - def else_clause; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#15993 - def end_keyword; end - - # The location of the `end` keyword, if present. - # - # unless cond then bar end - # ^^^ - # - # source://prism//lib/prism/node.rb#15970 - 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#15998 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#15983 - def keyword; end - - # The location of the `unless` keyword. - # - # unless cond then bar end - # ^^^^^^ - # - # bar unless cond - # ^^^^^^ - # - # source://prism//lib/prism/node.rb#15922 - def keyword_loc; end - - # source://prism//lib/prism/parse_result/newlines.rb#97 - def newline_flag!(lines); 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#15935 - def predicate; 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#15958 - def statements; end - - # def then_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#15988 - def then_keyword; end - - # The location of the `then` keyword, if present. - # - # unless cond then bar end - # ^^^^ - # - # source://prism//lib/prism/node.rb#15941 - def then_keyword_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#16003 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#16008 - 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#16032 -class Prism::UntilNode < ::Prism::Node - # Initialize a new UntilNode node. - # - # @return [UntilNode] a new instance of UntilNode - # - # source://prism//lib/prism/node.rb#16034 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - closing_loc: T.nilable(Prism::Location), - predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode) - ).void - end - def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); 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#16139 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16046 - 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#16082 - sig { returns(T::Boolean) } - def begin_modifier?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16051 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#16118 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#16094 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16064 - 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#16056 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode - # - # source://prism//lib/prism/node.rb#16069 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - closing_loc: T.nilable(Prism::Location), - predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode) - ).returns(Prism::UntilNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16051 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } - # - # source://prism//lib/prism/node.rb#16077 - 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#16123 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16113 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16087 - sig { returns(Prism::Location) } - def keyword_loc; end - - # source://prism//lib/prism/parse_result/newlines.rb#103 - def newline_flag!(lines); end - - # attr_reader predicate: Prism::node - # - # source://prism//lib/prism/node.rb#16107 - sig { returns(Prism::Node) } - def predicate; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#16110 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#16128 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#16133 - 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 ItLocalVariableReadNode node - # - # source://prism//lib/prism/visitor.rb#29 - sig { params(node: Prism::ItLocalVariableReadNode).void } - def visit_it_local_variable_read_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#16155 -class Prism::WhenNode < ::Prism::Node - # Initialize a new WhenNode node. - # - # @return [WhenNode] a new instance of WhenNode - # - # source://prism//lib/prism/node.rb#16157 - def initialize(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements); 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#16257 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16169 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16174 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16187 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16179 - def compact_child_nodes; end - - # attr_reader conditions: Array[Prism::node] - # - # source://prism//lib/prism/node.rb#16212 - def conditions; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode - # - # source://prism//lib/prism/node.rb#16192 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16174 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } - # - # source://prism//lib/prism/node.rb#16200 - 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#16241 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16231 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16205 - def keyword_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#16228 - def statements; end - - # def then_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#16236 - def then_keyword; end - - # attr_reader then_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#16215 - def then_keyword_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#16246 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#16251 - 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#16274 -class Prism::WhileNode < ::Prism::Node - # Initialize a new WhileNode node. - # - # @return [WhileNode] a new instance of WhileNode - # - # source://prism//lib/prism/node.rb#16276 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - closing_loc: T.nilable(Prism::Location), - predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode) - ).void - end - def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); 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#16381 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16288 - 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#16324 - sig { returns(T::Boolean) } - def begin_modifier?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16293 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#16360 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#16336 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16306 - 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#16298 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode - # - # source://prism//lib/prism/node.rb#16311 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - keyword_loc: Prism::Location, - closing_loc: T.nilable(Prism::Location), - predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode) - ).returns(Prism::WhileNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16293 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } - # - # source://prism//lib/prism/node.rb#16319 - 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#16365 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16355 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16329 - sig { returns(Prism::Location) } - def keyword_loc; end - - # source://prism//lib/prism/parse_result/newlines.rb#109 - def newline_flag!(lines); end - - # attr_reader predicate: Prism::node - # - # source://prism//lib/prism/node.rb#16349 - sig { returns(Prism::Node) } - def predicate; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#16352 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#16370 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#16375 - def type; end - end -end - -# Represents an xstring literal with no interpolation. -# -# `foo` -# ^^^^^ -# -# source://prism//lib/prism/node.rb#16395 -class Prism::XStringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # Initialize a new XStringNode node. - # - # @return [XStringNode] a new instance of XStringNode - # - # source://prism//lib/prism/node.rb#16397 - sig do - params( - source: Prism::Source, - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String - ).void - end - def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); 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#16507 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16409 - 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#16414 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#16486 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#16466 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16424 - 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#16419 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#16481 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#16459 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode - # - # source://prism//lib/prism/node.rb#16429 - sig do - params( - node_id: Integer, - location: Prism::Location, - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String - ).returns(Prism::XStringNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16414 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } - # - # source://prism//lib/prism/node.rb#16437 - 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#16447 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16442 - 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#16491 - sig { override.returns(String) } - def inspect; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#16476 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#16452 - 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#90 - sig { returns(Prism::InterpolatedXStringNode) } - def to_interpolated; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#16496 - sig { override.returns(Symbol) } - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#16473 - sig { returns(String) } - def unescaped; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#16501 - def type; end - end -end - -# Represents the use of the `yield` keyword. -# -# yield 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#16521 -class Prism::YieldNode < ::Prism::Node - # Initialize a new YieldNode node. - # - # @return [YieldNode] a new instance of YieldNode - # - # source://prism//lib/prism/node.rb#16523 - def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc); 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#16637 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#16535 - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#16590 - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16540 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16552 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16545 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode - # - # source://prism//lib/prism/node.rb#16557 - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16540 - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } - # - # source://prism//lib/prism/node.rb#16565 - 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#16621 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16606 - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16570 - def keyword_loc; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#16611 - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#16577 - def lparen_loc; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#16616 - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#16593 - def rparen_loc; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism//lib/prism/node.rb#16626 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism//lib/prism/node.rb#16631 - def type; end - end -end diff --git a/tools/ruby-tools/sorbet/rbi/gems/rbi@0.2.0.rbi b/tools/ruby-tools/sorbet/rbi/gems/rbi@0.2.0.rbi deleted file mode 100644 index 0e83a15..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/rbi@0.2.0.rbi +++ /dev/null @@ -1,4105 +0,0 @@ -# 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.rb#7 -module RBI; end - -# source://rbi//lib/rbi/model.rb#1045 -class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1057 - sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(value, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#1063 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#1068 - sig { returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#1049 - 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#351 -class RBI::Attr < ::RBI::NodeWithComments - include ::RBI::Indexable - - abstract! - - # source://rbi//lib/rbi/model.rb#376 - 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/rewriters/merge_trees.rb#420 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # @abstract - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#61 - sig { abstract.returns(T::Array[::RBI::Method]) } - def convert_to_methods; end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#384 - 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#428 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#358 - sig { returns(T::Array[::Symbol]) } - def names; end - - # source://rbi//lib/rbi/model.rb#364 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # source://rbi//lib/rbi/model.rb#361 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#361 - def visibility=(_arg0); end - - private - - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#89 - sig do - params( - name: ::String, - sig: T.nilable(::RBI::Sig), - visibility: ::RBI::Visibility, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).returns(::RBI::Method) - end - def create_getter_method(name, sig, visibility, loc, comments); end - - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#110 - sig do - params( - name: ::String, - sig: T.nilable(::RBI::Sig), - attribute_type: T.nilable(T.any(::RBI::Type, ::String)), - visibility: ::RBI::Visibility, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).returns(::RBI::Method) - end - def create_setter_method(name, sig, attribute_type, visibility, loc, comments); end - - # @raise [UnexpectedMultipleSigsError] - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#66 - sig(:final) { returns([T.nilable(::RBI::Sig), T.nilable(T.any(::RBI::Type, ::String))]) } - def parse_sig; end -end - -# source://rbi//lib/rbi/model.rb#387 -class RBI::AttrAccessor < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#401 - 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#460 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#140 - sig { override.returns(T::Array[::RBI::Method]) } - def convert_to_methods; end - - # source://rbi//lib/rbi/model.rb#407 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#413 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#419 -class RBI::AttrReader < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#433 - 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#442 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#154 - sig { override.returns(T::Array[::RBI::Method]) } - def convert_to_methods; end - - # source://rbi//lib/rbi/model.rb#439 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#445 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#451 -class RBI::AttrWriter < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#465 - 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#451 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#163 - sig { override.returns(T::Array[::RBI::Method]) } - def convert_to_methods; end - - # source://rbi//lib/rbi/model.rb#471 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#477 - 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#76 -class RBI::BlankLine < ::RBI::Comment - # source://rbi//lib/rbi/model.rb#80 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/model.rb#816 -class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#827 - 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#838 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#833 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#220 -class RBI::Class < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#238 - 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#384 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#246 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#224 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#224 - def name=(_arg0); end - - # source://rbi//lib/rbi/model.rb#227 - sig { returns(T.nilable(::String)) } - def superclass_name; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#227 - def superclass_name=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#55 -class RBI::Comment < ::RBI::Node - # source://rbi//lib/rbi/model.rb#62 - sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(text, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#68 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#59 - sig { returns(::String) } - def text; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#59 - 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#583 -class RBI::ConflictTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 - 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#587 - sig { returns(::RBI::Tree) } - def left; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#590 - sig { returns(::String) } - def left_name; end - - # @return [Tree] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#587 - def right; end - - # @return [String] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#590 - def right_name; end -end - -# Consts -# -# source://rbi//lib/rbi/model.rb#314 -class RBI::Const < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#329 - 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/rewriters/merge_trees.rb#411 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#337 - 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#318 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#344 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#318 - def value; end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#351 -class RBI::DuplicateNodeError < ::RBI::Error; end - -# source://rbi//lib/rbi.rb#8 -class RBI::Error < ::StandardError; end - -# source://rbi//lib/rbi/model.rb#891 -class RBI::Extend < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#903 - 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#510 - 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#909 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#139 -class RBI::File - # source://rbi//lib/rbi/model.rb#158 - 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#166 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi//lib/rbi/model.rb#149 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array<Comment>] - # - # source://rbi//lib/rbi/model.rb#149 - def comments=(_arg0); end - - # source://rbi//lib/rbi/model.rb#171 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/printer.rb#743 - 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#143 - sig { returns(::RBI::Tree) } - def root; end - - # @return [Tree] - # - # source://rbi//lib/rbi/model.rb#143 - def root=(_arg0); end - - # source://rbi//lib/rbi/model.rb#146 - sig { returns(T.nilable(::String)) } - def strictness; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#146 - def strictness=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#749 - sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/formatter.rb#5 -class RBI::Formatter - # source://rbi//lib/rbi/formatter.rb#24 - 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_members: 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_members: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - - # source://rbi//lib/rbi/formatter.rb#47 - sig { params(file: ::RBI::File).void } - def format_file(file); end - - # source://rbi//lib/rbi/formatter.rb#52 - sig { params(tree: ::RBI::Tree).void } - def format_tree(tree); end - - # source://rbi//lib/rbi/formatter.rb#12 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/formatter.rb#12 - def max_line_length=(_arg0); end - - # source://rbi//lib/rbi/formatter.rb#41 - 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#87 -class RBI::Group < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/group_nodes.rb#94 - sig { params(kind: ::RBI::Group::Kind).void } - def initialize(kind); end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#91 - sig { returns(::RBI::Group::Kind) } - def kind; end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#99 -class RBI::Group::Kind < ::T::Enum - enums do - Attrs = new - Consts = new - Helpers = new - Inits = new - Methods = new - MixesInClassMethods = new - Mixins = new - RequiredAncestors = new - Sends = new - SingletonClasses = new - TEnums = new - TStructFields = new - TypeMembers = new - end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#5 -class RBI::GroupNodesError < ::RBI::Error; end - -# Sorbet's misc. -# -# source://rbi//lib/rbi/model.rb#1374 -class RBI::Helper < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1388 - 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/rewriters/merge_trees.rb#528 - 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#1378 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1395 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#868 -class RBI::Include < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#880 - 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#501 - 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#886 - 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#1073 -class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1086 - 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#1092 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#1077 - sig { returns(::String) } - def keyword; end - - # source://rbi//lib/rbi/model.rb#1097 - sig { returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#757 -class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#772 - 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#784 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#779 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#761 - sig { returns(::String) } - def value; end -end - -# source://rbi//lib/rbi/model.rb#730 -class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#741 - 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#752 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#747 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#789 -class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#800 - 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#811 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#806 - 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#485 -class RBI::Method < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#515 - 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#535 - sig { params(param: ::RBI::Param).void } - def <<(param); end - - # source://rbi//lib/rbi/model.rb#570 - sig { params(name: ::String).void } - def add_block_param(name); end - - # source://rbi//lib/rbi/model.rb#560 - sig { params(name: ::String, default_value: ::String).void } - def add_kw_opt_param(name, default_value); end - - # source://rbi//lib/rbi/model.rb#555 - sig { params(name: ::String).void } - def add_kw_param(name); end - - # source://rbi//lib/rbi/model.rb#565 - sig { params(name: ::String).void } - def add_kw_rest_param(name); end - - # source://rbi//lib/rbi/model.rb#545 - sig { params(name: ::String, default_value: ::String).void } - def add_opt_param(name, default_value); end - - # source://rbi//lib/rbi/model.rb#540 - sig { params(name: ::String).void } - def add_param(name); end - - # source://rbi//lib/rbi/model.rb#550 - sig { params(name: ::String).void } - def add_rest_param(name); end - - # source://rbi//lib/rbi/model.rb#587 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.any(::RBI::Type, ::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#469 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#613 - 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/model.rb#495 - sig { returns(T::Boolean) } - def is_singleton; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#495 - def is_singleton=(_arg0); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#478 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#489 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#489 - def name=(_arg0); end - - # source://rbi//lib/rbi/model.rb#492 - sig { returns(T::Array[::RBI::Param]) } - def params; end - - # source://rbi//lib/rbi/model.rb#501 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # @return [Array<Sig>] - # - # source://rbi//lib/rbi/model.rb#501 - def sigs=(_arg0); end - - # source://rbi//lib/rbi/model.rb#622 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#498 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#498 - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1435 -class RBI::MixesInClassMethods < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1447 - 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#519 - 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#1453 - 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#845 -class RBI::Mixin < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#862 - 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/rewriters/merge_trees.rb#492 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#852 - sig { returns(T::Array[::String]) } - def names; end -end - -# source://rbi//lib/rbi/model.rb#192 -class RBI::Module < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#206 - 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#393 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#213 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#196 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#196 - def name=(_arg0); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#7 -class RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#20 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); 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#26 - sig { void } - def detach; end - - # source://rbi//lib/rbi/model.rb#17 - sig { returns(T.nilable(::RBI::Loc)) } - def loc; end - - # @return [Loc, nil] - # - # source://rbi//lib/rbi/model.rb#17 - 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/rewriters/merge_trees.rb#296 - sig { returns(T.nilable(::RBI::ConflictTree)) } - def parent_conflict_tree; end - - # source://rbi//lib/rbi/model.rb#48 - sig { returns(T.nilable(::RBI::Scope)) } - def parent_scope; end - - # source://rbi//lib/rbi/model.rb#14 - sig { returns(T.nilable(::RBI::Tree)) } - def parent_tree; end - - # @return [Tree, nil] - # - # source://rbi//lib/rbi/model.rb#14 - def parent_tree=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#767 - 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 - - # @raise [ReplaceNodeError] - # - # source://rbi//lib/rbi/model.rb#35 - 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#773 - 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#85 -class RBI::NodeWithComments < ::RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#95 - 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#101 - sig { returns(T::Array[::String]) } - def annotations; end - - # source://rbi//lib/rbi/model.rb#92 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array<Comment>] - # - # source://rbi//lib/rbi/model.rb#92 - 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/rewriters/filter_versions.rb#104 - sig { returns(T::Array[::Gem::Requirement]) } - def version_requirements; end -end - -# source://rbi//lib/rbi/model.rb#676 -class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#691 - 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#698 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#680 - 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#627 -class RBI::Param < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#643 - 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/model.rb#634 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#649 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/parser.rb#7 -class RBI::ParseError < ::RBI::Error - # 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#828 -class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#835 - sig { params(content: ::String, file: ::String).void } - def initialize(content, file:); end - - # source://rbi//lib/rbi/parser.rb#832 - sig { returns(::RBI::Sig) } - def current; end - - # source://rbi//lib/rbi/parser.rb#887 - sig { override.params(node: ::Prism::AssocNode).void } - def visit_assoc_node(node); end - - # source://rbi//lib/rbi/parser.rb#842 - 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#324 - sig { params(node: ::Prism::CallNode).void } - def visit_call_node(node); end - - # source://rbi//lib/rbi/parser.rb#175 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end - - # source://rbi//lib/rbi/parser.rb#224 - sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } - def visit_constant_assign(node); end - - # source://rbi//lib/rbi/parser.rb#217 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # source://rbi//lib/rbi/parser.rb#210 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # source://rbi//lib/rbi/parser.rb#257 - sig { override.params(node: ::Prism::DefNode).void } - def visit_def_node(node); end - - # source://rbi//lib/rbi/parser.rb#278 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end - - # source://rbi//lib/rbi/parser.rb#296 - sig { override.params(node: ::Prism::ProgramNode).void } - def visit_program_node(node); end - - # source://rbi//lib/rbi/parser.rb#307 - 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#503 - 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#521 - sig { void } - def collect_orphan_comments; end - - # source://rbi//lib/rbi/parser.rb#544 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/parser.rb#549 - sig { returns(T::Array[::RBI::Sig]) } - def current_sigs; end - - # source://rbi//lib/rbi/parser.rb#556 - sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } - def detach_comments_from_sigs(sigs); end - - # source://rbi//lib/rbi/parser.rb#568 - sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } - def node_comments(node); end - - # source://rbi//lib/rbi/parser.rb#586 - sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } - def parse_comment(node); end - - # source://rbi//lib/rbi/parser.rb#615 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } - def parse_params(node); end - - # source://rbi//lib/rbi/parser.rb#591 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } - def parse_send_args(node); end - - # source://rbi//lib/rbi/parser.rb#689 - sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } - def parse_sig(node); end - - # source://rbi//lib/rbi/parser.rb#698 - 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#748 - sig { params(send: ::Prism::CallNode).void } - def parse_tstruct_field(send); end - - # source://rbi//lib/rbi/parser.rb#785 - sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } - def parse_visibility(name, node); end - - # source://rbi//lib/rbi/parser.rb#799 - sig { void } - def separate_header_comments; end - - # source://rbi//lib/rbi/parser.rb#809 - sig { void } - def set_root_tree_loc; end - - # source://rbi//lib/rbi/parser.rb#823 - 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#7 -class RBI::Printer < ::RBI::Visitor - # source://rbi//lib/rbi/printer.rb#30 - 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#17 - sig { returns(::Integer) } - def current_indent; end - - # source://rbi//lib/rbi/printer.rb#48 - sig { void } - def dedent; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#11 - def in_visibility_group; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#11 - def in_visibility_group=(_arg0); end - - # Printing - # - # source://rbi//lib/rbi/printer.rb#43 - sig { void } - def indent; end - - # source://rbi//lib/rbi/printer.rb#20 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # source://rbi//lib/rbi/printer.rb#14 - 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#54 - sig { params(string: ::String).void } - def print(string); end - - # source://rbi//lib/rbi/printer.rb#11 - sig { returns(T::Boolean) } - def print_locs; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#11 - def print_locs=(_arg0); end - - # Print a string with indentation and `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#74 - 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#60 - 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#67 - sig { params(string: T.nilable(::String)).void } - def printt(string = T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#80 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - # source://rbi//lib/rbi/printer.rb#91 - sig { override.params(file: ::RBI::File).void } - def visit_file(file); end - - private - - # source://rbi//lib/rbi/printer.rb#618 - sig { params(node: ::RBI::Node).returns(T::Boolean) } - def oneline?(node); end - - # source://rbi//lib/rbi/printer.rb#576 - sig { params(node: ::RBI::Node).void } - def print_blank_line_before(node); end - - # source://rbi//lib/rbi/printer.rb#586 - sig { params(node: ::RBI::Node).void } - def print_loc(node); end - - # source://rbi//lib/rbi/printer.rb#592 - sig { params(node: ::RBI::Param, last: T::Boolean).void } - def print_param_comment_leading_space(node, last:); end - - # source://rbi//lib/rbi/printer.rb#665 - sig { params(node: ::RBI::Sig).void } - def print_sig_as_block(node); end - - # source://rbi//lib/rbi/printer.rb#640 - sig { params(node: ::RBI::Sig).void } - def print_sig_as_line(node); end - - # source://rbi//lib/rbi/printer.rb#610 - sig { params(node: ::RBI::SigParam, last: T::Boolean).void } - def print_sig_param_comment_leading_space(node, last:); end - - # source://rbi//lib/rbi/printer.rb#721 - sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } - def sig_modifiers(node); end - - # source://rbi//lib/rbi/printer.rb#417 - sig { override.params(node: ::RBI::Arg).void } - def visit_arg(node); end - - # source://rbi//lib/rbi/printer.rb#237 - sig { params(node: ::RBI::Attr).void } - def visit_attr(node); end - - # source://rbi//lib/rbi/printer.rb#222 - sig { override.params(node: ::RBI::AttrAccessor).void } - def visit_attr_accessor(node); end - - # source://rbi//lib/rbi/printer.rb#227 - sig { override.params(node: ::RBI::AttrReader).void } - def visit_attr_reader(node); end - - # source://rbi//lib/rbi/printer.rb#232 - sig { override.params(node: ::RBI::AttrWriter).void } - def visit_attr_writer(node); end - - # source://rbi//lib/rbi/printer.rb#126 - sig { override.params(node: ::RBI::BlankLine).void } - def visit_blank_line(node); end - - # source://rbi//lib/rbi/printer.rb#344 - sig { override.params(node: ::RBI::BlockParam).void } - def visit_block_param(node); end - - # source://rbi//lib/rbi/printer.rb#143 - sig { override.params(node: ::RBI::Class).void } - def visit_class(node); end - - # source://rbi//lib/rbi/printer.rb#110 - sig { override.params(node: ::RBI::Comment).void } - def visit_comment(node); end - - # source://rbi//lib/rbi/printer.rb#553 - sig { override.params(node: ::RBI::ConflictTree).void } - def visit_conflict_tree(node); end - - # source://rbi//lib/rbi/printer.rb#213 - sig { override.params(node: ::RBI::Const).void } - def visit_const(node); end - - # source://rbi//lib/rbi/printer.rb#354 - sig { override.params(node: ::RBI::Extend).void } - def visit_extend(node); end - - # source://rbi//lib/rbi/printer.rb#525 - sig { override.params(node: ::RBI::Group).void } - def visit_group(node); end - - # source://rbi//lib/rbi/printer.rb#511 - sig { override.params(node: ::RBI::Helper).void } - def visit_helper(node); end - - # source://rbi//lib/rbi/printer.rb#349 - sig { override.params(node: ::RBI::Include).void } - def visit_include(node); end - - # source://rbi//lib/rbi/printer.rb#422 - sig { override.params(node: ::RBI::KwArg).void } - def visit_kw_arg(node); end - - # source://rbi//lib/rbi/printer.rb#334 - sig { override.params(node: ::RBI::KwOptParam).void } - def visit_kw_opt_param(node); end - - # source://rbi//lib/rbi/printer.rb#329 - sig { override.params(node: ::RBI::KwParam).void } - def visit_kw_param(node); end - - # source://rbi//lib/rbi/printer.rb#339 - sig { override.params(node: ::RBI::KwRestParam).void } - def visit_kw_rest_param(node); end - - # source://rbi//lib/rbi/printer.rb#265 - sig { override.params(node: ::RBI::Method).void } - def visit_method(node); end - - # source://rbi//lib/rbi/printer.rb#520 - sig { override.params(node: ::RBI::MixesInClassMethods).void } - def visit_mixes_in_class_methods(node); end - - # source://rbi//lib/rbi/printer.rb#359 - sig { params(node: ::RBI::Mixin).void } - def visit_mixin(node); end - - # source://rbi//lib/rbi/printer.rb#138 - sig { override.params(node: ::RBI::Module).void } - def visit_module(node); end - - # source://rbi//lib/rbi/printer.rb#319 - sig { override.params(node: ::RBI::OptParam).void } - def visit_opt_param(node); end - - # source://rbi//lib/rbi/printer.rb#386 - sig { override.params(node: ::RBI::Private).void } - def visit_private(node); end - - # source://rbi//lib/rbi/printer.rb#381 - sig { override.params(node: ::RBI::Protected).void } - def visit_protected(node); end - - # source://rbi//lib/rbi/printer.rb#376 - sig { override.params(node: ::RBI::Public).void } - def visit_public(node); end - - # source://rbi//lib/rbi/printer.rb#314 - sig { override.params(node: ::RBI::ReqParam).void } - def visit_req_param(node); end - - # source://rbi//lib/rbi/printer.rb#544 - sig { override.params(node: ::RBI::RequiresAncestor).void } - def visit_requires_ancestor(node); end - - # source://rbi//lib/rbi/printer.rb#324 - sig { override.params(node: ::RBI::RestParam).void } - def visit_rest_param(node); end - - # source://rbi//lib/rbi/printer.rb#158 - sig { params(node: ::RBI::Scope).void } - def visit_scope(node); end - - # source://rbi//lib/rbi/printer.rb#203 - sig { params(node: ::RBI::Scope).void } - def visit_scope_body(node); end - - # source://rbi//lib/rbi/printer.rb#562 - sig { override.params(node: ::RBI::ScopeConflict).void } - def visit_scope_conflict(node); end - - # source://rbi//lib/rbi/printer.rb#168 - sig { params(node: ::RBI::Scope).void } - def visit_scope_header(node); end - - # source://rbi//lib/rbi/printer.rb#400 - sig { override.params(node: ::RBI::Send).void } - def visit_send(node); end - - # source://rbi//lib/rbi/printer.rb#427 - sig { override.params(node: ::RBI::Sig).void } - def visit_sig(node); end - - # source://rbi//lib/rbi/printer.rb#447 - sig { override.params(node: ::RBI::SigParam).void } - def visit_sig_param(node); end - - # source://rbi//lib/rbi/printer.rb#153 - sig { override.params(node: ::RBI::SingletonClass).void } - def visit_singleton_class(node); end - - # source://rbi//lib/rbi/printer.rb#148 - sig { override.params(node: ::RBI::Struct).void } - def visit_struct(node); end - - # source://rbi//lib/rbi/printer.rb#467 - sig { params(node: ::RBI::TStructField).void } - def visit_t_struct_field(node); end - - # source://rbi//lib/rbi/printer.rb#485 - sig { override.params(node: ::RBI::TEnum).void } - def visit_tenum(node); end - - # source://rbi//lib/rbi/printer.rb#490 - sig { override.params(node: ::RBI::TEnumBlock).void } - def visit_tenum_block(node); end - - # source://rbi//lib/rbi/printer.rb#131 - sig { override.params(node: ::RBI::Tree).void } - def visit_tree(node); end - - # source://rbi//lib/rbi/printer.rb#452 - sig { override.params(node: ::RBI::TStruct).void } - def visit_tstruct(node); end - - # source://rbi//lib/rbi/printer.rb#457 - sig { override.params(node: ::RBI::TStructConst).void } - def visit_tstruct_const(node); end - - # source://rbi//lib/rbi/printer.rb#462 - sig { override.params(node: ::RBI::TStructProp).void } - def visit_tstruct_prop(node); end - - # source://rbi//lib/rbi/printer.rb#502 - sig { override.params(node: ::RBI::TypeMember).void } - def visit_type_member(node); end - - # source://rbi//lib/rbi/printer.rb#391 - sig { params(node: ::RBI::Visibility).void } - def visit_visibility(node); end - - # source://rbi//lib/rbi/printer.rb#531 - sig { override.params(node: ::RBI::VisibilityGroup).void } - def visit_visibility_group(node); end -end - -# source://rbi//lib/rbi/printer.rb#5 -class RBI::PrinterError < ::RBI::Error; end - -# source://rbi//lib/rbi/model.rb#986 -class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#996 - 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#970 -class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#980 - 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#954 -class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#964 - 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#5 -class RBI::ReplaceNodeError < ::RBI::Error; end - -# source://rbi//lib/rbi/model.rb#654 -class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#665 - 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#671 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end -end - -# source://rbi//lib/rbi/model.rb#1458 -class RBI::RequiresAncestor < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1471 - 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/index.rb#163 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1462 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1477 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#703 -class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#714 - 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#725 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#720 - 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/attr_to_methods.rb#22 -class RBI::Rewriters::AttrToMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#26 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # @raise [ReplaceNodeError] - # - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#39 - sig { params(node: ::RBI::Node, with: T::Array[::RBI::Node]).void } - def replace(node, with:); 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) - -# Rewrite non-singleton methods inside singleton classes to singleton methods -# -# Example: -# ~~~rb -# class << self -# def m1; end -# def self.m2; end -# -# class << self -# def m3; end -# end -# end -# ~~~ -# -# will be rewritten to: -# -# ~~~rb -# def self.m1; end -# -# class << self -# def self.m2; end -# def self.m3; end -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#30 -class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#34 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Flattens visibility nodes into method nodes -# -# Example: -# ~~~rb -# class A -# def m1; end -# private -# def m2; end -# def m3; end -# end -# ~~~ -# -# will be transformed into: -# -# ~~~rb -# class A -# def m1; end -# private def m2; end -# private def m3; end -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#27 -class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#31 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#38 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#8 -class RBI::Rewriters::GroupNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/group_nodes.rb#12 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#36 - sig { params(node: ::RBI::Node).returns(::RBI::Group::Kind) } - def group_kind(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.11554/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 - LEFT = new - NONE = 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_members.rb#6 -class RBI::Rewriters::NestNonPublicMembers < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_non_public_members.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 - -# This rewriter moves top-level members into a top-level Object class -# -# Example: -# ~~~rb -# def foo; end -# attr_reader :bar -# ~~~ -# -# will be rewritten to: -# -# ~~~rb -# class Object -# def foo; end -# attr_reader :bar -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#22 -class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#26 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#33 - 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.11554/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#178 -class RBI::Scope < ::RBI::Tree - include ::RBI::Indexable - - abstract! - - # Duplicate `self` scope without its body - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#358 - sig { returns(T.self_type) } - def dup_empty; end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#184 - 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/model.rb#187 - 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#616 -class RBI::ScopeConflict < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#633 - 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#620 - sig { returns(::RBI::Scope) } - def left; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#623 - sig { returns(::String) } - def left_name; end - - # @return [Scope] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#620 - def right; end - - # @return [String] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#623 - def right_name; end -end - -# Sends -# -# source://rbi//lib/rbi/model.rb#1004 -class RBI::Send < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1022 - 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#1030 - sig { params(arg: ::RBI::Arg).void } - def <<(arg); end - - # source://rbi//lib/rbi/model.rb#1035 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#1011 - sig { returns(T::Array[::RBI::Arg]) } - def args; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#537 - 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#1008 - sig { returns(::String) } - def method; end - - # source://rbi//lib/rbi/model.rb#1040 - sig { returns(::String) } - def to_s; end -end - -# Sorbet's sigs -# -# source://rbi//lib/rbi/model.rb#1104 -class RBI::Sig < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1137 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.any(::RBI::Type, ::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), - comments: T::Array[::RBI::Comment], - 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), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1163 - sig { params(param: ::RBI::SigParam).void } - def <<(param); end - - # source://rbi//lib/rbi/model.rb#1173 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#1168 - sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } - def add_param(name, type); end - - # source://rbi//lib/rbi/model.rb#1120 - sig { returns(T.nilable(::Symbol)) } - def checked; end - - # @return [Symbol, nil] - # - # source://rbi//lib/rbi/model.rb#1120 - def checked=(_arg0); end - - # source://rbi//lib/rbi/model.rb#1114 - sig { returns(T::Boolean) } - def is_abstract; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1114 - def is_abstract=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1114 - def is_final; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1114 - def is_final=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1114 - def is_overridable; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1114 - def is_overridable=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1114 - def is_override; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1114 - def is_override=(_arg0); end - - # source://rbi//lib/rbi/model.rb#1108 - sig { returns(T::Array[::RBI::SigParam]) } - def params; end - - # source://rbi//lib/rbi/model.rb#1111 - sig { returns(T.any(::RBI::Type, ::String)) } - def return_type; end - - # @return [Type, String] - # - # source://rbi//lib/rbi/model.rb#1111 - def return_type=(_arg0); end - - # source://rbi//lib/rbi/model.rb#1117 - sig { returns(T::Array[::String]) } - def type_params; end -end - -# source://rbi//lib/rbi/model.rb#1182 -class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1200 - sig do - params( - name: ::String, - type: T.any(::RBI::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#1208 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#1186 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1189 - sig { returns(T.any(::RBI::Type, ::String)) } - def type; end -end - -# source://rbi//lib/rbi/model.rb#253 -class RBI::SingletonClass < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#263 - 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#269 - sig { override.returns(::String) } - def fully_qualified_name; end -end - -# source://rbi//lib/rbi/model.rb#274 -class RBI::Struct < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#296 - 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#402 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#305 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#284 - sig { returns(T::Boolean) } - def keyword_init; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#284 - def keyword_init=(_arg0); end - - # source://rbi//lib/rbi/model.rb#281 - sig { returns(T::Array[::Symbol]) } - def members; end - - # @return [Array<Symbol>] - # - # source://rbi//lib/rbi/model.rb#281 - def members=(_arg0); end - - # source://rbi//lib/rbi/model.rb#278 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#278 - def name=(_arg0); end -end - -# Sorbet's T::Enum -# -# source://rbi//lib/rbi/model.rb#1329 -class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1340 - 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#1346 -class RBI::TEnumBlock < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#1356 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1362 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#223 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1367 - sig { override.returns(::String) } - def to_s; end -end - -# Sorbet's T::Struct -# -# source://rbi//lib/rbi/model.rb#1215 -class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1226 - 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#1267 -class RBI::TStructConst < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1280 - sig do - params( - name: ::String, - type: T.any(::RBI::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#555 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1286 - 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#1292 - 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#1232 -class RBI::TStructField < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#1256 - sig do - params( - name: ::String, - type: T.any(::RBI::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/rewriters/merge_trees.rb#546 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1245 - sig { returns(T.nilable(::String)) } - def default; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#1245 - def default=(_arg0); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#1264 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#1239 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1239 - def name=(_arg0); end - - # source://rbi//lib/rbi/model.rb#1242 - sig { returns(T.any(::RBI::Type, ::String)) } - def type; end - - # @return [Type, String] - # - # source://rbi//lib/rbi/model.rb#1242 - def type=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1297 -class RBI::TStructProp < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1310 - sig do - params( - name: ::String, - type: T.any(::RBI::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#564 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1316 - 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#1322 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#108 -class RBI::Tree < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#121 - 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#128 - sig { params(node: ::RBI::Node).void } - def <<(node); 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.16.2/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.16.2/lib/tapioca/rbi_ext/model.rb#45 - sig { params(name: ::String, value: ::String).void } - def create_constant(name, value:); end - - # source://tapioca/0.16.2/lib/tapioca/rbi_ext/model.rb#55 - sig { params(name: ::String).void } - def create_extend(name); end - - # source://tapioca/0.16.2/lib/tapioca/rbi_ext/model.rb#50 - sig { params(name: ::String).void } - def create_include(name); end - - # source://tapioca/0.16.2/lib/tapioca/rbi_ext/model.rb#90 - sig do - params( - name: ::String, - parameters: T::Array[::RBI::TypedParam], - return_type: T.nilable(::String), - class_method: T::Boolean, - visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Method).void) - ).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), &block); end - - # source://tapioca/0.16.2/lib/tapioca/rbi_ext/model.rb#60 - sig { params(name: ::String).void } - def create_mixes_in_class_methods(name); end - - # source://tapioca/0.16.2/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.16.2/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.16.2/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#134 - 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/flatten_singleton_methods.rb#60 - sig { void } - def flatten_singleton_methods!; end - - # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#60 - sig { void } - def flatten_visibilities!; end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#81 - 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_members.rb#46 - sig { void } - def nest_non_public_members!; end - - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 - sig { void } - def nest_singleton_methods!; end - - # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#63 - sig { void } - def nest_top_level_members!; end - - # source://rbi//lib/rbi/model.rb#112 - sig { returns(T::Array[::RBI::Node]) } - def nodes; end - - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#53 - sig { void } - def replace_attributes_with_methods!; end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 - sig { void } - def sort_nodes!; end - - private - - # source://tapioca/0.16.2/lib/tapioca/rbi_ext/model.rb#123 - sig { params(node: ::RBI::Node).returns(::RBI::Node) } - def create_node(node); end - - # source://tapioca/0.16.2/lib/tapioca/rbi_ext/model.rb#118 - sig { returns(T::Hash[::String, ::RBI::Node]) } - def nodes_cache; end -end - -# The base class for all RBI types. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/type.rb#6 -class RBI::Type - abstract! - - # source://rbi//lib/rbi/type.rb#699 - sig { void } - def initialize; end - - # @abstract - # - # source://rbi//lib/rbi/type.rb#745 - sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#748 - sig { params(other: ::BasicObject).returns(T::Boolean) } - def eql?(other); end - - # source://rbi//lib/rbi/type.rb#753 - sig { override.returns(::Integer) } - def hash; end - - # Returns a new type that is `nilable` if it is not already. - # - # If the type is already nilable, it returns itself. - # ```ruby - # type = RBI::Type.simple("String") - # type.to_rbi # => "String" - # type.nilable.to_rbi # => "T.nilable(String)" - # type.nilable.nilable.to_rbi # => "T.nilable(String)" - # ``` - # - # source://rbi//lib/rbi/type.rb#713 - sig { returns(::RBI::Type) } - def nilable; end - - # Returns whether the type is nilable. - # - # source://rbi//lib/rbi/type.rb#740 - sig { returns(T::Boolean) } - def nilable?; end - - # Returns the non-nilable version of the type. - # If the type is already non-nilable, it returns itself. - # If the type is nilable, it returns the inner type. - # - # ```ruby - # type = RBI::Type.nilable(RBI::Type.simple("String")) - # type.to_rbi # => "T.nilable(String)" - # type.non_nilable.to_rbi # => "String" - # type.non_nilable.non_nilable.to_rbi # => "String" - # ``` - # - # source://rbi//lib/rbi/type.rb#728 - sig { returns(::RBI::Type) } - def non_nilable; end - - # @abstract - # - # source://rbi//lib/rbi/type.rb#758 - sig { abstract.returns(::String) } - def to_rbi; end - - # source://rbi//lib/rbi/type.rb#761 - sig { override.returns(::String) } - def to_s; end - - class << self - # Builds a type that represents an intersection of multiple types like `T.all(String, Integer)`. - # - # Note that this method transforms types such as `T.all(String, String)` into `String`, so - # it may return something other than a `All`. - # - # source://rbi//lib/rbi/type.rb#563 - sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } - def all(type1, type2, *types); end - - # Builds a type that represents a union of multiple types like `T.any(String, Integer)`. - # - # Note that this method transforms types such as `T.any(String, NilClass)` into `T.nilable(String)`, so - # it may return something other than a `Any`. - # - # source://rbi//lib/rbi/type.rb#590 - sig { params(type1: ::RBI::Type, type2: ::RBI::Type, types: ::RBI::Type).returns(::RBI::Type) } - def any(type1, type2, *types); end - - # Builds a type that represents `T.anything`. - # - # source://rbi//lib/rbi/type.rb#488 - sig { returns(::RBI::Type::Anything) } - def anything; end - - # Builds a type that represents `T.attached_class`. - # - # source://rbi//lib/rbi/type.rb#494 - sig { returns(::RBI::Type::AttachedClass) } - def attached_class; end - - # Builds a type that represents `T::Boolean`. - # - # source://rbi//lib/rbi/type.rb#500 - sig { returns(::RBI::Type::Boolean) } - def boolean; end - - # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. - # - # source://rbi//lib/rbi/type.rb#538 - sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).returns(::RBI::Type::ClassOf) } - def class_of(type, type_parameter = T.unsafe(nil)); end - - # Builds a type that represents a generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. - # - # source://rbi//lib/rbi/type.rb#655 - sig { params(name: ::String, params: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Generic) } - def generic(name, *params); end - - # Builds a type that represents a nilable of another type like `T.nilable(String)`. - # - # Note that this method transforms types such as `T.nilable(T.untyped)` into `T.untyped`, so - # it may return something other than a `RBI::Type::Nilable`. - # - # source://rbi//lib/rbi/type.rb#547 - sig { params(type: ::RBI::Type).returns(::RBI::Type) } - def nilable(type); end - - # Builds a type that represents `T.noreturn`. - # - # source://rbi//lib/rbi/type.rb#506 - sig { returns(::RBI::Type::NoReturn) } - def noreturn; end - - # source://rbi//lib/rbi/type_parser.rb#26 - sig { params(node: ::Prism::Node).returns(::RBI::Type) } - def parse_node(node); end - - # @raise [Error] - # - # source://rbi//lib/rbi/type_parser.rb#10 - sig { params(string: ::String).returns(::RBI::Type) } - def parse_string(string); end - - # Builds a type that represents a proc type like `T.proc.void`. - # - # source://rbi//lib/rbi/type.rb#683 - sig { returns(::RBI::Type::Proc) } - def proc; end - - # Builds a type that represents `T.self_type`. - # - # source://rbi//lib/rbi/type.rb#512 - sig { returns(::RBI::Type::SelfType) } - def self_type; end - - # Builds a type that represents a shape type like `{name: String, age: Integer}`. - # - # source://rbi//lib/rbi/type.rb#675 - sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).returns(::RBI::Type::Shape) } - def shape(types = T.unsafe(nil)); end - - # Builds a simple type like `String` or `::Foo::Bar`. - # - # It raises a `NameError` if the name is not a valid Ruby class identifier. - # - # @raise [NameError] - # - # source://rbi//lib/rbi/type.rb#477 - sig { params(name: ::String).returns(::RBI::Type::Simple) } - def simple(name); end - - # Builds a type that represents the class of another type like `T::Class[Foo]`. - # - # source://rbi//lib/rbi/type.rb#532 - sig { params(type: ::RBI::Type).returns(::RBI::Type::Class) } - def t_class(type); end - - # Builds a type that represents a tuple type like `[String, Integer]`. - # - # source://rbi//lib/rbi/type.rb#669 - sig { params(types: T.any(::RBI::Type, T::Array[::RBI::Type])).returns(::RBI::Type::Tuple) } - def tuple(*types); end - - # Builds a type that represents a type parameter like `T.type_parameter(:U)`. - # - # source://rbi//lib/rbi/type.rb#661 - sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } - def type_parameter(name); end - - # Builds a type that represents `T.untyped`. - # - # source://rbi//lib/rbi/type.rb#518 - sig { returns(::RBI::Type::Untyped) } - def untyped; end - - # Builds a type that represents `void`. - # - # source://rbi//lib/rbi/type.rb#524 - sig { returns(::RBI::Type::Void) } - def void; end - - private - - # source://rbi//lib/rbi/type_parser.rb#263 - sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } - def call_chain(node); end - - # source://rbi//lib/rbi/type_parser.rb#250 - sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } - def check_arguments_at_least!(node, count); end - - # source://rbi//lib/rbi/type_parser.rb#235 - sig { params(node: ::Prism::CallNode, count: ::Integer).returns(T::Array[::Prism::Node]) } - def check_arguments_exactly!(node, count); end - - # @raise [Error] - # - # source://rbi//lib/rbi/type_parser.rb#69 - sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } - def parse_call(node); end - - # source://rbi//lib/rbi/type_parser.rb#52 - sig { params(node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantReadNode)).returns(::RBI::Type) } - def parse_constant(node); end - - # @raise [Error] - # - # source://rbi//lib/rbi/type_parser.rb#195 - sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } - def parse_proc(node); end - - # source://rbi//lib/rbi/type_parser.rb#176 - sig { params(node: T.any(::Prism::HashNode, ::Prism::KeywordHashNode)).returns(::RBI::Type) } - def parse_shape(node); end - - # source://rbi//lib/rbi/type_parser.rb#171 - sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } - def parse_tuple(node); end - - # source://rbi//lib/rbi/type_parser.rb#276 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def t?(node); end - - # source://rbi//lib/rbi/type_parser.rb#288 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def t_boolean?(node); end - - # source://rbi//lib/rbi/type_parser.rb#295 - sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } - def t_class?(node); end - - # source://rbi//lib/rbi/type_parser.rb#300 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def t_class_of?(node); end - - # source://rbi//lib/rbi/type_parser.rb#307 - sig { params(node: ::Prism::CallNode).returns(T::Boolean) } - def t_proc?(node); end - - # source://rbi//lib/rbi/type.rb#693 - sig { params(name: ::String).returns(T::Boolean) } - def valid_identifier?(name); end - end -end - -# A type that is intersection of multiple types like `T.all(String, Integer)`. -# -# source://rbi//lib/rbi/type.rb#252 -class RBI::Type::All < ::RBI::Type::Composite - # source://rbi//lib/rbi/type.rb#256 - sig { override.returns(::String) } - def to_rbi; end -end - -# A type that is union of multiple types like `T.any(String, Integer)`. -# -# source://rbi//lib/rbi/type.rb#262 -class RBI::Type::Any < ::RBI::Type::Composite - # source://rbi//lib/rbi/type.rb#271 - sig { returns(T::Boolean) } - def nilable?; end - - # source://rbi//lib/rbi/type.rb#266 - sig { override.returns(::String) } - def to_rbi; end -end - -# `T.anything`. -# -# source://rbi//lib/rbi/type.rb#43 -class RBI::Type::Anything < ::RBI::Type - # source://rbi//lib/rbi/type.rb#47 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#52 - sig { override.returns(::String) } - def to_rbi; end -end - -# `T.attached_class`. -# -# source://rbi//lib/rbi/type.rb#58 -class RBI::Type::AttachedClass < ::RBI::Type - # source://rbi//lib/rbi/type.rb#62 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#67 - sig { override.returns(::String) } - def to_rbi; end -end - -# `T::Boolean`. -# -# source://rbi//lib/rbi/type.rb#73 -class RBI::Type::Boolean < ::RBI::Type - # source://rbi//lib/rbi/type.rb#77 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#82 - sig { override.returns(::String) } - def to_rbi; end -end - -# The class of another type like `T::Class[Foo]`. -# -# source://rbi//lib/rbi/type.rb#150 -class RBI::Type::Class < ::RBI::Type - # source://rbi//lib/rbi/type.rb#157 - sig { params(type: ::RBI::Type).void } - def initialize(type); end - - # source://rbi//lib/rbi/type.rb#163 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#168 - sig { override.returns(::String) } - def to_rbi; end - - # source://rbi//lib/rbi/type.rb#154 - sig { returns(::RBI::Type) } - def type; end -end - -# The singleton class of another type like `T.class_of(Foo)`. -# -# source://rbi//lib/rbi/type.rb#174 -class RBI::Type::ClassOf < ::RBI::Type - # source://rbi//lib/rbi/type.rb#184 - sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } - def initialize(type, type_parameter = T.unsafe(nil)); end - - # source://rbi//lib/rbi/type.rb#191 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#196 - sig { override.returns(::String) } - def to_rbi; end - - # source://rbi//lib/rbi/type.rb#178 - sig { returns(::RBI::Type::Simple) } - def type; end - - # source://rbi//lib/rbi/type.rb#181 - sig { returns(T.nilable(::RBI::Type)) } - def type_parameter; end -end - -# A type that is composed of multiple types like `T.all(String, Integer)`. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/type.rb#230 -class RBI::Type::Composite < ::RBI::Type - abstract! - - # source://rbi//lib/rbi/type.rb#240 - sig { params(types: T::Array[::RBI::Type]).void } - def initialize(types); end - - # source://rbi//lib/rbi/type.rb#246 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#237 - sig { returns(T::Array[::RBI::Type]) } - def types; end -end - -# source://rbi//lib/rbi/type_parser.rb#6 -class RBI::Type::Error < ::RBI::Error; end - -# A generic type like `T::Array[String]` or `T::Hash[Symbol, Integer]`. -# -# source://rbi//lib/rbi/type.rb#279 -class RBI::Type::Generic < ::RBI::Type - # source://rbi//lib/rbi/type.rb#289 - sig { params(name: ::String, params: ::RBI::Type).void } - def initialize(name, *params); end - - # source://rbi//lib/rbi/type.rb#296 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#283 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/type.rb#286 - sig { returns(T::Array[::RBI::Type]) } - def params; end - - # source://rbi//lib/rbi/type.rb#301 - sig { override.returns(::String) } - def to_rbi; end -end - -# A type that can be `nil` like `T.nilable(String)`. -# -# source://rbi//lib/rbi/type.rb#206 -class RBI::Type::Nilable < ::RBI::Type - # source://rbi//lib/rbi/type.rb#213 - sig { params(type: ::RBI::Type).void } - def initialize(type); end - - # source://rbi//lib/rbi/type.rb#219 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#224 - sig { override.returns(::String) } - def to_rbi; end - - # source://rbi//lib/rbi/type.rb#210 - sig { returns(::RBI::Type) } - def type; end -end - -# `T.noreturn`. -# -# source://rbi//lib/rbi/type.rb#88 -class RBI::Type::NoReturn < ::RBI::Type - # source://rbi//lib/rbi/type.rb#92 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#97 - sig { override.returns(::String) } - def to_rbi; end -end - -# A proc type like `T.proc.void`. -# -# source://rbi//lib/rbi/type.rb#387 -class RBI::Type::Proc < ::RBI::Type - # source://rbi//lib/rbi/type.rb#400 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/type.rb#408 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#436 - sig { params(type: T.untyped).returns(T.self_type) } - def bind(type); end - - # source://rbi//lib/rbi/type.rb#418 - sig { params(params: ::RBI::Type).returns(T.self_type) } - def params(**params); end - - # source://rbi//lib/rbi/type.rb#397 - sig { returns(T.nilable(::RBI::Type)) } - def proc_bind; end - - # source://rbi//lib/rbi/type.rb#391 - sig { returns(T::Hash[::Symbol, ::RBI::Type]) } - def proc_params; end - - # source://rbi//lib/rbi/type.rb#394 - sig { returns(::RBI::Type) } - def proc_returns; end - - # source://rbi//lib/rbi/type.rb#424 - sig { params(type: T.untyped).returns(T.self_type) } - def returns(type); end - - # source://rbi//lib/rbi/type.rb#442 - sig { override.returns(::String) } - def to_rbi; end - - # source://rbi//lib/rbi/type.rb#430 - sig { returns(T.self_type) } - def void; end -end - -# `T.self_type`. -# -# source://rbi//lib/rbi/type.rb#103 -class RBI::Type::SelfType < ::RBI::Type - # source://rbi//lib/rbi/type.rb#107 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#112 - sig { override.returns(::String) } - def to_rbi; end -end - -# A shape type like `{name: String, age: Integer}`. -# -# source://rbi//lib/rbi/type.rb#357 -class RBI::Type::Shape < ::RBI::Type - # source://rbi//lib/rbi/type.rb#364 - sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } - def initialize(types); end - - # source://rbi//lib/rbi/type.rb#370 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#375 - sig { override.returns(::String) } - def to_rbi; end - - # source://rbi//lib/rbi/type.rb#361 - sig { returns(T::Hash[T.any(::String, ::Symbol), ::RBI::Type]) } - def types; end -end - -# A type that represents a simple class name like `String` or `Foo`. -# -# It can also be a qualified name like `::Foo` or `Foo::Bar`. -# -# source://rbi//lib/rbi/type.rb#17 -class RBI::Type::Simple < ::RBI::Type - # source://rbi//lib/rbi/type.rb#24 - sig { params(name: ::String).void } - def initialize(name); end - - # source://rbi//lib/rbi/type.rb#30 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#21 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/type.rb#35 - sig { override.returns(::String) } - def to_rbi; end -end - -# A tuple type like `[String, Integer]`. -# -# source://rbi//lib/rbi/type.rb#333 -class RBI::Type::Tuple < ::RBI::Type - # source://rbi//lib/rbi/type.rb#340 - sig { params(types: T::Array[::RBI::Type]).void } - def initialize(types); end - - # source://rbi//lib/rbi/type.rb#346 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#351 - sig { override.returns(::String) } - def to_rbi; end - - # source://rbi//lib/rbi/type.rb#337 - sig { returns(T::Array[::RBI::Type]) } - def types; end -end - -# A type parameter like `T.type_parameter(:U)`. -# -# source://rbi//lib/rbi/type.rb#307 -class RBI::Type::TypeParameter < ::RBI::Type - # source://rbi//lib/rbi/type.rb#314 - sig { params(name: ::Symbol).void } - def initialize(name); end - - # source://rbi//lib/rbi/type.rb#320 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#311 - sig { returns(::Symbol) } - def name; end - - # source://rbi//lib/rbi/type.rb#325 - sig { override.returns(::String) } - def to_rbi; end -end - -# `T.untyped`. -# -# source://rbi//lib/rbi/type.rb#118 -class RBI::Type::Untyped < ::RBI::Type - # source://rbi//lib/rbi/type.rb#122 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#127 - sig { override.returns(::String) } - def to_rbi; end -end - -# source://rbi//lib/rbi/type_visitor.rb#6 -class RBI::Type::Visitor - # source://rbi//lib/rbi/type_visitor.rb#12 - sig { params(node: ::RBI::Type).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/type_visitor.rb#58 - sig { params(type: ::RBI::Type::All).void } - def visit_all(type); end - - # source://rbi//lib/rbi/type_visitor.rb#61 - sig { params(type: ::RBI::Type::Any).void } - def visit_any(type); end - - # source://rbi//lib/rbi/type_visitor.rb#64 - sig { params(type: ::RBI::Type::Anything).void } - def visit_anything(type); end - - # source://rbi//lib/rbi/type_visitor.rb#67 - sig { params(type: ::RBI::Type::AttachedClass).void } - def visit_attached_class(type); end - - # source://rbi//lib/rbi/type_visitor.rb#70 - sig { params(type: ::RBI::Type::Boolean).void } - def visit_boolean(type); end - - # source://rbi//lib/rbi/type_visitor.rb#73 - sig { params(type: ::RBI::Type::Class).void } - def visit_class(type); end - - # source://rbi//lib/rbi/type_visitor.rb#76 - sig { params(type: ::RBI::Type::ClassOf).void } - def visit_class_of(type); end - - # source://rbi//lib/rbi/type_visitor.rb#79 - sig { params(type: ::RBI::Type::Generic).void } - def visit_generic(type); end - - # source://rbi//lib/rbi/type_visitor.rb#82 - sig { params(type: ::RBI::Type::Nilable).void } - def visit_nilable(type); end - - # source://rbi//lib/rbi/type_visitor.rb#88 - sig { params(type: ::RBI::Type::NoReturn).void } - def visit_no_return(type); end - - # source://rbi//lib/rbi/type_visitor.rb#91 - sig { params(type: ::RBI::Type::Proc).void } - def visit_proc(type); end - - # source://rbi//lib/rbi/type_visitor.rb#94 - sig { params(type: ::RBI::Type::SelfType).void } - def visit_self_type(type); end - - # source://rbi//lib/rbi/type_visitor.rb#100 - sig { params(type: ::RBI::Type::Shape).void } - def visit_shape(type); end - - # source://rbi//lib/rbi/type_visitor.rb#85 - sig { params(type: ::RBI::Type::Simple).void } - def visit_simple(type); end - - # source://rbi//lib/rbi/type_visitor.rb#103 - sig { params(type: ::RBI::Type::Tuple).void } - def visit_tuple(type); end - - # source://rbi//lib/rbi/type_visitor.rb#106 - sig { params(type: ::RBI::Type::TypeParameter).void } - def visit_type_parameter(type); end - - # source://rbi//lib/rbi/type_visitor.rb#109 - sig { params(type: ::RBI::Type::Untyped).void } - def visit_untyped(type); end - - # source://rbi//lib/rbi/type_visitor.rb#97 - sig { params(type: ::RBI::Type::Void).void } - def visit_void(type); end -end - -# source://rbi//lib/rbi/type_visitor.rb#9 -class RBI::Type::Visitor::Error < ::RBI::Error; end - -# `void`. -# -# source://rbi//lib/rbi/type.rb#133 -class RBI::Type::Void < ::RBI::Type - # source://rbi//lib/rbi/type.rb#137 - sig { override.params(other: ::BasicObject).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/type.rb#142 - sig { override.returns(::String) } - def to_rbi; end -end - -# source://rbi//lib/rbi/model.rb#1400 -class RBI::TypeMember < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1415 - 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/model.rb#1423 - 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#1404 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1430 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1404 - def value; end -end - -# source://rbi//lib/rbi/rewriters/attr_to_methods.rb#5 -class RBI::UnexpectedMultipleSigsError < ::RBI::Error - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#10 - sig { params(node: ::RBI::Node).void } - def initialize(node); end - - # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#7 - sig { returns(::RBI::Node) } - def node; end -end - -# source://rbi//lib/rbi/parser.rb#20 -class RBI::UnexpectedParserError < ::RBI::Error - # 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#916 -class RBI::Visibility < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#926 - 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#932 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/model.rb#949 - sig { returns(T::Boolean) } - def private?; end - - # source://rbi//lib/rbi/model.rb#944 - sig { returns(T::Boolean) } - def protected?; end - - # source://rbi//lib/rbi/model.rb#939 - sig { returns(T::Boolean) } - def public?; end - - # source://rbi//lib/rbi/model.rb#923 - sig { returns(::Symbol) } - def visibility; end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#52 -class RBI::VisibilityGroup < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#59 - sig { params(visibility: ::RBI::Visibility).void } - def initialize(visibility); end - - # source://rbi//lib/rbi/rewriters/nest_non_public_members.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#7 -class RBI::Visitor - abstract! - - # source://rbi//lib/rbi/visitor.rb#14 - sig { params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/visitor.rb#108 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - # source://rbi//lib/rbi/visitor.rb#113 - sig { params(file: ::RBI::File).void } - def visit_file(file); end - - private - - # source://rbi//lib/rbi/visitor.rb#195 - sig { params(node: ::RBI::Arg).void } - def visit_arg(node); end - - # source://rbi//lib/rbi/visitor.rb#144 - sig { params(node: ::RBI::AttrAccessor).void } - def visit_attr_accessor(node); end - - # source://rbi//lib/rbi/visitor.rb#147 - sig { params(node: ::RBI::AttrReader).void } - def visit_attr_reader(node); end - - # source://rbi//lib/rbi/visitor.rb#150 - sig { params(node: ::RBI::AttrWriter).void } - def visit_attr_writer(node); end - - # source://rbi//lib/rbi/visitor.rb#123 - sig { params(node: ::RBI::BlankLine).void } - def visit_blank_line(node); end - - # source://rbi//lib/rbi/visitor.rb#174 - sig { params(node: ::RBI::BlockParam).void } - def visit_block_param(node); end - - # source://rbi//lib/rbi/visitor.rb#129 - sig { params(node: ::RBI::Class).void } - def visit_class(node); end - - # source://rbi//lib/rbi/visitor.rb#120 - sig { params(node: ::RBI::Comment).void } - def visit_comment(node); end - - # source://rbi//lib/rbi/visitor.rb#240 - sig { params(node: ::RBI::ConflictTree).void } - def visit_conflict_tree(node); end - - # source://rbi//lib/rbi/visitor.rb#141 - sig { params(node: ::RBI::Const).void } - def visit_const(node); end - - # source://rbi//lib/rbi/visitor.rb#180 - sig { params(node: ::RBI::Extend).void } - def visit_extend(node); end - - # source://rbi//lib/rbi/visitor.rb#234 - sig { params(node: ::RBI::Group).void } - def visit_group(node); end - - # source://rbi//lib/rbi/visitor.rb#222 - sig { params(node: ::RBI::Helper).void } - def visit_helper(node); end - - # source://rbi//lib/rbi/visitor.rb#177 - sig { params(node: ::RBI::Include).void } - def visit_include(node); end - - # source://rbi//lib/rbi/visitor.rb#198 - sig { params(node: ::RBI::KwArg).void } - def visit_kw_arg(node); end - - # source://rbi//lib/rbi/visitor.rb#168 - sig { params(node: ::RBI::KwOptParam).void } - def visit_kw_opt_param(node); end - - # source://rbi//lib/rbi/visitor.rb#165 - sig { params(node: ::RBI::KwParam).void } - def visit_kw_param(node); end - - # source://rbi//lib/rbi/visitor.rb#171 - sig { params(node: ::RBI::KwRestParam).void } - def visit_kw_rest_param(node); end - - # source://rbi//lib/rbi/visitor.rb#153 - sig { params(node: ::RBI::Method).void } - def visit_method(node); end - - # source://rbi//lib/rbi/visitor.rb#228 - sig { params(node: ::RBI::MixesInClassMethods).void } - def visit_mixes_in_class_methods(node); end - - # source://rbi//lib/rbi/visitor.rb#126 - sig { params(node: ::RBI::Module).void } - def visit_module(node); end - - # source://rbi//lib/rbi/visitor.rb#159 - sig { params(node: ::RBI::OptParam).void } - def visit_opt_param(node); end - - # source://rbi//lib/rbi/visitor.rb#189 - sig { params(node: ::RBI::Private).void } - def visit_private(node); end - - # source://rbi//lib/rbi/visitor.rb#186 - sig { params(node: ::RBI::Protected).void } - def visit_protected(node); end - - # source://rbi//lib/rbi/visitor.rb#183 - sig { params(node: ::RBI::Public).void } - def visit_public(node); end - - # source://rbi//lib/rbi/visitor.rb#156 - sig { params(node: ::RBI::ReqParam).void } - def visit_req_param(node); end - - # source://rbi//lib/rbi/visitor.rb#231 - sig { params(node: ::RBI::RequiresAncestor).void } - def visit_requires_ancestor(node); end - - # source://rbi//lib/rbi/visitor.rb#162 - sig { params(node: ::RBI::RestParam).void } - def visit_rest_param(node); end - - # source://rbi//lib/rbi/visitor.rb#243 - sig { params(node: ::RBI::ScopeConflict).void } - def visit_scope_conflict(node); end - - # source://rbi//lib/rbi/visitor.rb#192 - sig { params(node: ::RBI::Send).void } - def visit_send(node); end - - # source://rbi//lib/rbi/visitor.rb#201 - sig { params(node: ::RBI::Sig).void } - def visit_sig(node); end - - # source://rbi//lib/rbi/visitor.rb#204 - sig { params(node: ::RBI::SigParam).void } - def visit_sig_param(node); end - - # source://rbi//lib/rbi/visitor.rb#132 - sig { params(node: ::RBI::SingletonClass).void } - def visit_singleton_class(node); end - - # source://rbi//lib/rbi/visitor.rb#135 - sig { params(node: ::RBI::Struct).void } - def visit_struct(node); end - - # source://rbi//lib/rbi/visitor.rb#216 - sig { params(node: ::RBI::TEnum).void } - def visit_tenum(node); end - - # source://rbi//lib/rbi/visitor.rb#219 - sig { params(node: ::RBI::TEnumBlock).void } - def visit_tenum_block(node); end - - # source://rbi//lib/rbi/visitor.rb#138 - sig { params(node: ::RBI::Tree).void } - def visit_tree(node); end - - # source://rbi//lib/rbi/visitor.rb#207 - sig { params(node: ::RBI::TStruct).void } - def visit_tstruct(node); end - - # source://rbi//lib/rbi/visitor.rb#210 - sig { params(node: ::RBI::TStructConst).void } - def visit_tstruct_const(node); end - - # source://rbi//lib/rbi/visitor.rb#213 - sig { params(node: ::RBI::TStructProp).void } - def visit_tstruct_prop(node); end - - # source://rbi//lib/rbi/visitor.rb#225 - sig { params(node: ::RBI::TypeMember).void } - def visit_type_member(node); end - - # source://rbi//lib/rbi/visitor.rb#237 - sig { params(node: ::RBI::VisibilityGroup).void } - def visit_visibility_group(node); end -end - -# source://rbi//lib/rbi/visitor.rb#5 -class RBI::VisitorError < ::RBI::Error; end diff --git a/tools/ruby-tools/sorbet/rbi/gems/spoom@1.4.2.rbi b/tools/ruby-tools/sorbet/rbi/gems/spoom@1.4.2.rbi deleted file mode 100644 index 3d0531c..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/spoom@1.4.2.rbi +++ /dev/null @@ -1,4932 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `spoom` gem. -# Please instead update this file by running `bin/tapioca gem spoom`. - - -# source://spoom//lib/spoom.rb#7 -module Spoom - class << self - # source://spoom//lib/spoom/parse.rb#13 - sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) } - def parse_ruby(ruby, file:); end - end -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#154 - 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.3.2/lib/thor.rb#334 - def deadcode(*args); end - - # source://spoom//lib/spoom/cli.rb#75 - def lsp(*args); end - - # source://thor/1.3.2/lib/thor.rb#334 - 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.3.2/lib/thor.rb#334 - def bump(*args); end - - # source://thor/1.3.2/lib/thor.rb#334 - def coverage(*args); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://thor/1.3.2/lib/thor.rb#334 - def lsp(*args); end - - # source://thor/1.3.2/lib/thor.rb#334 - 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 - BLACK = new - BLUE = new - BOLD = new - CLEAR = new - CYAN = new - GREEN = new - LIGHT_BLACK = new - LIGHT_BLUE = new - LIGHT_CYAN = new - LIGHT_GREEN = new - LIGHT_MAGENTA = new - LIGHT_RED = new - LIGHT_WHITE = new - LIGHT_YELLOW = new - MAGENTA = new - RED = new - WHITE = new - YELLOW = 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 <branch-name> <ref>` 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 <branch>` which is only available in git 2.28+. - # In older versions, use `git_init!` followed by `git("checkout -b <branch>")`. - # - # 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 <remote> <ref>` 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.11554/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.11554/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# The strictness name as found in the Sorbet metrics file -# -# source://spoom//lib/spoom/coverage/snapshot.rb#30 -Spoom::Coverage::Snapshot::STRICTNESSES = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/coverage/snapshot.rb#95 -class Spoom::Coverage::SnapshotPrinter < ::Spoom::Printer - # source://spoom//lib/spoom/coverage/snapshot.rb#99 - sig { params(snapshot: ::Spoom::Coverage::Snapshot).void } - def print_snapshot(snapshot); end - - private - - # source://spoom//lib/spoom/coverage/snapshot.rb#158 - sig { params(value: T.nilable(::Integer), total: T.nilable(::Integer)).returns(::String) } - def percent(value, total); end - - # source://spoom//lib/spoom/coverage/snapshot.rb#147 - sig { params(hash: T::Hash[::String, ::Integer], total: ::Integer).void } - def print_map(hash, total); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/coverage/report.rb#10 -class Spoom::Coverage::Template - abstract! - - # Create a new template from an Erb file path - # - # source://spoom//lib/spoom/coverage/report.rb#18 - sig { params(template: ::String).void } - def initialize(template:); end - - # source://spoom//lib/spoom/coverage/report.rb#23 - sig { returns(::String) } - def erb; end - - # source://spoom//lib/spoom/coverage/report.rb#33 - sig { returns(::Binding) } - def get_binding; end - - # source://spoom//lib/spoom/coverage/report.rb#28 - sig { returns(::String) } - def html; end -end - -# source://spoom//lib/spoom/deadcode/erb.rb#27 -module Spoom::Deadcode - class << self - # source://spoom//lib/spoom/deadcode/plugins.rb#75 - sig { params(context: ::Spoom::Context).returns(T::Array[T.class_of(Spoom::Deadcode::Plugins::Base)]) } - def load_custom_plugins(context); end - - # source://spoom//lib/spoom/deadcode/plugins.rb#61 - sig { params(context: ::Spoom::Context).returns(T::Set[T.class_of(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::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.11554/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) - -# source://spoom//lib/spoom/deadcode/index.rb#6 -class Spoom::Deadcode::Index - # source://spoom//lib/spoom/deadcode/index.rb#29 - sig { params(model: ::Spoom::Model).void } - def initialize(model); end - - # source://spoom//lib/spoom/deadcode/index.rb#219 - sig { returns(T::Array[::Spoom::Deadcode::Definition]) } - def all_definitions; end - - # source://spoom//lib/spoom/deadcode/index.rb#224 - sig { returns(T::Array[::Spoom::Model::Reference]) } - def all_references; end - - # source://spoom//lib/spoom/deadcode/index.rb#99 - sig { params(plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } - def apply_plugins!(plugins); end - - # source://spoom//lib/spoom/deadcode/index.rb#79 - sig { params(definition: ::Spoom::Deadcode::Definition).void } - def define(definition); end - - # source://spoom//lib/spoom/deadcode/index.rb#23 - sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } - def definitions; end - - # Utils - # - # source://spoom//lib/spoom/deadcode/index.rb#214 - 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#122 - sig { void } - def finalize!; end - - # source://spoom//lib/spoom/deadcode/index.rb#94 - sig { params(symbol_def: ::Spoom::Model::SymbolDef).void } - def ignore(symbol_def); end - - # source://spoom//lib/spoom/deadcode/index.rb#50 - sig { params(erb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } - def index_erb(erb, file:, plugins: T.unsafe(nil)); end - - # Indexing - # - # source://spoom//lib/spoom/deadcode/index.rb#39 - sig { params(file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } - def index_file(file, plugins: T.unsafe(nil)); end - - # source://spoom//lib/spoom/deadcode/index.rb#55 - sig { params(rb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } - def index_ruby(rb, file:, plugins: T.unsafe(nil)); end - - # source://spoom//lib/spoom/deadcode/index.rb#20 - sig { returns(::Spoom::Model) } - def model; end - - # source://spoom//lib/spoom/deadcode/index.rb#84 - sig { params(name: ::String, location: ::Spoom::Location).void } - def reference_constant(name, location); end - - # source://spoom//lib/spoom/deadcode/index.rb#89 - sig { params(name: ::String, location: ::Spoom::Location).void } - def reference_method(name, location); end - - # source://spoom//lib/spoom/deadcode/index.rb#26 - sig { returns(T::Hash[::String, T::Array[::Spoom::Model::Reference]]) } - def references; end -end - -# source://spoom//lib/spoom/deadcode/index.rb#9 -class Spoom::Deadcode::Index::Error < ::Spoom::Error - # source://spoom//lib/spoom/deadcode/index.rb#13 - sig { params(message: ::String, parent: ::Exception).void } - def initialize(message, parent:); end -end - -# source://spoom//lib/spoom/deadcode/indexer.rb#6 -class Spoom::Deadcode::Indexer < ::Spoom::Visitor - # source://spoom//lib/spoom/deadcode/indexer.rb#16 - sig do - params( - path: ::String, - index: ::Spoom::Deadcode::Index, - plugins: T::Array[::Spoom::Deadcode::Plugins::Base] - ).void - end - def initialize(path, index, plugins: T.unsafe(nil)); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#13 - sig { returns(::Spoom::Deadcode::Index) } - def index; end - - # source://spoom//lib/spoom/deadcode/indexer.rb#10 - sig { returns(::String) } - def path; end - - # Visit - # - # source://spoom//lib/spoom/deadcode/indexer.rb#27 - sig { override.params(node: ::Prism::CallNode).void } - def visit_call_node(node); end -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/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(send: ::Spoom::Deadcode::Send).void } - def on_send(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(definition: ::Spoom::Model::Method).void } - def on_define_method(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(definition: ::Spoom::Model::Method).void } - def on_define_method(definition); end - - # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#39 - sig { override.params(send: ::Spoom::Deadcode::Send).void } - def on_send(send); end -end - -# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#12 -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(send: ::Spoom::Deadcode::Send).void } - def on_send(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(send: ::Spoom::Deadcode::Send).void } - def on_send(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(send: ::Spoom::Deadcode::Send).void } - def on_send(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! - - # source://spoom//lib/spoom/deadcode/plugins/base.rb#132 - sig { params(index: ::Spoom::Deadcode::Index).void } - def initialize(index); end - - # source://spoom//lib/spoom/deadcode/plugins/base.rb#129 - sig { returns(::Spoom::Deadcode::Index) } - def index; end - - # Do not override this method, use `on_define_accessor` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#158 - sig { params(definition: ::Spoom::Model::Attr).void } - def internal_on_define_accessor(definition); end - - # Do not override this method, use `on_define_class` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#182 - sig { params(definition: ::Spoom::Model::Class).void } - def internal_on_define_class(definition); end - - # Do not override this method, use `on_define_constant` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#212 - sig { params(definition: ::Spoom::Model::Constant).void } - def internal_on_define_constant(definition); end - - # Do not override this method, use `on_define_method` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#238 - sig { params(definition: ::Spoom::Model::Method).void } - def internal_on_define_method(definition); end - - # Do not override this method, use `on_define_module` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#264 - sig { params(definition: ::Spoom::Model::Module).void } - def internal_on_define_module(definition); 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(definition) - # @index.ignore(definition) if symbol_def.name == "foo" - # end - # end - # ~~~ - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#152 - sig { params(definition: ::Spoom::Model::Attr).void } - def on_define_accessor(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(definition) - # @index.ignore(definition) if definition.name == "Foo" - # end - # end - # ~~~ - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#176 - sig { params(definition: ::Spoom::Model::Class).void } - def on_define_class(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(definition) - # @index.ignore(definition) if definition.name == "FOO" - # end - # end - # ~~~ - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#206 - sig { params(definition: ::Spoom::Model::Constant).void } - def on_define_constant(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(definition) - # @index.ignore(definition) if definition.name == "foo" - # end - # end - # ~~~ - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#232 - sig { params(definition: ::Spoom::Model::Method).void } - def on_define_method(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(definition) - # @index.ignore(definition) if definition.name == "Foo" - # end - # end - # ~~~ - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#258 - sig { params(definition: ::Spoom::Model::Module).void } - def on_define_module(definition); end - - # Called when a send is being processed - # - # ~~~rb - # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_send(send) - # return unless send.name == "dsl_method" - # return if send.args.empty? - # - # method_name = send.args.first.slice.delete_prefix(":") - # @index.reference_method(method_name, send.node, send.loc) - # end - # end - # ~~~ - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#284 - sig { params(send: ::Spoom::Deadcode::Send).void } - def on_send(send); end - - private - - # Plugin utils - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#352 - sig { params(name: ::String).returns(::String) } - def camelize(name); end - - # source://spoom//lib/spoom/deadcode/plugins/base.rb#301 - sig { params(name: T.nilable(::String)).returns(T::Boolean) } - def ignored_class_name?(name); end - - # source://spoom//lib/spoom/deadcode/plugins/base.rb#320 - sig { params(name: ::String).returns(T::Boolean) } - def ignored_constant_name?(name); end - - # source://spoom//lib/spoom/deadcode/plugins/base.rb#325 - sig { params(name: ::String).returns(T::Boolean) } - def ignored_method_name?(name); end - - # source://spoom//lib/spoom/deadcode/plugins/base.rb#330 - sig { params(name: ::String).returns(T::Boolean) } - def ignored_module_name?(name); end - - # source://spoom//lib/spoom/deadcode/plugins/base.rb#335 - 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#308 - sig { params(definition: ::Spoom::Model::Class).returns(T::Boolean) } - def ignored_subclass?(definition); end - - # source://spoom//lib/spoom/deadcode/plugins/base.rb#340 - sig { params(const: ::Symbol).returns(T::Set[::String]) } - def names(const); end - - # source://spoom//lib/spoom/deadcode/plugins/base.rb#345 - sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } - def patterns(const); end - - # DSL support - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 - sig { params(definition: ::Spoom::Model::Namespace, superclass_name: ::String).returns(T::Boolean) } - def subclass_of?(definition, superclass_name); 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(send: ::Spoom::Deadcode::Send).void } - def on_send(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(definition: ::Spoom::Model::Method).void } - def on_define_method(definition); end - - # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#28 - sig { override.params(send: ::Spoom::Deadcode::Send).void } - def on_send(send); 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(definition: ::Spoom::Model::Class).void } - def on_define_class(definition); end - - # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#16 - sig { override.params(definition: ::Spoom::Model::Module).void } - def on_define_module(definition); end - - private - - # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#23 - sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } - def used_as_namespace?(symbol_def); 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(definition: ::Spoom::Model::Class).void } - def on_define_class(definition); end - - # source://spoom//lib/spoom/deadcode/plugins/rails.rb#18 - sig { override.params(definition: ::Spoom::Model::Module).void } - def on_define_module(definition); end - - private - - # source://spoom//lib/spoom/deadcode/plugins/rails.rb#25 - sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } - def file_is_helper?(symbol_def); 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(definition: ::Spoom::Model::Constant).void } - def on_define_constant(definition); end - - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#26 - sig { override.params(definition: ::Spoom::Model::Method).void } - def on_define_method(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(send: ::Spoom::Deadcode::Send).void } - def on_send(send); end - - private - - # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#43 - sig { params(send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } - def reference_symbol_as_constant(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(definition: ::Spoom::Model::Constant).void } - def on_define_constant(definition); end - - # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#16 - sig { override.params(definition: ::Spoom::Model::Method).void } - def on_define_method(definition); end - - private - - # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#28 - sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } - def sorbet_enum_constant?(definition); end - - # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#23 - sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } - def sorbet_type_member?(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(definition: ::Spoom::Model::Method).void } - def on_define_method(definition); end -end - -# source://spoom//lib/spoom/deadcode/remover.rb#6 -class Spoom::Deadcode::Remover - # source://spoom//lib/spoom/deadcode/remover.rb#12 - sig { params(context: ::Spoom::Context).void } - def initialize(context); end - - # source://spoom//lib/spoom/deadcode/remover.rb#17 - sig { params(kind: T.nilable(::Spoom::Deadcode::Definition::Kind), location: ::Spoom::Location).returns(::String) } - 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<Prism::Node>] - # - # 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 - - # @raise [Error] - # - # 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 - - # @raise [Error] - # - # source://spoom//lib/spoom/deadcode/remover.rb#408 - sig { returns(::Spoom::Deadcode::Remover::NodeContext) } - def parent_context; end - - # @raise [Error] - # - # 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 - - # @raise [Error] - # - # 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::Visitor - # source://spoom//lib/spoom/deadcode/remover.rb#621 - sig { params(location: ::Spoom::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::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::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) - const :location, ::Spoom::Location - - # source://spoom//lib/spoom/deadcode/send.rb#22 - sig do - type_parameters(:T) - .params( - arg_type: T::Class[T.type_parameter(:T)], - block: T.proc.params(arg: T.type_parameter(:T)).void - ).void - end - def each_arg(arg_type, &block); end - - # source://spoom//lib/spoom/deadcode/send.rb#29 - sig { params(block: T.proc.params(key: ::Prism::Node, value: T.nilable(::Prism::Node)).void).void } - def each_arg_assoc(&block); end - - class << self - # source://sorbet-runtime/0.5.11554/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom.rb#12 -class Spoom::Error < ::StandardError; end - -# source://spoom//lib/spoom/context/exec.rb#5 -class Spoom::ExecResult < ::T::Struct - const :out, ::String - const :err, T.nilable(::String) - const :status, T::Boolean - const :exit_code, ::Integer - - # source://spoom//lib/spoom/context/exec.rb#14 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.11554/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.11554/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.11554/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.11554/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.11554/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 < ::Spoom::Error; 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.11554/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.11554/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.11554/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.11554/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.11554/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/location.rb#5 -class Spoom::Location - include ::Comparable - - # @raise [LocationError] - # - # source://spoom//lib/spoom/location.rb#73 - sig do - params( - file: ::String, - start_line: T.nilable(::Integer), - start_column: T.nilable(::Integer), - end_line: T.nilable(::Integer), - end_column: T.nilable(::Integer) - ).void - end - def initialize(file, start_line: T.unsafe(nil), start_column: T.unsafe(nil), end_line: T.unsafe(nil), end_column: T.unsafe(nil)); end - - # source://spoom//lib/spoom/location.rb#106 - sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } - def <=>(other); end - - # @return [Integer, nil] - # - # source://spoom//lib/spoom/location.rb#62 - def end_column; end - - # @return [Integer, nil] - # - # source://spoom//lib/spoom/location.rb#62 - def end_line; end - - # source://spoom//lib/spoom/location.rb#59 - sig { returns(::String) } - def file; end - - # source://spoom//lib/spoom/location.rb#93 - sig { params(other: ::Spoom::Location).returns(T::Boolean) } - def include?(other); end - - # @return [Integer, nil] - # - # source://spoom//lib/spoom/location.rb#62 - def start_column; end - - # source://spoom//lib/spoom/location.rb#62 - sig { returns(T.nilable(::Integer)) } - def start_line; end - - # source://spoom//lib/spoom/location.rb#129 - sig { returns(::String) } - def to_s; end - - class << self - # source://spoom//lib/spoom/location.rb#47 - sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Location) } - def from_prism(file, location); end - - # @raise [LocationError] - # - # source://spoom//lib/spoom/location.rb#16 - sig { params(location_string: ::String).returns(::Spoom::Location) } - def from_string(location_string); end - end -end - -# source://spoom//lib/spoom/location.rb#10 -class Spoom::Location::LocationError < ::Spoom::Error; end - -# source://spoom//lib/spoom/model/model.rb#5 -class Spoom::Model - # source://spoom//lib/spoom/model/model.rb#238 - sig { void } - def initialize; end - - # Get a symbol by it's full name - # - # Raises an error if the symbol is not found - # - # @raise [Error] - # - # source://spoom//lib/spoom/model/model.rb#247 - sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } - def [](full_name); end - - # source://spoom//lib/spoom/model/model.rb#296 - sig { void } - def finalize!; end - - # Register a new symbol by it's full name - # - # If the symbol already exists, it will be returned. - # - # source://spoom//lib/spoom/model/model.rb#258 - sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } - def register_symbol(full_name); end - - # source://spoom//lib/spoom/model/model.rb#263 - sig { params(full_name: ::String, context: ::Spoom::Model::Symbol).returns(::Spoom::Model::Symbol) } - def resolve_symbol(full_name, context:); end - - # source://spoom//lib/spoom/model/model.rb#290 - sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } - def subtypes(symbol); end - - # source://spoom//lib/spoom/model/model.rb#284 - sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } - def supertypes(symbol); end - - # All the symbols registered in this model - # - # source://spoom//lib/spoom/model/model.rb#232 - sig { returns(T::Hash[::String, ::Spoom::Model::Symbol]) } - def symbols; end - - # source://spoom//lib/spoom/model/model.rb#235 - sig { returns(Spoom::Poset[::Spoom::Model::Symbol]) } - def symbols_hierarchy; end - - private - - # source://spoom//lib/spoom/model/model.rb#303 - sig { void } - def compute_symbols_hierarchy!; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/model/model.rb#179 -class Spoom::Model::Attr < ::Spoom::Model::Property - abstract! -end - -# source://spoom//lib/spoom/model/model.rb#185 -class Spoom::Model::AttrAccessor < ::Spoom::Model::Attr; end - -# source://spoom//lib/spoom/model/model.rb#183 -class Spoom::Model::AttrReader < ::Spoom::Model::Attr; end - -# source://spoom//lib/spoom/model/model.rb#184 -class Spoom::Model::AttrWriter < ::Spoom::Model::Attr; end - -# Populate a Model by visiting the nodes from a Ruby file -# -# source://spoom//lib/spoom/model/builder.rb#7 -class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor - # source://spoom//lib/spoom/model/builder.rb#11 - sig { params(model: ::Spoom::Model, file: ::String).void } - def initialize(model, file); end - - # Accessors - # - # source://spoom//lib/spoom/model/builder.rb#146 - sig { override.params(node: ::Prism::CallNode).void } - def visit_call_node(node); end - - # Classes - # - # source://spoom//lib/spoom/model/builder.rb#24 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end - - # Constants - # - # source://spoom//lib/spoom/model/builder.rb#71 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # source://spoom//lib/spoom/model/builder.rb#92 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # Methods - # - # source://spoom//lib/spoom/model/builder.rb#127 - sig { override.params(node: ::Prism::DefNode).void } - def visit_def_node(node); end - - # Modules - # - # source://spoom//lib/spoom/model/builder.rb#55 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end - - # source://spoom//lib/spoom/model/builder.rb#106 - sig { override.params(node: ::Prism::MultiWriteNode).void } - def visit_multi_write_node(node); end - - # source://spoom//lib/spoom/model/builder.rb#39 - sig { override.params(node: ::Prism::SingletonClassNode).void } - def visit_singleton_class_node(node); end - - private - - # source://spoom//lib/spoom/model/builder.rb#234 - sig { returns(T::Array[::Spoom::Model::Sig]) } - def collect_sigs; end - - # source://spoom//lib/spoom/model/builder.rb#229 - sig { returns(::Spoom::Model::Visibility) } - def current_visibility; end - - # source://spoom//lib/spoom/model/builder.rb#241 - sig { params(node: ::Prism::Node).returns(::Spoom::Location) } - def node_location(node); end -end - -# source://spoom//lib/spoom/model/model.rb#117 -class Spoom::Model::Class < ::Spoom::Model::Namespace - # source://spoom//lib/spoom/model/model.rb#129 - sig do - params( - symbol: ::Spoom::Model::Symbol, - owner: T.nilable(::Spoom::Model::Namespace), - location: ::Spoom::Location, - superclass_name: T.nilable(::String) - ).void - end - def initialize(symbol, owner:, location:, superclass_name: T.unsafe(nil)); end - - # source://spoom//lib/spoom/model/model.rb#119 - sig { returns(T.nilable(::String)) } - def superclass_name; end - - # @return [String, nil] - # - # source://spoom//lib/spoom/model/model.rb#119 - def superclass_name=(_arg0); end -end - -# source://spoom//lib/spoom/model/model.rb#138 -class Spoom::Model::Constant < ::Spoom::Model::SymbolDef - # source://spoom//lib/spoom/model/model.rb#143 - sig do - params( - symbol: ::Spoom::Model::Symbol, - owner: T.nilable(::Spoom::Model::Namespace), - location: ::Spoom::Location, - value: ::String - ).void - end - def initialize(symbol, owner:, location:, value:); end - - # source://spoom//lib/spoom/model/model.rb#140 - sig { returns(::String) } - def value; end -end - -# source://spoom//lib/spoom/model/model.rb#8 -class Spoom::Model::Error < ::Spoom::Error; end - -# source://spoom//lib/spoom/model/model.rb#213 -class Spoom::Model::Extend < ::Spoom::Model::Mixin; end - -# source://spoom//lib/spoom/model/model.rb#211 -class Spoom::Model::Include < ::Spoom::Model::Mixin; end - -# source://spoom//lib/spoom/model/model.rb#177 -class Spoom::Model::Method < ::Spoom::Model::Property; end - -# A mixin (include, prepend, extend) to a namespace -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/model/model.rb#196 -class Spoom::Model::Mixin - abstract! - - # source://spoom//lib/spoom/model/model.rb#206 - sig { params(name: ::String).void } - def initialize(name); end - - # source://spoom//lib/spoom/model/model.rb#203 - sig { returns(::String) } - def name; end -end - -# source://spoom//lib/spoom/model/model.rb#136 -class Spoom::Model::Module < ::Spoom::Model::Namespace; end - -# A class or module -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/model/model.rb#97 -class Spoom::Model::Namespace < ::Spoom::Model::SymbolDef - abstract! - - # source://spoom//lib/spoom/model/model.rb#107 - sig do - params( - symbol: ::Spoom::Model::Symbol, - owner: T.nilable(::Spoom::Model::Namespace), - location: ::Spoom::Location - ).void - end - def initialize(symbol, owner:, location:); end - - # source://spoom//lib/spoom/model/model.rb#101 - sig { returns(T::Array[::Spoom::Model::SymbolDef]) } - def children; end - - # source://spoom//lib/spoom/model/model.rb#104 - sig { returns(T::Array[::Spoom::Model::Mixin]) } - def mixins; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/model/namespace_visitor.rb#6 -class Spoom::Model::NamespaceVisitor < ::Spoom::Visitor - abstract! - - # source://spoom//lib/spoom/model/namespace_visitor.rb#12 - sig { void } - def initialize; end - - # source://spoom//lib/spoom/model/namespace_visitor.rb#19 - sig { override.params(node: T.nilable(::Prism::Node)).void } - def visit(node); end -end - -# source://spoom//lib/spoom/model/model.rb#212 -class Spoom::Model::Prepend < ::Spoom::Model::Mixin; end - -# A method or an attribute accessor -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/model/model.rb#151 -class Spoom::Model::Property < ::Spoom::Model::SymbolDef - abstract! - - # source://spoom//lib/spoom/model/model.rb#169 - sig do - params( - symbol: ::Spoom::Model::Symbol, - owner: T.nilable(::Spoom::Model::Namespace), - location: ::Spoom::Location, - visibility: ::Spoom::Model::Visibility, - sigs: T::Array[::Spoom::Model::Sig] - ).void - end - def initialize(symbol, owner:, location:, visibility:, sigs: T.unsafe(nil)); end - - # source://spoom//lib/spoom/model/model.rb#158 - sig { returns(T::Array[::Spoom::Model::Sig]) } - def sigs; end - - # source://spoom//lib/spoom/model/model.rb#155 - sig { returns(::Spoom::Model::Visibility) } - def visibility; end -end - -# A reference to something that looks like a constant or a method -# -# Constants could be classes, modules, or actual constants. -# Methods could be accessors, instance or class methods, aliases, etc. -# -# source://spoom//lib/spoom/model/reference.rb#10 -class Spoom::Model::Reference < ::T::Struct - const :kind, ::Spoom::Model::Reference::Kind - const :name, ::String - const :location, ::Spoom::Location - - # source://spoom//lib/spoom/model/reference.rb#39 - sig { returns(T::Boolean) } - def constant?; end - - # source://spoom//lib/spoom/model/reference.rb#44 - sig { returns(T::Boolean) } - def method?; end - - class << self - # source://spoom//lib/spoom/model/reference.rb#24 - sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } - def constant(name, location); end - - # source://sorbet-runtime/0.5.11554/lib/types/struct.rb#13 - def inherited(s); end - - # source://spoom//lib/spoom/model/reference.rb#29 - sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } - def method(name, location); end - end -end - -# source://spoom//lib/spoom/model/reference.rb#13 -class Spoom::Model::Reference::Kind < ::T::Enum - enums do - Constant = new - Method = new - end -end - -# Visit a file to collect all the references to constants and methods -# -# source://spoom//lib/spoom/model/references_visitor.rb#7 -class Spoom::Model::ReferencesVisitor < ::Spoom::Visitor - # source://spoom//lib/spoom/model/references_visitor.rb#14 - sig { params(file: ::String).void } - def initialize(file); end - - # source://spoom//lib/spoom/model/references_visitor.rb#11 - sig { returns(T::Array[::Spoom::Model::Reference]) } - def references; end - - # source://spoom//lib/spoom/model/references_visitor.rb#22 - sig { override.params(node: ::Prism::AliasMethodNode).void } - def visit_alias_method_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#27 - sig { override.params(node: ::Prism::AndNode).void } - def visit_and_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#33 - sig { override.params(node: ::Prism::BlockArgumentNode).void } - def visit_block_argument_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#44 - sig { override.params(node: ::Prism::CallAndWriteNode).void } - def visit_call_and_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#68 - sig { override.params(node: ::Prism::CallNode).void } - def visit_call_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#52 - sig { override.params(node: ::Prism::CallOperatorWriteNode).void } - def visit_call_operator_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#60 - sig { override.params(node: ::Prism::CallOrWriteNode).void } - def visit_call_or_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#85 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#91 - sig { override.params(node: ::Prism::ConstantAndWriteNode).void } - def visit_constant_and_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#97 - sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } - def visit_constant_operator_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#103 - sig { override.params(node: ::Prism::ConstantOrWriteNode).void } - def visit_constant_or_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#109 - sig { override.params(node: ::Prism::ConstantPathNode).void } - def visit_constant_path_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#115 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#121 - sig { override.params(node: ::Prism::ConstantReadNode).void } - def visit_constant_read_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#126 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#131 - sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } - def visit_local_variable_and_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#139 - sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } - def visit_local_variable_operator_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#147 - sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } - def visit_local_variable_or_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#155 - sig { override.params(node: ::Prism::LocalVariableWriteNode).void } - def visit_local_variable_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#161 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#166 - sig { override.params(node: ::Prism::MultiWriteNode).void } - def visit_multi_write_node(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#177 - sig { override.params(node: ::Prism::OrNode).void } - def visit_or_node(node); end - - private - - # source://spoom//lib/spoom/model/references_visitor.rb#195 - sig { params(node: ::Prism::Node).returns(::Spoom::Location) } - def node_location(node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#185 - sig { params(name: ::String, node: ::Prism::Node).void } - def reference_constant(name, node); end - - # source://spoom//lib/spoom/model/references_visitor.rb#190 - sig { params(name: ::String, node: ::Prism::Node).void } - def reference_method(name, node); end -end - -# A Sorbet signature (sig block) -# -# source://spoom//lib/spoom/model/model.rb#216 -class Spoom::Model::Sig - # source://spoom//lib/spoom/model/model.rb#223 - sig { params(string: ::String).void } - def initialize(string); end - - # source://spoom//lib/spoom/model/model.rb#220 - sig { returns(::String) } - def string; end -end - -# source://spoom//lib/spoom/model/model.rb#115 -class Spoom::Model::SingletonClass < ::Spoom::Model::Namespace; end - -# A Symbol is a uniquely named entity in the Ruby codebase -# -# A symbol can have multiple definitions, e.g. a class can be reopened. -# Sometimes a symbol can have multiple definitions of different types, -# e.g. `foo` method can be defined both as a method and as an attribute accessor. -# -# source://spoom//lib/spoom/model/model.rb#15 -class Spoom::Model::Symbol - # source://spoom//lib/spoom/model/model.rb#27 - sig { params(full_name: ::String).void } - def initialize(full_name); end - - # The definitions of this symbol (where it exists in the code) - # - # source://spoom//lib/spoom/model/model.rb#24 - sig { returns(T::Array[::Spoom::Model::SymbolDef]) } - def definitions; end - - # The full, unique name of this symbol - # - # source://spoom//lib/spoom/model/model.rb#20 - sig { returns(::String) } - def full_name; end - - # The short name of this symbol - # - # source://spoom//lib/spoom/model/model.rb#34 - sig { returns(::String) } - def name; end - - # source://spoom//lib/spoom/model/model.rb#39 - sig { returns(::String) } - def to_s; end -end - -# A SymbolDef is a definition of a Symbol -# -# It can be a class, module, constant, method, etc. -# A SymbolDef has a location pointing to the actual code that defines the symbol. -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/model/model.rb#55 -class Spoom::Model::SymbolDef - abstract! - - # source://spoom//lib/spoom/model/model.rb#74 - sig do - params( - symbol: ::Spoom::Model::Symbol, - owner: T.nilable(::Spoom::Model::Namespace), - location: ::Spoom::Location - ).void - end - def initialize(symbol, owner:, location:); end - - # The full name of the symbol this definition belongs to - # - # source://spoom//lib/spoom/model/model.rb#85 - sig { returns(::String) } - def full_name; end - - # The actual code location of this definition - # - # source://spoom//lib/spoom/model/model.rb#71 - sig { returns(::Spoom::Location) } - def location; end - - # The short name of the symbol this definition belongs to - # - # source://spoom//lib/spoom/model/model.rb#91 - sig { returns(::String) } - def name; end - - # The enclosing namespace this definition belongs to - # - # source://spoom//lib/spoom/model/model.rb#67 - sig { returns(T.nilable(::Spoom::Model::Namespace)) } - def owner; end - - # The symbol this definition belongs to - # - # source://spoom//lib/spoom/model/model.rb#63 - sig { returns(::Spoom::Model::Symbol) } - def symbol; end -end - -# source://spoom//lib/spoom/model/model.rb#44 -class Spoom::Model::UnresolvedSymbol < ::Spoom::Model::Symbol - # source://spoom//lib/spoom/model/model.rb#46 - sig { override.returns(::String) } - def to_s; end -end - -# source://spoom//lib/spoom/model/model.rb#187 -class Spoom::Model::Visibility < ::T::Enum - enums do - Private = new - Protected = new - Public = new - end -end - -# source://spoom//lib/spoom/parse.rb#7 -class Spoom::ParseError < ::Spoom::Error; end - -# A Poset is a set of elements with a partial order relation. -# -# The partial order relation is a binary relation that is reflexive, antisymmetric, and transitive. -# It can be used to represent a hierarchy of classes or modules, the dependencies between gems, etc. -# -# source://spoom//lib/spoom/poset.rb#9 -class Spoom::Poset - extend T::Generic - - E = type_member { { upper: Object } } - - # source://spoom//lib/spoom/poset.rb#18 - sig { void } - def initialize; end - - # Get the POSet element for a given value - # - # Raises if the element is not found - # - # @raise [Error] - # - # source://spoom//lib/spoom/poset.rb#26 - sig { params(value: E).returns(Spoom::Poset::Element[E]) } - def [](value); end - - # Add a direct edge from one element to another - # - # Transitive edges (transitive closure) are automatically computed. - # Adds the elements if they don't exist. - # If the direct edge already exists, nothing is done. - # - # source://spoom//lib/spoom/poset.rb#54 - sig { params(from: E, to: E).void } - def add_direct_edge(from, to); end - - # Add an element to the POSet - # - # source://spoom//lib/spoom/poset.rb#35 - sig { params(value: E).returns(Spoom::Poset::Element[E]) } - def add_element(value); end - - # Is there a direct edge from `from` to `to`? - # - # source://spoom//lib/spoom/poset.rb#101 - sig { params(from: E, to: E).returns(T::Boolean) } - def direct_edge?(from, to); end - - # Is there an edge (direct or indirect) from `from` to `to`? - # - # source://spoom//lib/spoom/poset.rb#92 - sig { params(from: E, to: E).returns(T::Boolean) } - def edge?(from, to); end - - # Is the given value a element in the POSet? - # - # source://spoom//lib/spoom/poset.rb#44 - sig { params(value: E).returns(T::Boolean) } - def element?(value); end - - # Show the POSet as a DOT graph using xdot (used for debugging) - # - # source://spoom//lib/spoom/poset.rb#107 - sig { params(direct: T::Boolean, transitive: T::Boolean).void } - def show_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end - - # Return the POSet as a DOT graph - # - # source://spoom//lib/spoom/poset.rb#116 - sig { params(direct: T::Boolean, transitive: T::Boolean).returns(::String) } - def to_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end -end - -# An element in a POSet -# -# source://spoom//lib/spoom/poset.rb#136 -class Spoom::Poset::Element - extend T::Generic - include ::Comparable - - E = type_member { { upper: Object } } - - # source://spoom//lib/spoom/poset.rb#152 - sig { params(value: E).void } - def initialize(value); end - - # source://spoom//lib/spoom/poset.rb#161 - sig { params(other: T.untyped).returns(T.nilable(::Integer)) } - def <=>(other); end - - # Direct and indirect ancestors of this element - # - # source://spoom//lib/spoom/poset.rb#180 - sig { returns(T::Array[E]) } - def ancestors; end - - # Direct children of this element - # - # source://spoom//lib/spoom/poset.rb#186 - sig { returns(T::Array[E]) } - def children; end - - # Direct and indirect descendants of this element - # - # source://spoom//lib/spoom/poset.rb#192 - sig { returns(T::Array[E]) } - def descendants; end - - # Edges (direct and indirect) from this element to other elements in the same POSet - # - # @return [Set<Element[E]>] - # - # source://spoom//lib/spoom/poset.rb#149 - def dfroms; end - - # Edges (direct and indirect) from this element to other elements in the same POSet - # - # source://spoom//lib/spoom/poset.rb#149 - sig { returns(T::Set[Spoom::Poset::Element[E]]) } - def dtos; end - - # Edges (direct and indirect) from this element to other elements in the same POSet - # - # @return [Set<Element[E]>] - # - # source://spoom//lib/spoom/poset.rb#149 - def froms; end - - # Direct parents of this element - # - # source://spoom//lib/spoom/poset.rb#174 - sig { returns(T::Array[E]) } - def parents; end - - # Edges (direct and indirect) from this element to other elements in the same POSet - # - # @return [Set<Element[E]>] - # - # source://spoom//lib/spoom/poset.rb#149 - def tos; end - - # The value held by this element - # - # source://spoom//lib/spoom/poset.rb#145 - sig { returns(E) } - def value; end -end - -# source://spoom//lib/spoom/poset.rb#13 -class Spoom::Poset::Error < ::Spoom::Error; 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<String>] - # - # source://spoom//lib/spoom/sorbet/config.rb#32 - def allowed_extensions; end - - # @return [Array<String>] - # - # 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<String>] - # - # source://spoom//lib/spoom/sorbet/config.rb#32 - def ignore; end - - # @return [Array<String>] - # - # 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<String>] - # - # 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 < ::Spoom::Error - # 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#127 -class Spoom::Sorbet::Errors::Error - include ::Comparable - - # source://spoom//lib/spoom/sorbet/errors.rb#153 - 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#164 - sig { params(other: T.untyped).returns(::Integer) } - def <=>(other); end - - # @return [Integer, nil] - # - # source://spoom//lib/spoom/sorbet/errors.rb#135 - def code; end - - # source://spoom//lib/spoom/sorbet/errors.rb#132 - sig { returns(T.nilable(::String)) } - def file; end - - # Other files associated with the error - # - # source://spoom//lib/spoom/sorbet/errors.rb#142 - sig { returns(T::Set[::String]) } - def files_from_error_sections; end - - # source://spoom//lib/spoom/sorbet/errors.rb#135 - sig { returns(T.nilable(::Integer)) } - def line; end - - # @return [String, nil] - # - # source://spoom//lib/spoom/sorbet/errors.rb#132 - def message; end - - # source://spoom//lib/spoom/sorbet/errors.rb#138 - sig { returns(T::Array[::String]) } - def more; end - - # source://spoom//lib/spoom/sorbet/errors.rb#171 - 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#45 - sig { params(error_url_base: ::String).void } - def initialize(error_url_base: T.unsafe(nil)); end - - # source://spoom//lib/spoom/sorbet/errors.rb#52 - sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } - def parse(output); end - - private - - # @raise [ParseError] - # - # source://spoom//lib/spoom/sorbet/errors.rb#116 - sig { params(line: ::String).void } - def append_error(line); end - - # @raise [ParseError] - # - # source://spoom//lib/spoom/sorbet/errors.rb#108 - sig { void } - def close_error; end - - # source://spoom//lib/spoom/sorbet/errors.rb#75 - sig { params(error_url_base: ::String).returns(::Regexp) } - def error_line_match_regexp(error_url_base); end - - # source://spoom//lib/spoom/sorbet/errors.rb#92 - sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } - def match_error_line(line); end - - # @raise [ParseError] - # - # source://spoom//lib/spoom/sorbet/errors.rb#101 - sig { params(error: ::Spoom::Sorbet::Errors::Error).void } - def open_error(error); end - - class << self - # source://spoom//lib/spoom/sorbet/errors.rb#38 - 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#23 -Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/sorbet/errors.rb#21 -class Spoom::Sorbet::Errors::Parser::ParseError < ::Spoom::Error; end - -# 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) - -# source://spoom//lib/spoom/visitor.rb#7 -class Spoom::Visitor < ::Prism::Visitor - # source://spoom//lib/spoom/visitor.rb#16 - sig { override.params(node: ::Prism::AliasGlobalVariableNode).void } - def visit_alias_global_variable_node(node); end - - # source://spoom//lib/spoom/visitor.rb#21 - sig { override.params(node: ::Prism::AliasMethodNode).void } - def visit_alias_method_node(node); end - - # source://spoom//lib/spoom/visitor.rb#26 - sig { override.params(node: ::Prism::AlternationPatternNode).void } - def visit_alternation_pattern_node(node); end - - # source://spoom//lib/spoom/visitor.rb#31 - sig { override.params(node: ::Prism::AndNode).void } - def visit_and_node(node); end - - # source://spoom//lib/spoom/visitor.rb#36 - sig { override.params(node: ::Prism::ArgumentsNode).void } - def visit_arguments_node(node); end - - # source://spoom//lib/spoom/visitor.rb#41 - sig { override.params(node: ::Prism::ArrayNode).void } - def visit_array_node(node); end - - # source://spoom//lib/spoom/visitor.rb#46 - sig { override.params(node: ::Prism::ArrayPatternNode).void } - def visit_array_pattern_node(node); end - - # source://spoom//lib/spoom/visitor.rb#51 - sig { override.params(node: ::Prism::AssocNode).void } - def visit_assoc_node(node); end - - # source://spoom//lib/spoom/visitor.rb#56 - sig { override.params(node: ::Prism::AssocSplatNode).void } - def visit_assoc_splat_node(node); end - - # source://spoom//lib/spoom/visitor.rb#61 - sig { override.params(node: ::Prism::BackReferenceReadNode).void } - def visit_back_reference_read_node(node); end - - # source://spoom//lib/spoom/visitor.rb#66 - sig { override.params(node: ::Prism::BeginNode).void } - def visit_begin_node(node); end - - # source://spoom//lib/spoom/visitor.rb#71 - sig { override.params(node: ::Prism::BlockArgumentNode).void } - def visit_block_argument_node(node); end - - # source://spoom//lib/spoom/visitor.rb#76 - sig { override.params(node: ::Prism::BlockLocalVariableNode).void } - def visit_block_local_variable_node(node); end - - # source://spoom//lib/spoom/visitor.rb#81 - sig { override.params(node: ::Prism::BlockNode).void } - def visit_block_node(node); end - - # source://spoom//lib/spoom/visitor.rb#86 - sig { override.params(node: ::Prism::BlockParameterNode).void } - def visit_block_parameter_node(node); end - - # source://spoom//lib/spoom/visitor.rb#91 - sig { override.params(node: ::Prism::BlockParametersNode).void } - def visit_block_parameters_node(node); end - - # source://spoom//lib/spoom/visitor.rb#96 - sig { override.params(node: ::Prism::BreakNode).void } - def visit_break_node(node); end - - # source://spoom//lib/spoom/visitor.rb#101 - sig { override.params(node: ::Prism::CallAndWriteNode).void } - def visit_call_and_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#106 - sig { override.params(node: ::Prism::CallNode).void } - def visit_call_node(node); end - - # source://spoom//lib/spoom/visitor.rb#111 - sig { override.params(node: ::Prism::CallOperatorWriteNode).void } - def visit_call_operator_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#116 - sig { override.params(node: ::Prism::CallOrWriteNode).void } - def visit_call_or_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#121 - sig { override.params(node: ::Prism::CallTargetNode).void } - def visit_call_target_node(node); end - - # source://spoom//lib/spoom/visitor.rb#126 - sig { override.params(node: ::Prism::CapturePatternNode).void } - def visit_capture_pattern_node(node); end - - # source://spoom//lib/spoom/visitor.rb#131 - sig { override.params(node: ::Prism::CaseMatchNode).void } - def visit_case_match_node(node); end - - # source://spoom//lib/spoom/visitor.rb#136 - sig { override.params(node: ::Prism::CaseNode).void } - def visit_case_node(node); end - - # source://spoom//lib/spoom/visitor.rb#11 - sig { override.params(node: ::Prism::Node).void } - def visit_child_nodes(node); end - - # source://spoom//lib/spoom/visitor.rb#141 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end - - # source://spoom//lib/spoom/visitor.rb#146 - sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void } - def visit_class_variable_and_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#151 - sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void } - def visit_class_variable_operator_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#156 - sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void } - def visit_class_variable_or_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#161 - sig { override.params(node: ::Prism::ClassVariableReadNode).void } - def visit_class_variable_read_node(node); end - - # source://spoom//lib/spoom/visitor.rb#166 - sig { override.params(node: ::Prism::ClassVariableTargetNode).void } - def visit_class_variable_target_node(node); end - - # source://spoom//lib/spoom/visitor.rb#171 - sig { override.params(node: ::Prism::ClassVariableWriteNode).void } - def visit_class_variable_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#176 - sig { override.params(node: ::Prism::ConstantAndWriteNode).void } - def visit_constant_and_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#181 - sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } - def visit_constant_operator_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#186 - sig { override.params(node: ::Prism::ConstantOrWriteNode).void } - def visit_constant_or_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#191 - sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void } - def visit_constant_path_and_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#196 - sig { override.params(node: ::Prism::ConstantPathNode).void } - def visit_constant_path_node(node); end - - # source://spoom//lib/spoom/visitor.rb#201 - sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void } - def visit_constant_path_operator_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#206 - sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void } - def visit_constant_path_or_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#211 - sig { override.params(node: ::Prism::ConstantPathTargetNode).void } - def visit_constant_path_target_node(node); end - - # source://spoom//lib/spoom/visitor.rb#216 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#221 - sig { override.params(node: ::Prism::ConstantReadNode).void } - def visit_constant_read_node(node); end - - # source://spoom//lib/spoom/visitor.rb#226 - sig { override.params(node: ::Prism::ConstantTargetNode).void } - def visit_constant_target_node(node); end - - # source://spoom//lib/spoom/visitor.rb#231 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#236 - sig { override.params(node: ::Prism::DefNode).void } - def visit_def_node(node); end - - # source://spoom//lib/spoom/visitor.rb#241 - sig { override.params(node: ::Prism::DefinedNode).void } - def visit_defined_node(node); end - - # source://spoom//lib/spoom/visitor.rb#246 - sig { override.params(node: ::Prism::ElseNode).void } - def visit_else_node(node); end - - # source://spoom//lib/spoom/visitor.rb#251 - sig { override.params(node: ::Prism::EmbeddedStatementsNode).void } - def visit_embedded_statements_node(node); end - - # source://spoom//lib/spoom/visitor.rb#256 - sig { override.params(node: ::Prism::EmbeddedVariableNode).void } - def visit_embedded_variable_node(node); end - - # source://spoom//lib/spoom/visitor.rb#261 - sig { override.params(node: ::Prism::EnsureNode).void } - def visit_ensure_node(node); end - - # source://spoom//lib/spoom/visitor.rb#266 - sig { override.params(node: ::Prism::FalseNode).void } - def visit_false_node(node); end - - # source://spoom//lib/spoom/visitor.rb#271 - sig { override.params(node: ::Prism::FindPatternNode).void } - def visit_find_pattern_node(node); end - - # source://spoom//lib/spoom/visitor.rb#276 - sig { override.params(node: ::Prism::FlipFlopNode).void } - def visit_flip_flop_node(node); end - - # source://spoom//lib/spoom/visitor.rb#281 - sig { override.params(node: ::Prism::FloatNode).void } - def visit_float_node(node); end - - # source://spoom//lib/spoom/visitor.rb#286 - sig { override.params(node: ::Prism::ForNode).void } - def visit_for_node(node); end - - # source://spoom//lib/spoom/visitor.rb#291 - sig { override.params(node: ::Prism::ForwardingArgumentsNode).void } - def visit_forwarding_arguments_node(node); end - - # source://spoom//lib/spoom/visitor.rb#296 - sig { override.params(node: ::Prism::ForwardingParameterNode).void } - def visit_forwarding_parameter_node(node); end - - # source://spoom//lib/spoom/visitor.rb#301 - sig { override.params(node: ::Prism::ForwardingSuperNode).void } - def visit_forwarding_super_node(node); end - - # source://spoom//lib/spoom/visitor.rb#306 - sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void } - def visit_global_variable_and_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#311 - sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void } - def visit_global_variable_operator_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#316 - sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void } - def visit_global_variable_or_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#321 - sig { override.params(node: ::Prism::GlobalVariableReadNode).void } - def visit_global_variable_read_node(node); end - - # source://spoom//lib/spoom/visitor.rb#326 - sig { override.params(node: ::Prism::GlobalVariableTargetNode).void } - def visit_global_variable_target_node(node); end - - # source://spoom//lib/spoom/visitor.rb#331 - sig { override.params(node: ::Prism::GlobalVariableWriteNode).void } - def visit_global_variable_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#336 - sig { override.params(node: ::Prism::HashNode).void } - def visit_hash_node(node); end - - # source://spoom//lib/spoom/visitor.rb#341 - sig { override.params(node: ::Prism::HashPatternNode).void } - def visit_hash_pattern_node(node); end - - # source://spoom//lib/spoom/visitor.rb#346 - sig { override.params(node: ::Prism::IfNode).void } - def visit_if_node(node); end - - # source://spoom//lib/spoom/visitor.rb#351 - sig { override.params(node: ::Prism::ImaginaryNode).void } - def visit_imaginary_node(node); end - - # source://spoom//lib/spoom/visitor.rb#356 - sig { override.params(node: ::Prism::ImplicitNode).void } - def visit_implicit_node(node); end - - # source://spoom//lib/spoom/visitor.rb#361 - sig { override.params(node: ::Prism::ImplicitRestNode).void } - def visit_implicit_rest_node(node); end - - # source://spoom//lib/spoom/visitor.rb#366 - sig { override.params(node: ::Prism::InNode).void } - def visit_in_node(node); end - - # source://spoom//lib/spoom/visitor.rb#371 - sig { override.params(node: ::Prism::IndexAndWriteNode).void } - def visit_index_and_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#376 - sig { override.params(node: ::Prism::IndexOperatorWriteNode).void } - def visit_index_operator_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#381 - sig { override.params(node: ::Prism::IndexOrWriteNode).void } - def visit_index_or_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#386 - sig { override.params(node: ::Prism::IndexTargetNode).void } - def visit_index_target_node(node); end - - # source://spoom//lib/spoom/visitor.rb#391 - sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void } - def visit_instance_variable_and_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#396 - sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void } - def visit_instance_variable_operator_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#401 - sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void } - def visit_instance_variable_or_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#406 - sig { override.params(node: ::Prism::InstanceVariableReadNode).void } - def visit_instance_variable_read_node(node); end - - # source://spoom//lib/spoom/visitor.rb#411 - sig { override.params(node: ::Prism::InstanceVariableTargetNode).void } - def visit_instance_variable_target_node(node); end - - # source://spoom//lib/spoom/visitor.rb#416 - sig { override.params(node: ::Prism::InstanceVariableWriteNode).void } - def visit_instance_variable_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#421 - sig { override.params(node: ::Prism::IntegerNode).void } - def visit_integer_node(node); end - - # source://spoom//lib/spoom/visitor.rb#426 - sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void } - def visit_interpolated_match_last_line_node(node); end - - # source://spoom//lib/spoom/visitor.rb#431 - sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void } - def visit_interpolated_regular_expression_node(node); end - - # source://spoom//lib/spoom/visitor.rb#436 - sig { override.params(node: ::Prism::InterpolatedStringNode).void } - def visit_interpolated_string_node(node); end - - # source://spoom//lib/spoom/visitor.rb#441 - sig { override.params(node: ::Prism::InterpolatedSymbolNode).void } - def visit_interpolated_symbol_node(node); end - - # source://spoom//lib/spoom/visitor.rb#446 - sig { override.params(node: ::Prism::InterpolatedXStringNode).void } - def visit_interpolated_x_string_node(node); end - - # source://spoom//lib/spoom/visitor.rb#451 - sig { override.params(node: ::Prism::KeywordHashNode).void } - def visit_keyword_hash_node(node); end - - # source://spoom//lib/spoom/visitor.rb#456 - sig { override.params(node: ::Prism::KeywordRestParameterNode).void } - def visit_keyword_rest_parameter_node(node); end - - # source://spoom//lib/spoom/visitor.rb#461 - sig { override.params(node: ::Prism::LambdaNode).void } - def visit_lambda_node(node); end - - # source://spoom//lib/spoom/visitor.rb#466 - sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } - def visit_local_variable_and_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#471 - sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } - def visit_local_variable_operator_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#476 - sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } - def visit_local_variable_or_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#481 - sig { override.params(node: ::Prism::LocalVariableReadNode).void } - def visit_local_variable_read_node(node); end - - # source://spoom//lib/spoom/visitor.rb#486 - sig { override.params(node: ::Prism::LocalVariableTargetNode).void } - def visit_local_variable_target_node(node); end - - # source://spoom//lib/spoom/visitor.rb#491 - sig { override.params(node: ::Prism::LocalVariableWriteNode).void } - def visit_local_variable_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#496 - sig { override.params(node: ::Prism::MatchLastLineNode).void } - def visit_match_last_line_node(node); end - - # source://spoom//lib/spoom/visitor.rb#501 - sig { override.params(node: ::Prism::MatchPredicateNode).void } - def visit_match_predicate_node(node); end - - # source://spoom//lib/spoom/visitor.rb#506 - sig { override.params(node: ::Prism::MatchRequiredNode).void } - def visit_match_required_node(node); end - - # source://spoom//lib/spoom/visitor.rb#511 - sig { override.params(node: ::Prism::MatchWriteNode).void } - def visit_match_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#516 - sig { override.params(node: ::Prism::MissingNode).void } - def visit_missing_node(node); end - - # source://spoom//lib/spoom/visitor.rb#521 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end - - # source://spoom//lib/spoom/visitor.rb#526 - sig { override.params(node: ::Prism::MultiTargetNode).void } - def visit_multi_target_node(node); end - - # source://spoom//lib/spoom/visitor.rb#531 - sig { override.params(node: ::Prism::MultiWriteNode).void } - def visit_multi_write_node(node); end - - # source://spoom//lib/spoom/visitor.rb#536 - sig { override.params(node: ::Prism::NextNode).void } - def visit_next_node(node); end - - # source://spoom//lib/spoom/visitor.rb#541 - sig { override.params(node: ::Prism::NilNode).void } - def visit_nil_node(node); end - - # source://spoom//lib/spoom/visitor.rb#546 - sig { override.params(node: ::Prism::NoKeywordsParameterNode).void } - def visit_no_keywords_parameter_node(node); end - - # source://spoom//lib/spoom/visitor.rb#551 - sig { override.params(node: ::Prism::NumberedParametersNode).void } - def visit_numbered_parameters_node(node); end - - # source://spoom//lib/spoom/visitor.rb#556 - sig { override.params(node: ::Prism::NumberedReferenceReadNode).void } - def visit_numbered_reference_read_node(node); end - - # source://spoom//lib/spoom/visitor.rb#561 - sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void } - def visit_optional_keyword_parameter_node(node); end - - # source://spoom//lib/spoom/visitor.rb#566 - sig { override.params(node: ::Prism::OptionalParameterNode).void } - def visit_optional_parameter_node(node); end - - # source://spoom//lib/spoom/visitor.rb#571 - sig { override.params(node: ::Prism::OrNode).void } - def visit_or_node(node); end - - # source://spoom//lib/spoom/visitor.rb#576 - sig { override.params(node: ::Prism::ParametersNode).void } - def visit_parameters_node(node); end - - # source://spoom//lib/spoom/visitor.rb#581 - sig { override.params(node: ::Prism::ParenthesesNode).void } - def visit_parentheses_node(node); end - - # source://spoom//lib/spoom/visitor.rb#586 - sig { override.params(node: ::Prism::PinnedExpressionNode).void } - def visit_pinned_expression_node(node); end - - # source://spoom//lib/spoom/visitor.rb#591 - sig { override.params(node: ::Prism::PinnedVariableNode).void } - def visit_pinned_variable_node(node); end - - # source://spoom//lib/spoom/visitor.rb#596 - sig { override.params(node: ::Prism::PostExecutionNode).void } - def visit_post_execution_node(node); end - - # source://spoom//lib/spoom/visitor.rb#601 - sig { override.params(node: ::Prism::PreExecutionNode).void } - def visit_pre_execution_node(node); end - - # source://spoom//lib/spoom/visitor.rb#606 - sig { override.params(node: ::Prism::ProgramNode).void } - def visit_program_node(node); end - - # source://spoom//lib/spoom/visitor.rb#611 - sig { override.params(node: ::Prism::RangeNode).void } - def visit_range_node(node); end - - # source://spoom//lib/spoom/visitor.rb#616 - sig { override.params(node: ::Prism::RationalNode).void } - def visit_rational_node(node); end - - # source://spoom//lib/spoom/visitor.rb#621 - sig { override.params(node: ::Prism::RedoNode).void } - def visit_redo_node(node); end - - # source://spoom//lib/spoom/visitor.rb#626 - sig { override.params(node: ::Prism::RegularExpressionNode).void } - def visit_regular_expression_node(node); end - - # source://spoom//lib/spoom/visitor.rb#631 - sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void } - def visit_required_keyword_parameter_node(node); end - - # source://spoom//lib/spoom/visitor.rb#636 - sig { override.params(node: ::Prism::RequiredParameterNode).void } - def visit_required_parameter_node(node); end - - # source://spoom//lib/spoom/visitor.rb#641 - sig { override.params(node: ::Prism::RescueModifierNode).void } - def visit_rescue_modifier_node(node); end - - # source://spoom//lib/spoom/visitor.rb#646 - sig { override.params(node: ::Prism::RescueNode).void } - def visit_rescue_node(node); end - - # source://spoom//lib/spoom/visitor.rb#651 - sig { override.params(node: ::Prism::RestParameterNode).void } - def visit_rest_parameter_node(node); end - - # source://spoom//lib/spoom/visitor.rb#656 - sig { override.params(node: ::Prism::RetryNode).void } - def visit_retry_node(node); end - - # source://spoom//lib/spoom/visitor.rb#661 - sig { override.params(node: ::Prism::ReturnNode).void } - def visit_return_node(node); end - - # source://spoom//lib/spoom/visitor.rb#666 - sig { override.params(node: ::Prism::SelfNode).void } - def visit_self_node(node); end - - # source://spoom//lib/spoom/visitor.rb#671 - sig { override.params(node: ::Prism::SingletonClassNode).void } - def visit_singleton_class_node(node); end - - # source://spoom//lib/spoom/visitor.rb#676 - sig { override.params(node: ::Prism::SourceEncodingNode).void } - def visit_source_encoding_node(node); end - - # source://spoom//lib/spoom/visitor.rb#681 - sig { override.params(node: ::Prism::SourceFileNode).void } - def visit_source_file_node(node); end - - # source://spoom//lib/spoom/visitor.rb#686 - sig { override.params(node: ::Prism::SourceLineNode).void } - def visit_source_line_node(node); end - - # source://spoom//lib/spoom/visitor.rb#691 - sig { override.params(node: ::Prism::SplatNode).void } - def visit_splat_node(node); end - - # source://spoom//lib/spoom/visitor.rb#696 - sig { override.params(node: ::Prism::StatementsNode).void } - def visit_statements_node(node); end - - # source://spoom//lib/spoom/visitor.rb#701 - sig { override.params(node: ::Prism::StringNode).void } - def visit_string_node(node); end - - # source://spoom//lib/spoom/visitor.rb#706 - sig { override.params(node: ::Prism::SuperNode).void } - def visit_super_node(node); end - - # source://spoom//lib/spoom/visitor.rb#711 - sig { override.params(node: ::Prism::SymbolNode).void } - def visit_symbol_node(node); end - - # source://spoom//lib/spoom/visitor.rb#716 - sig { override.params(node: ::Prism::TrueNode).void } - def visit_true_node(node); end - - # source://spoom//lib/spoom/visitor.rb#721 - sig { override.params(node: ::Prism::UndefNode).void } - def visit_undef_node(node); end - - # source://spoom//lib/spoom/visitor.rb#726 - sig { override.params(node: ::Prism::UnlessNode).void } - def visit_unless_node(node); end - - # source://spoom//lib/spoom/visitor.rb#731 - sig { override.params(node: ::Prism::UntilNode).void } - def visit_until_node(node); end - - # source://spoom//lib/spoom/visitor.rb#736 - sig { override.params(node: ::Prism::WhenNode).void } - def visit_when_node(node); end - - # source://spoom//lib/spoom/visitor.rb#741 - sig { override.params(node: ::Prism::WhileNode).void } - def visit_while_node(node); end - - # source://spoom//lib/spoom/visitor.rb#746 - sig { override.params(node: ::Prism::XStringNode).void } - def visit_x_string_node(node); end - - # source://spoom//lib/spoom/visitor.rb#751 - sig { override.params(node: ::Prism::YieldNode).void } - def visit_yield_node(node); end -end diff --git a/tools/ruby-tools/sorbet/rbi/gems/tapioca@0.16.2.rbi b/tools/ruby-tools/sorbet/rbi/gems/tapioca@0.16.2.rbi deleted file mode 100644 index 66657cb..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/tapioca@0.16.2.rbi +++ /dev/null @@ -1,3574 +0,0 @@ -# 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.2.0/lib/rbi/model.rb#121 - 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.2.0/lib/rbi/model.rb#128 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi/0.2.0/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.2.0/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#90 - sig do - params( - name: ::String, - parameters: T::Array[::RBI::TypedParam], - return_type: T.nilable(::String), - class_method: T::Boolean, - visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Method).void) - ).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), &block); 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#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.2.0/lib/rbi/rewriters/deannotate.rb#41 - sig { params(annotation: ::String).void } - def deannotate!(annotation); end - - # source://rbi/0.2.0/lib/rbi/model.rb#134 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi/0.2.0/lib/rbi/rewriters/filter_versions.rb#118 - sig { params(version: ::Gem::Version).void } - def filter_versions!(version); end - - # source://rbi/0.2.0/lib/rbi/rewriters/flatten_singleton_methods.rb#60 - sig { void } - def flatten_singleton_methods!; end - - # source://rbi/0.2.0/lib/rbi/rewriters/flatten_visibilities.rb#60 - sig { void } - def flatten_visibilities!; end - - # source://rbi/0.2.0/lib/rbi/rewriters/group_nodes.rb#81 - sig { void } - def group_nodes!; end - - # source://rbi/0.2.0/lib/rbi/index.rb#68 - sig { returns(::RBI::Index) } - def index; end - - # source://rbi/0.2.0/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.2.0/lib/rbi/rewriters/nest_non_public_members.rb#46 - sig { void } - def nest_non_public_members!; end - - # source://rbi/0.2.0/lib/rbi/rewriters/nest_singleton_methods.rb#36 - sig { void } - def nest_singleton_methods!; end - - # source://rbi/0.2.0/lib/rbi/rewriters/nest_top_level_members.rb#63 - sig { void } - def nest_top_level_members!; end - - # source://rbi/0.2.0/lib/rbi/model.rb#112 - sig { returns(T::Array[::RBI::Node]) } - def nodes; end - - # source://rbi/0.2.0/lib/rbi/rewriters/attr_to_methods.rb#53 - sig { void } - def replace_attributes_with_methods!; end - - # source://rbi/0.2.0/lib/rbi/rewriters/sort_nodes.rb#119 - sig { void } - def sort_nodes!; end - - private - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#123 - sig { params(node: ::RBI::Node).returns(::RBI::Node) } - def create_node(node); end - - # source://tapioca//lib/tapioca/rbi_ext/model.rb#118 - sig { returns(T::Hash[::String, ::RBI::Node]) } - def nodes_cache; end -end - -# source://tapioca//lib/tapioca/rbi_ext/model.rb#133 -class RBI::TypedParam < ::T::Struct - const :param, ::RBI::Param - const :type, ::String - - class << self - # source://sorbet-runtime/0.5.11554/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#20 - 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#39 -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#62 -Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#61 -Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#60 -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#366 - def __print_version; end - - # source://tapioca//lib/tapioca/cli.rb#348 - def annotations; end - - # source://tapioca//lib/tapioca/cli.rb#320 - def check_shims; end - - # source://tapioca//lib/tapioca/cli.rb#46 - def configure; end - - # source://tapioca//lib/tapioca/cli.rb#147 - def dsl(*constant_or_paths); end - - # @raise [MalformattedArgumentError] - # - # source://tapioca//lib/tapioca/cli.rb#264 - 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#380 - def print_init_next_steps; end - - class << self - # source://tapioca//lib/tapioca/cli.rb#372 - 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#33 - 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, - compiler_options: T::Hash[::String, T.untyped] - ).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), compiler_options: T.unsafe(nil)); end - - private - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#100 - sig { returns(T::Array[::String]) } - def all_requested_constants; end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293 - 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#217 - 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#154 - 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#177 - 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#353 - sig { returns(T::Array[::String]) } - def constants_from_requested_paths; end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#123 - sig { returns(::Tapioca::Dsl::Pipeline) } - def create_pipeline; end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#256 - sig { params(constant_name: ::String).returns(::Pathname) } - def dsl_rbi_filename(constant_name); end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#140 - 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#348 - sig { params(constant: ::String).returns(::String) } - def generate_command_for(constant); end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#76 - 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#113 - sig { void } - def load_application; end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235 - sig { params(dir: ::Pathname).void } - def perform_dsl_verification(dir); end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#108 - sig { returns(::Tapioca::Dsl::Pipeline) } - def pipeline; end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#244 - sig { params(files: T::Set[::Pathname]).void } - def purge_stale_dsl_rbi_files(files); end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#343 - sig { params(constant: ::String).returns(::String) } - def rbi_filename_for(constant); end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#324 - sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } - def rbi_files_in(path); end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#302 - 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#197 - 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#331 - sig { params(class_name: ::String).returns(::String) } - def underscore(class_name); end - - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#261 - 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#230 - sig { returns(T::Array[::String]) } - def added_rbis; end - - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#291 - 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#225 - sig { params(gem_name: ::String).returns(::Pathname) } - def existing_rbi(gem_name); end - - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#273 - sig { returns(T::Hash[::String, ::String]) } - def existing_rbis; end - - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#237 - sig { params(gem_name: ::String).returns(::Pathname) } - def expected_rbi(gem_name); end - - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#279 - 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#242 - sig { params(gem_name: ::String).returns(T::Boolean) } - def gem_rbi_exists?(gem_name); end - - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#286 - 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#296 - 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#267 - sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } - def move(old_filename, new_filename); end - - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#177 - sig { void } - def perform_additions; end - - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#150 - sig { void } - def perform_removals; end - - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#220 - sig { returns(T::Array[::String]) } - def removed_rbis; end - - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#247 - 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#197 - sig { params(name: ::String, content: ::String).returns(::String) } - def add_header(name, content); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#217 - 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_info: ::Tapioca::GemInfo).void } - def fetch_annotation(repo_uris, gem_info); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#113 - sig { params(project_gems: T::Array[::Tapioca::GemInfo]).returns(T::Array[::String]) } - def fetch_annotations(project_gems); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#156 - 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#173 - 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#165 - 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#229 - sig { params(gem_version: ::Gem::Version, content: ::String).returns(::String) } - def filter_versions(gem_version, content); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#50 - sig { returns(T::Array[::Tapioca::GemInfo]) } - def list_gemfile_gems; end - - # source://tapioca//lib/tapioca/commands/annotations.rb#237 - 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[::Tapioca::GemInfo]).void } - def remove_expired_annotations(project_gems); end - - # source://tapioca//lib/tapioca/commands/annotations.rb#264 - sig { returns(T::Hash[::String, T.nilable(::String)]) } - def repo_tokens; end - - # source://tapioca//lib/tapioca/commands/annotations.rb#292 - 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#276 - 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.3.2/lib/thor/base.rb#155 - sig { returns(::Thor::Actions) } - def file_writer; end - - # source://tapioca//lib/tapioca/commands/command.rb#25 - sig(:final) { void } - def run; end - - private - - # source://tapioca//lib/tapioca/commands/command.rb#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#153 - sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) } - def build_error(msg); end - - # source://tapioca//lib/tapioca/helpers/config_helper.rb#178 - 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#196 - 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#148 -class Tapioca::ConfigHelper::ConfigError < ::T::Struct - const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] - - class << self - # source://sorbet-runtime/0.5.11554/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://tapioca//lib/tapioca/helpers/config_helper.rb#143 -class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct - const :message, ::String - const :colors, T::Array[::Symbol] - - class << self - # source://sorbet-runtime/0.5.11554/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://tapioca//lib/tapioca.rb#46 -Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#42 -Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#58 -Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#43 -Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#48 -Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) - -# source://tapioca//lib/tapioca.rb#40 -Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#41 -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#57 -Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://tapioca//lib/tapioca.rb#44 -Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#45 -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#74 - sig do - params( - pipeline: ::Tapioca::Dsl::Pipeline, - root: ::RBI::Tree, - constant: ConstantType, - options: T::Hash[::String, T.untyped] - ).void - end - def initialize(pipeline, root, constant, options = T.unsafe(nil)); end - - # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. - # - # source://tapioca//lib/tapioca/dsl/compiler.rb#92 - sig { params(error: ::String).void } - def add_error(error); end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#83 - 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#88 - sig { abstract.void } - def decorate; end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#26 - sig { returns(T::Hash[::String, T.untyped]) } - def options; end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#23 - sig { returns(::RBI::Tree) } - def root; end - - private - - # source://tapioca//lib/tapioca/dsl/compiler.rb#141 - 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#177 - 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#131 - 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#105 - 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#37 - sig { abstract.returns(T::Enumerable[::Module]) } - def gather_constants; end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#32 - sig { params(constant: ::Module).returns(T::Boolean) } - def handles?(constant); end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#40 - sig { returns(T::Set[::Module]) } - def processable_constants; end - - private - - # source://tapioca//lib/tapioca/dsl/compiler.rb#50 - sig { returns(T::Enumerable[T::Class[T.anything]]) } - def all_classes; end - - # source://tapioca//lib/tapioca/dsl/compiler.rb#58 - 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#39 - 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), - compiler_options: T::Hash[::String, T.untyped] - ).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), compiler_options: 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#102 - sig { params(error: ::String).void } - def add_error(error); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#107 - sig { params(compiler_name: ::String).returns(T::Boolean) } - def compiler_enabled?(compiler_name); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#116 - 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#67 - 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#223 - sig { void } - def abort_if_pending_migrations!; end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#168 - 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#133 - 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#147 - 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#197 - sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } - def rbi_for_constant(constant); end - - # source://tapioca//lib/tapioca/dsl/pipeline.rb#216 - 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#216 - sig { params(method: ::UnboundMethod).returns(T.untyped) } - def lookup_signature_of(method); 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#28 - 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#27 - sig do - params( - gem: ::Tapioca::Gemfile::GemSpec, - error_handler: T.proc.params(error: ::String).void, - include_doc: T::Boolean, - include_loc: T::Boolean - ).void - end - def initialize(gem, error_handler:, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#64 - sig { returns(::RBI::Tree) } - def compile; end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#135 - sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } - def constant_in_gem?(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#17 - sig { returns(T.proc.params(error: ::String).void) } - def error_handler; end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#14 - sig { returns(::Tapioca::Gemfile::GemSpec) } - def gem; end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#153 - sig { params(method: ::UnboundMethod).returns(T::Boolean) } - def method_in_gem?(method); end - - # Helpers - # - # source://tapioca//lib/tapioca/gem/pipeline.rb#163 - sig { params(constant: ::Module).returns(T.nilable(::String)) } - def name_of(constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#87 - sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } - def push_const(symbol, constant, node); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#77 - sig { params(symbol: ::String, constant: ::BasicObject).void } - def push_constant(symbol, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#82 - sig { params(symbol: ::String, constant: ::Module).void } - def push_foreign_constant(symbol, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#101 - 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#115 - 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#94 - 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#72 - sig { params(symbol: ::String).void } - def push_symbol(symbol); end - - # Constants and properties filtering - # - # source://tapioca//lib/tapioca/gem/pipeline.rb#122 - sig { params(symbol_name: ::String).returns(T::Boolean) } - def symbol_in_payload?(symbol_name); end - - private - - # source://tapioca//lib/tapioca/gem/pipeline.rb#456 - sig { params(name: ::String).void } - def add_to_alias_namespace(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#461 - sig { params(name: ::String).returns(T::Boolean) } - def alias_namespaced?(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#260 - sig { params(name: ::String, constant: ::Module).void } - def compile_alias(name, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#246 - sig { params(symbol: ::String, constant: ::BasicObject).void } - def compile_constant(symbol, constant); end - - # Compiling - # - # source://tapioca//lib/tapioca/gem/pipeline.rb#235 - sig { params(symbol: ::String, constant: ::Module).void } - def compile_foreign_constant(symbol, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#314 - sig { params(name: ::String, constant: ::Module).void } - def compile_module(name, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#281 - sig { params(name: ::String, value: ::BasicObject).void } - def compile_object(name, value); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#325 - sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } - def compile_scope(name, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#339 - sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } - def compile_superclass(constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#437 - 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#193 - sig { params(event: ::Tapioca::Gem::Event).void } - def dispatch(event); end - - # Helpers - # - # source://tapioca//lib/tapioca/gem/pipeline.rb#480 - sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } - def generic_name_of(constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#449 - sig { params(constant: ::Module).returns(T::Set[::String]) } - def get_file_candidates(constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#178 - sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } - def load_bootstrap_symbols(gem); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#496 - 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#188 - sig { returns(::Tapioca::Gem::Event) } - def next_event; end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#216 - sig { params(event: ::Tapioca::Gem::ConstantFound).void } - def on_constant(event); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#228 - sig { params(event: ::Tapioca::Gem::NodeAdded).void } - def on_node(event); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#207 - sig { params(event: ::Tapioca::Gem::SymbolFound).void } - def on_symbol(event); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#468 - sig { params(name: ::String).void } - def seen!(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#473 - sig { params(name: ::String).returns(T::Boolean) } - def seen?(name); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#407 - sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } - def skip_alias?(name, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#395 - sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } - def skip_constant?(name, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#424 - sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } - def skip_foreign_constant?(name, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#429 - sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } - def skip_module?(name, constant); end - - # source://tapioca//lib/tapioca/gem/pipeline.rb#416 - 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#390 - 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#132 -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/gem_info.rb#5 -class Tapioca::GemInfo < ::T::Struct - const :name, ::String - const :version, ::Gem::Version - - class << self - # source://tapioca//lib/tapioca/gem_info.rb#13 - sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } - def from_spec(spec); end - - # source://sorbet-runtime/0.5.11554/lib/types/struct.rb#13 - def inherited(s); end - 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.rb#33 -Tapioca::LIB_ROOT_DIR = T.let(T.unsafe(nil), String) - -# 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#88 - 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<String>] - # - # source://tapioca//lib/tapioca/loaders/loader.rb#234 - def eager_load_paths(engine); end - - # source://tapioca//lib/tapioca/loaders/loader.rb#199 - sig { void } - def eager_load_rails_app; end - - # @return [Array<T.class_of(Rails::Engine)>] - # - # source://tapioca//lib/tapioca/loaders/loader.rb#178 - 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#136 - sig { void } - def load_engines_in_classic_mode; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#114 - 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#89 - sig { void } - def load_rails_engines; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#220 - sig { params(file: T.nilable(::String)).void } - def require_helper(file); end - - # source://tapioca//lib/tapioca/loaders/loader.rb#103 - def run_initializers; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#192 - sig { params(path: ::String).void } - def safe_require(path); end - - # source://tapioca//lib/tapioca/loaders/loader.rb#161 - sig { params(blk: T.proc.void).void } - def with_rails_application(&blk); end - - # source://tapioca//lib/tapioca/loaders/loader.rb#154 - 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#223 - 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#228 - 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#238 - 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#248 - 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#216 - 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#280 - 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#253 - 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<Symbol>] - # - # 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<Symbol>] - # - # 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<Module>] - # - # 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<Symbol>] - # - # 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<Symbol>] - # - # 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 { override.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#201 - 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#172 - 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#194 - sig { params(constant: ::Module).returns(T::Set[::String]) } - def file_candidates_for(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#207 - 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#150 - 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#145 - 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 "<top (required)>". If none is found, it returns the location - # labeled "<main>", which is the original call site. - # - # source://tapioca//lib/tapioca/runtime/reflection.rb#184 - sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } - def resolve_loc(locations); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#212 - sig { params(constant: ::Module).returns(T::Boolean) } - def sealed_module?(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#138 - sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } - def signature_of(method); 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#249 - 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#265 - sig { params(name: ::String).returns(T::Boolean) } - def has_aliased_namespace?(name); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#260 - sig { params(method: ::UnboundMethod).returns(T::Boolean) } - def method_defined_by_forwardable_module?(method); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#235 - sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } - def methods_for(constant); end - - # source://tapioca//lib/tapioca/runtime/reflection.rb#219 - 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 - Extend = new - Include = new - Prepend = 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#35 -Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#34 -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<T.class_of(Rails::Engine)>] - # - # source://tapioca//lib/tapioca/static/symbol_loader.rb#69 - def engines; 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#37 -Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) - -# source://tapioca//lib/tapioca.rb#36 -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 - HasAttachedClass = new - Member = new - Template = 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#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.13.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.13.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) diff --git a/tools/ruby-tools/sorbet/rbi/gems/thor@1.3.2.rbi b/tools/ruby-tools/sorbet/rbi/gems/thor@1.3.2.rbi deleted file mode 100644 index 06a6a7c..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/thor@1.3.2.rbi +++ /dev/null @@ -1,4345 +0,0 @@ -# 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/shell/lcs_diff.rb#1 -module LCSDiff - protected - - # Overwrite show_diff to show diff with colors if Diff::LCS is - # available. - # - # source://thor//lib/thor/shell/lcs_diff.rb#6 - def show_diff(destination, content); end - - private - - # Check if Diff::LCS is loaded. If it is, use it to create pretty output - # for diff. - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/lcs_diff.rb#37 - def diff_lcs_loaded?; end - - # source://thor//lib/thor/shell/lcs_diff.rb#21 - def output_diff_line(diff); end -end - -# source://thor//lib/thor/command.rb#1 -class Thor - include ::Thor::Base - include ::Thor::Invocation - include ::Thor::Shell - extend ::Thor::Base::ClassMethods - extend ::Thor::Invocation::ClassMethods - - # source://thor//lib/thor.rb#663 - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - class << self - # Adds and declares option group for required at least one of options in the - # block of arguments. You can declare options as the outside of the block. - # - # If :for is given as option, it allows you to change the options from - # a previous defined command. - # - # ==== Parameters - # Array[Thor::Option.name] - # options<Hash>:: :for is applied for previous defined command. - # - # ==== Examples - # - # at_least_one do - # option :one - # option :two - # end - # - # Or - # - # option :one - # option :two - # at_least_one :one, :two - # - # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError - # will be raised. - # - # You can use at_least_one and exclusive at the same time. - # - # exclusive do - # at_least_one do - # option :one - # option :two - # end - # end - # - # Then it is required either only one of "--one" or "--two". - # - # source://thor//lib/thor.rb#246 - def at_least_one(*args, &block); end - - # Extend check unknown options to accept a hash of conditions. - # - # === Parameters - # options<Hash>: A hash containing :only and/or :except keys - # - # source://thor//lib/thor.rb#350 - def check_unknown_options!(options = T.unsafe(nil)); end - - # Overwrite check_unknown_options? to take subcommands and options into account. - # - # @return [Boolean] - # - # source://thor//lib/thor.rb#363 - def check_unknown_options?(config); end - - # Checks if a specified command exists. - # - # ==== Parameters - # command_name<String>:: The name of the command to check for existence. - # - # ==== Returns - # Boolean:: +true+ if the command exists, +false+ otherwise. - # - # @return [Boolean] - # - # source://thor//lib/thor.rb#449 - def command_exists?(command_name); end - - # Prints help information for the given command. - # - # ==== Parameters - # shell<Thor::Shell> - # command_name<String> - # - # source://thor//lib/thor.rb#258 - def command_help(shell, command_name); end - - # Sets the default command when thor is executed without an explicit command to be called. - # - # ==== Parameters - # meth<Symbol>:: 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<Symbol>:: 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<String> - # description<String> - # options<String> - # - # 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#434 - def disable_required_check!(*command_names); end - - # @return [Boolean] - # - # source://thor//lib/thor.rb#438 - def disable_required_check?(command); end - - # Adds and declares option group for exclusive options in the - # block and arguments. You can declare options as the outside of the block. - # - # If :for is given as option, it allows you to change the options from - # a previous defined command. - # - # ==== Parameters - # Array[Thor::Option.name] - # options<Hash>:: :for is applied for previous defined command. - # - # ==== Examples - # - # exclusive do - # option :one - # option :two - # end - # - # Or - # - # option :one - # option :two - # exclusive :one, :two - # - # If you give "--one" and "--two" at the same time ExclusiveArgumentsError - # will be raised. - # - # source://thor//lib/thor.rb#203 - def exclusive(*args, &block); end - - # Prints help information for this class. - # - # ==== Parameters - # shell<Thor::Shell> - # - # source://thor//lib/thor.rb#288 - def help(shell, subcommand = T.unsafe(nil)); end - - # Defines the long description of the next command. - # - # Long description is by default indented, line-wrapped and repeated whitespace merged. - # In order to print long description verbatim, with indentation and spacing exactly - # as found in the code, use the +wrap+ option - # - # long_desc 'your very long description', wrap: false - # - # ==== Parameters - # long description<String> - # options<Hash> - # - # source://thor//lib/thor.rb#78 - def long_desc(long_description, options = T.unsafe(nil)); end - - # Maps an input to a command. If you define: - # - # 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#101 - def map(mappings = T.unsafe(nil), **kw); end - - # Adds and declares option group for required at least one of options in the - # block of arguments. You can declare options as the outside of the block. - # - # If :for is given as option, it allows you to change the options from - # a previous defined command. - # - # ==== Parameters - # Array[Thor::Option.name] - # options<Hash>:: :for is applied for previous defined command. - # - # ==== Examples - # - # at_least_one do - # option :one - # option :two - # end - # - # Or - # - # option :one - # option :two - # at_least_one :one, :two - # - # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError - # will be raised. - # - # You can use at_least_one and exclusive at the same time. - # - # exclusive do - # at_least_one do - # option :one - # option :two - # end - # end - # - # Then it is required either only one of "--one" or "--two". - # - # source://thor//lib/thor.rb#246 - def method_at_least_one(*args, &block); end - - # Adds and declares option group for exclusive options in the - # block and arguments. You can declare options as the outside of the block. - # - # If :for is given as option, it allows you to change the options from - # a previous defined command. - # - # ==== Parameters - # Array[Thor::Option.name] - # options<Hash>:: :for is applied for previous defined command. - # - # ==== Examples - # - # exclusive do - # option :one - # option :two - # end - # - # Or - # - # option :one - # option :two - # exclusive :one, :two - # - # If you give "--one" and "--two" at the same time ExclusiveArgumentsError - # will be raised. - # - # source://thor//lib/thor.rb#203 - def method_exclusive(*args, &block); end - - # Adds an option to the set of method options. If :for is given as option, - # it allows you to change the options from a previous defined command. - # - # def previous_command - # # magic - # end - # - # method_option :foo, :for => :previous_command - # - # def next_command - # # magic - # end - # - # ==== Parameters - # name<Symbol>:: The name of the argument. - # options<Hash>:: 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#163 - 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#129 - 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, :for => :previous_command - # - # def next_command - # # magic - # end - # - # ==== Parameters - # name<Symbol>:: The name of the argument. - # options<Hash>:: 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#163 - 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#129 - def options(options = T.unsafe(nil)); end - - # Allows for custom "Command" package naming. - # - # === Parameters - # name<String> - # options<Hash> - # - # 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#309 - def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # Returns commands ready to be printed. - # - # source://thor//lib/thor.rb#309 - def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # Registers another Thor subclass as a command. - # - # ==== Parameters - # klass<Class>:: Thor subclass to register - # command<String>:: Subcommand name to use - # usage<String>:: Short usage for the subcommand - # description<String>:: 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#420 - def stop_on_unknown_option!(*command_names); end - - # @return [Boolean] - # - # source://thor//lib/thor.rb#424 - def stop_on_unknown_option?(command); end - - # source://thor//lib/thor.rb#329 - def subcommand(subcommand, subcommand_class); end - - # source://thor//lib/thor.rb#325 - def subcommand_classes; end - - # source://thor//lib/thor.rb#320 - def subcommands; end - - # source://thor//lib/thor.rb#329 - def subtask(subcommand, subcommand_class); end - - # source://thor//lib/thor.rb#320 - def subtasks; end - - # Prints help information for the given command. - # - # ==== Parameters - # shell<Thor::Shell> - # command_name<String> - # - # source://thor//lib/thor.rb#258 - 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#546 - def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://thor//lib/thor.rb#552 - def baseclass; end - - # source://thor//lib/thor.rb#560 - def create_command(meth); end - - # source://thor//lib/thor.rb#560 - def create_task(meth); end - - # help command has the required check disabled by default. - # - # source://thor//lib/thor.rb#478 - def disable_required_check; end - - # The method responsible for dispatching given the args. - # - # @yield [instance] - # - # source://thor//lib/thor.rb#505 - def dispatch(meth, given_args, given_opts, config); end - - # source://thor//lib/thor.rb#556 - 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#626 - 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#626 - def find_task_possibilities(meth); end - - # source://thor//lib/thor.rb#586 - def initialize_added; end - - # Returns this class at least one of required options array set. - # - # ==== Returns - # Array[Array[Thor::Option.name]] - # - # source://thor//lib/thor.rb#469 - def method_at_least_one_option_names; end - - # Returns this class exclusive options array set. - # - # ==== Returns - # Array[Array[Thor::Option.name]] - # - # source://thor//lib/thor.rb#460 - def method_exclusive_option_names; end - - # receives a (possibly nil) command name and returns a name that is in - # the commands hash. In addition to normalizing aliases, this logic - # will determine if a shortened command is an unambiguous substring of - # a command or alias. - # - # +normalize_command_name+ also converts names like +animal-prison+ - # into +animal_prison+. - # - # @raise [AmbiguousTaskError] - # - # source://thor//lib/thor.rb#605 - 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#605 - def normalize_task_name(meth); end - - # source://thor//lib/thor.rb#493 - def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end - - # source://thor//lib/thor.rb#482 - def print_exclusive_options(shell, command = T.unsafe(nil)); end - - # Retrieve the command name from given args. - # - # source://thor//lib/thor.rb#592 - def retrieve_command_name(args); end - - # Retrieve the command name from given args. - # - # source://thor//lib/thor.rb#592 - def retrieve_task_name(args); end - - # Sort the commands, lexicographically by default. - # - # Can be overridden in the subclass to change the display order of the - # commands. - # - # source://thor//lib/thor.rb#653 - def sort_commands!(list); end - - # source://thor//lib/thor.rb#473 - def stop_on_unknown_option; end - - # source://thor//lib/thor.rb#641 - def subcommand_help(cmd); end - - # source://thor//lib/thor.rb#641 - 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<Symbol>:: 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<String>:: 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<String>:: the relative path to the destination root. - # data<String|NilClass>:: the data to append to the file. - # config<Hash>:: 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<String>:: the relative path to the destination root. - # source<String|NilClass>:: the relative path to the source root. - # config<Hash>:: 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<String>:: path of the file to be changed - # data<String>:: the data to append to the file, can be also given as a block. - # config<Hash>:: 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#192 - def append_file(path, *args, &block); end - - # Append text to a file. Since it depends on insert_into_file, it's reversible. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # data<String>:: the data to append to the file, can be also given as a block. - # config<Hash>:: 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#192 - def append_to_file(path, *args, &block); end - - # Loads an external file and execute it in the instance binding. - # - # ==== Parameters - # path<String>:: 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<Integer>:: the file mode - # path<String>:: the name of the file to change mode - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Example - # - # chmod "script/server", 0755 - # - # source://thor//lib/thor/actions/file_manipulation.rb#145 - 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<String>:: path of the file to be changed - # flag<Regexp|String>:: the regexp or string used to decide which lines to comment - # config<Hash>:: 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#308 - def comment_lines(path, flag, *args); end - - # Copies 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<String>:: the relative path to the source root. - # destination<String>:: the relative path to the destination root. - # config<Hash>:: give :verbose => false to not log the status, and - # :mode => :preserve, to preserve the file mode from the source. - # - # ==== Examples - # - # copy_file "README", "doc/README" - # - # copy_file "doc/README" - # - # source://thor//lib/thor/actions/file_manipulation.rb#20 - 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<String>:: the relative path to the destination root. - # data<String|NilClass>:: the data to append to the file. - # config<Hash>:: 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<String>:: the relative path to the destination root. - # source<String|NilClass>:: the relative path to the source root. - # config<Hash>:: 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 - # - # <b>Encoded path note:</b> 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<String>:: the relative path to the source root. - # destination<String>:: the relative path to the destination root. - # config<Hash>:: 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<String>:: the relative path to the destination root. - # config<Hash>:: 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<String>:: the address of the given content. - # destination<String>:: the relative path to the destination root. - # config<Hash>:: give :verbose => false to not log the status, and - # :http_headers => <Hash> to add headers to an http request. - # - # ==== Examples - # - # get "http://gist.github.com/103208", "doc/README" - # - # get "http://gist.github.com/103208", "doc/README", :http_headers => {"Content-Type" => "application/json"} - # - # get "http://gist.github.com/103208" do |content| - # content.split("\n").first - # end - # - # source://thor//lib/thor/actions/file_manipulation.rb#81 - def get(source, *args, &block); end - - # Run a regular expression replacement on a file. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # flag<Regexp|String>:: the regexp or string to be replaced - # replacement<String>:: the replacement, can be also given as a block - # config<Hash>:: give :verbose => false to not log the status, and - # :force => true, to force the replacement regardless 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#262 - 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<String>:: path of the file to be changed - # klass<String|Class>:: the class to be manipulated - # data<String>:: the data to append to the class, can be also given as a block. - # config<Hash>:: 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#216 - 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<String>:: path of the file to be changed - # module_name<String|Class>:: the module to be manipulated - # data<String>:: the data to append to the class, can be also given as a block. - # config<Hash>:: 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#239 - 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<String>:: the directory to move to. - # config<Hash>:: 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<String>:: the relative path to the source root. - # destination<String>:: the relative path to the destination root. - # config<Hash>:: 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#50 - def link_file(source, *args); end - - # Prepend text to a file. Since it depends on insert_into_file, it's reversible. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # data<String>:: the data to prepend to the file, can be also given as a block. - # config<Hash>:: 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#170 - def prepend_file(path, *args, &block); end - - # Prepend text to a file. Since it depends on insert_into_file, it's reversible. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # data<String>:: the data to prepend to the file, can be also given as a block. - # config<Hash>:: 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#170 - 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<String>:: path of the file to be changed - # config<Hash>:: 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#325 - def remove_dir(path, config = T.unsafe(nil)); end - - # Removes a file at the given location. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # config<Hash>:: 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#325 - def remove_file(path, config = T.unsafe(nil)); end - - # Executes a command returning the contents of the command. - # - # ==== Parameters - # command<String>:: the command to be executed. - # config<Hash>:: 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<String>:: the command to be executed. - # config<Hash>:: 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<String>:: the relative path to the source root. - # destination<String>:: the relative path to the destination root. - # config<Hash>:: give :verbose => false to not log the status. - # - # ==== Examples - # - # template "README", "doc/README" - # - # template "doc/README" - # - # source://thor//lib/thor/actions/file_manipulation.rb#117 - 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<String>:: the command to be invoked - # args<Array>:: arguments to the command - # config<Hash>:: 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. Preserves indentation before - # the comment hash and removes the hash and any immediate following space. - # - # ==== Parameters - # path<String>:: path of the file to be changed - # flag<Regexp|String>:: the regexp or string used to decide which lines to uncomment - # config<Hash>:: 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#289 - 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#346 - def capture(*args); end - - # source://thor//lib/thor/actions/file_manipulation.rb#342 - def concat(string); end - - # Returns the value of attribute output_buffer. - # - # source://thor//lib/thor/actions/file_manipulation.rb#337 - 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#337 - def output_buffer=(_arg0); end - - # source://thor//lib/thor/actions/file_manipulation.rb#350 - 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#362 -class Thor::Actions::CapturableERB < ::ERB - # source://thor//lib/thor/actions/file_manipulation.rb#363 - 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#60 - def invoke!; end - - # Holds the content to be added to the file. - # - # source://thor//lib/thor/actions/create_file.rb#52 - 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#100 - def force_on_collision?; end - - # If force is true, run the action, otherwise check if it's not being - # skipped. If both are false, show the file_collision menu, if the menu - # returns true, force it, otherwise skip. - # - # source://thor//lib/thor/actions/create_file.rb#86 - def force_or_skip_or_conflict(force, skip, &block); end - - # Now on conflict we check if the file is identical or not. - # - # source://thor//lib/thor/actions/create_file.rb#73 - 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<Thor::Base>:: A Thor::Base instance - # source<String>:: Relative path to the source of this file - # destination<String>:: Relative path to the destination of this file - # config<Hash>:: 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#74 - def revoke!; end - - protected - - # source://thor//lib/thor/actions/inject_into_file.rb#110 - def content; end - - # Adds the content to the file. - # - # source://thor//lib/thor/actions/inject_into_file.rb#120 - def replace!(regexp, string, force); end - - # @return [Boolean] - # - # source://thor//lib/thor/actions/inject_into_file.rb#114 - def replacement_present?; end - - # source://thor//lib/thor/actions/inject_into_file.rb#90 - def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end -end - -# Injects the given content into a file. Different from gsub_file, this -# method is reversible. -# -# ==== Parameters -# destination<String>:: Relative path to the destination root -# data<String>:: Data to add to the file. Can be given as a block. -# config<Hash>:: 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#57 -class Thor::AmbiguousCommandError < ::Thor::Error; end - -# source://thor//lib/thor/error.rb#59 -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 - - # source://thor//lib/thor/parser/argument.rb#52 - def enum_to_s; 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 - - # source://thor//lib/thor/parser/argument.rb#27 - def print_default; end - - # Returns the value of attribute required. - # - # source://thor//lib/thor/parser/argument.rb#5 - def required; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/argument.rb#39 - def required?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/argument.rb#43 - 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#35 - def usage; end - - protected - - # source://thor//lib/thor/parser/argument.rb#71 - def default_banner; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/argument.rb#67 - def valid_type?(type); end - - # @raise [ArgumentError] - # - # source://thor//lib/thor/parser/argument.rb#62 - 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#40 - def parse(args); end - - # source://thor//lib/thor/parser/arguments.rb#53 - def remaining; end - - private - - # Raises an error if @non_assigned_required array is not empty. - # - # @raise [RequiredArgumentMissingError] - # - # source://thor//lib/thor/parser/arguments.rb#186 - def check_requirement!; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/arguments.rb#84 - def current_is_value?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/arguments.rb#64 - def last?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/arguments.rb#59 - def no_or_skip?(arg); end - - # Runs through the argument array getting all strings until no string is - # 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#118 - 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#97 - def parse_hash(name); end - - # Check if the peek is numeric format and return a Float or Integer. - # Check if the peek is included in enum if enum is provided. - # Otherwise raises an error. - # - # source://thor//lib/thor/parser/arguments.rb#139 - 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#158 - def parse_string(name); end - - # source://thor//lib/thor/parser/arguments.rb#68 - def peek; end - - # source://thor//lib/thor/parser/arguments.rb#72 - def shift; end - - # source://thor//lib/thor/parser/arguments.rb#76 - def unshift(arg); end - - # Raises an error if the switch is an enum and the values aren't included on it. - # - # source://thor//lib/thor/parser/arguments.rb#172 - def validate_enum_value!(name, value, message); end - - class << self - # source://thor//lib/thor/parser/arguments.rb#19 - def parse(*args); end - - # 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/error.rb#104 -class Thor::AtLeastOneRequiredArgumentError < ::Thor::InvocationError; end - -# 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<Array[Object]>:: An array of objects. The objects are applied to their - # respective accessors declared with <tt>argument</tt>. - # - # options<Hash>:: 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<Hash>:: 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#116 - def included(base); end - - # Whenever a class inherits from Thor or Thor::Group, we should track the - # class and the file on Thor::Base. This is the method responsible for it. - # - # source://thor//lib/thor/base.rb#144 - 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<String> => Class] - # - # source://thor//lib/thor/base.rb#137 - def subclass_files; end - - # Returns the classes that inherits from Thor or Thor::Group. - # - # ==== Returns - # Array[Class] - # - # source://thor//lib/thor/base.rb#128 - def subclasses; end - end -end - -# source://thor//lib/thor/base.rb#153 -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#482 - 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#482 - def all_tasks; end - - # If you want to use defaults that don't match the type of an option, - # either specify `check_default_type: false` or call `allow_incompatible_default_type!` - # - # source://thor//lib/thor/base.rb#189 - 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<Symbol>:: The name of the argument. - # options<Hash>:: 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#261 - 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#293 - def arguments; end - - # source://thor//lib/thor/base.rb#162 - def attr_accessor(*_arg0); end - - # source://thor//lib/thor/base.rb#154 - def attr_reader(*_arg0); end - - # source://thor//lib/thor/base.rb#158 - def attr_writer(*_arg0); end - - # source://thor//lib/thor/base.rb#193 - def check_default_type; end - - # If you want to raise an error when the default value of an option does not match - # the type call check_default_type! - # This will be the default; for compatibility a deprecation warning is issued if necessary. - # - # source://thor//lib/thor/base.rb#183 - def check_default_type!; end - - # source://thor//lib/thor/base.rb#172 - def check_unknown_options; end - - # If you want to raise an error for unknown options, call check_unknown_options! - # This is disabled by default to allow dynamic invocations. - # - # source://thor//lib/thor/base.rb#168 - def check_unknown_options!; end - - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#176 - def check_unknown_options?(config); end - - # Adds and declares option group for required at least one of options in the - # block and arguments. You can declare options as the outside of the block. - # - # ==== Examples - # - # class_at_least_one do - # class_option :one - # class_option :two - # end - # - # Or - # - # class_option :one - # class_option :two - # class_at_least_one :one, :two - # - # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError - # will be raised. - # - # You can use class_at_least_one and class_exclusive at the same time. - # - # class_exclusive do - # class_at_least_one do - # class_option :one - # class_option :two - # end - # end - # - # Then it is required either only one of "--one" or "--two". - # - # source://thor//lib/thor/base.rb#392 - def class_at_least_one(*args, &block); end - - # Returns this class at least one of required options array set, looking up in the ancestors chain. - # - # ==== Returns - # Array[Array[Thor::Option.name]] - # - # source://thor//lib/thor/base.rb#411 - def class_at_least_one_option_names; end - - # Adds and declares option group for exclusive options in the - # block and arguments. You can declare options as the outside of the block. - # - # ==== Parameters - # Array[Thor::Option.name] - # - # ==== Examples - # - # class_exclusive do - # class_option :one - # class_option :two - # end - # - # Or - # - # class_option :one - # class_option :two - # class_exclusive :one, :two - # - # If you give "--one" and "--two" at the same time ExclusiveArgumentsError - # will be raised. - # - # source://thor//lib/thor/base.rb#357 - def class_exclusive(*args, &block); end - - # Returns this class exclusive options array set, looking up in the ancestors chain. - # - # ==== Returns - # Array[Array[Thor::Option.name]] - # - # source://thor//lib/thor/base.rb#402 - def class_exclusive_option_names; end - - # Adds an option to the set of class options - # - # ==== Parameters - # name<Symbol>:: The name of the argument. - # options<Hash>:: 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. <b>Note:</b> 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#328 - 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#306 - 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#471 - 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#207 - def disable_required_check?(command_name); end - - # A flag that makes the process exit with status 1 if any error happens. - # - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#628 - 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<String|Symbol> - # - # source://thor//lib/thor/base.rb#457 - def group(name = T.unsafe(nil)); end - - # @raise [InvocationError] - # - # source://thor//lib/thor/base.rb#618 - def handle_argument_error(command, error, args, arity); end - - # @raise [UndefinedCommandError] - # - # source://thor//lib/thor/base.rb#613 - def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end - - # @raise [UndefinedCommandError] - # - # source://thor//lib/thor/base.rb#613 - def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end - - # Sets the namespace for the Thor or Thor::Group class. By default the - # 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#566 - 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#530 - def no_commands(&block); end - - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#540 - def no_commands?; end - - # source://thor//lib/thor/base.rb#536 - 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#530 - def no_tasks(&block); end - - # Allows to use private methods from parent in child classes as commands. - # - # ==== Parameters - # names<Array>:: Method names to be used as commands - # - # ==== Examples - # - # public_command :foo - # public_command :foo, :bar, :baz - # - # source://thor//lib/thor/base.rb#606 - def public_command(*names); end - - # Allows to use private methods from parent in child classes as commands. - # - # ==== Parameters - # names<Array>:: Method names to be used as commands - # - # ==== Examples - # - # public_command :foo - # public_command :foo, :bar, :baz - # - # source://thor//lib/thor/base.rb#606 - def public_task(*names); end - - # Removes a previous defined argument. If :undefine is given, undefine - # accessors as well. - # - # ==== Parameters - # names<Array>:: Arguments to be removed - # - # ==== Examples - # - # remove_argument :foo - # remove_argument :foo, :bar, :baz, :undefine => true - # - # source://thor//lib/thor/base.rb#426 - def remove_argument(*names); end - - # Removes a previous defined class option. - # - # ==== Parameters - # names<Array>:: Class options to be removed - # - # ==== Examples - # - # remove_class_option :foo - # remove_class_option :foo, :bar, :baz - # - # source://thor//lib/thor/base.rb#445 - def remove_class_option(*names); end - - # Removes a given command from this Thor class. This is usually done if you - # 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<Symbol|String>:: The name of the command to be removed - # options<Hash>:: 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#500 - 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<Symbol|String>:: The name of the command to be removed - # options<Hash>:: 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#500 - 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#582 - def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end - - # If true, option parsing is suspended as soon as an unknown option or a - # regular argument is encountered. All remaining arguments are passed to - # the command as regular arguments. - # - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#201 - def stop_on_unknown_option?(command_name); end - - # source://thor//lib/thor/base.rb#218 - def strict_args_position; end - - # If you want only strict string args (useful when cascading thor classes), - # call strict_args_position! This is disabled by default to allow dynamic - # invocations. - # - # source://thor//lib/thor/base.rb#214 - def strict_args_position!; end - - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#222 - 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#471 - def tasks; end - - protected - - # SIGNATURE: Sets the baseclass. This is where the superclass lookup - # finishes. - # - # source://thor//lib/thor/base.rb#777 - def baseclass; end - - # The basename of the program invoking the thor class. - # - # source://thor//lib/thor/base.rb#771 - def basename; end - - # Build an option and adds it to the given scope. - # - # ==== Parameters - # name<Symbol>:: The name of the argument. - # options<Hash>:: Described in both class_option and method_option. - # scope<Hash>:: Options hash that is being built up - # - # source://thor//lib/thor/base.rb#688 - def build_option(name, options, scope); end - - # Receives a hash of options, parse them and add to the scope. This is a - # 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#699 - def build_options(options, scope); end - - # Get target(method_options or class_options) options - # of before and after by block evaluation. - # - # source://thor//lib/thor/base.rb#808 - def built_option_names(target, opt = T.unsafe(nil), &block); end - - # Prints the class options per group. If an option does not belong to - # any group, it's printed as Class option. - # - # source://thor//lib/thor/base.rb#638 - def class_options_help(shell, groups = T.unsafe(nil)); end - - # Get command scope member by name. - # - # source://thor//lib/thor/base.rb#816 - def command_scope_member(name, options = T.unsafe(nil)); end - - # SIGNATURE: Creates a new command if valid_command? is true. This method is - # called when a new method is added to the class. - # - # source://thor//lib/thor/base.rb#782 - def create_command(meth); end - - # SIGNATURE: Creates a new command if valid_command? is true. This method is - # called when a new method is added to the class. - # - # source://thor//lib/thor/base.rb#782 - def create_task(meth); end - - # SIGNATURE: The hook invoked by start. - # - # @raise [NotImplementedError] - # - # source://thor//lib/thor/base.rb#792 - def dispatch(command, given_args, given_opts, config); end - - # Finds a command with the given name. If the command belongs to the current - # class, just return it, otherwise dup it and add the fresh copy to the - # current command hash. - # - # source://thor//lib/thor/base.rb#708 - def find_and_refresh_command(name); end - - # Finds a command with the given name. If the command belongs to the current - # class, just return it, otherwise dup it and add the fresh copy to the - # current command hash. - # - # source://thor//lib/thor/base.rb#708 - def find_and_refresh_task(name); end - - # Retrieves a value from superclass. If it reaches the baseclass, - # returns default. - # - # source://thor//lib/thor/base.rb#749 - def from_superclass(method, default = T.unsafe(nil)); end - - # Every time someone inherits from a Thor class, register the klass - # and file into baseclass. - # - # source://thor//lib/thor/base.rb#721 - def inherited(klass); end - - # SIGNATURE: Defines behavior when the initialize method is added to the - # class. - # - # source://thor//lib/thor/base.rb#788 - def initialize_added; end - - # Raises an error if the word given is a Thor reserved word. - # - # @return [Boolean] - # - # source://thor//lib/thor/base.rb#677 - def is_thor_reserved_word?(word, type); end - - # Fire this callback whenever a method is added. Added methods are - # tracked as commands by invoking the create_command method. - # - # source://thor//lib/thor/base.rb#729 - def method_added(meth); end - - # Receives a set of options and print them. - # - # source://thor//lib/thor/base.rb#656 - def print_options(shell, options, group_name = T.unsafe(nil)); end - - # Register a relation of options for target(method_option/class_option) - # by args and block. - # - # source://thor//lib/thor/base.rb#798 - def register_options_relation_for(target, relation, *args, &block); end -end - -# source://thor//lib/thor/command.rb#2 -class Thor::Command < ::Struct - # @return [Command] a new instance of Command - # - # source://thor//lib/thor/command.rb#5 - def initialize(name, description, long_description, wrap_long_description, usage, options = T.unsafe(nil), options_relation = T.unsafe(nil)); end - - # Returns the formatted usage by injecting given required arguments - # and required options into the given usage. - # - # source://thor//lib/thor/command.rb#42 - def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#15 - def hidden?; end - - # source://thor//lib/thor/command.rb#70 - def method_at_least_one_option_names; end - - # source://thor//lib/thor/command.rb#66 - def method_exclusive_option_names; end - - # By default, a command invokes a method in the thor class. You can change this - # implementation to create custom commands. - # - # source://thor//lib/thor/command.rb#21 - def run(instance, args = T.unsafe(nil)); end - - protected - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#114 - def handle_argument_error?(instance, error, caller); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#121 - def handle_no_method_error?(instance, error, caller); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#104 - def local_method?(instance, name); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#87 - def not_debugging?(instance); end - - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#100 - def private_method?(instance); end - - # Given a target, checks if this class name is a public method. - # - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#96 - def public_method?(instance); end - - # Add usage with required arguments - # - # source://thor//lib/thor/command.rb#77 - def required_arguments_for(klass, usage); end - - # source://thor//lib/thor/command.rb#91 - def required_options; end - - # source://thor//lib/thor/command.rb#109 - 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#45 - def key?(key); 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#57 - def merge!(other); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#72 - def replace(other_hash); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 - def reverse_merge(other); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 - def reverse_merge!(other_hash); end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 - def slice(*keys); end - - # Convert to a Hash with String keys. - # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#77 - def to_hash; end - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 - def values_at(*indices); end - - protected - - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#83 - 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#93 - def method_missing(method, *args); end -end - -# source://thor//lib/thor/error.rb#3 -module Thor::Correctable - # source://thor//lib/thor/error.rb#8 - def corrections; end - - # source://thor//lib/thor/error.rb#4 - def to_s; end -end - -# A dynamic command that handles method missing scenarios. -# -# source://thor//lib/thor/command.rb#137 -class Thor::DynamicCommand < ::Thor::Command - # @return [DynamicCommand] a new instance of DynamicCommand - # - # source://thor//lib/thor/command.rb#138 - def initialize(name, options = T.unsafe(nil)); end - - # source://thor//lib/thor/command.rb#142 - def run(instance, args = T.unsafe(nil)); end -end - -# source://thor//lib/thor/command.rb#150 -Thor::DynamicTask = Thor::DynamicCommand - -# Thor::Error is raised when it's caused by wrong usage of thor classes. Those -# 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#20 -class Thor::Error < ::StandardError; end - -# source://thor//lib/thor/error.rb#101 -class Thor::ExclusiveArgumentError < ::Thor::InvocationError; end - -# Thor has a special class called Thor::Group. The main difference to Thor class -# is that it invokes all commands at once. It also include some methods that allows -# invocations to be done at the class method, which are not available to Thor -# 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#276 - 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 - - # Checks if a specified command exists. - # - # ==== Parameters - # command_name<String>:: The name of the command to check for existence. - # - # ==== Returns - # Boolean:: +true+ if the command exists, +false+ otherwise. - # - # @return [Boolean] - # - # source://thor//lib/thor/group.rb#221 - def command_exists?(command_name); 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<String>:: 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#249 - def banner; end - - # source://thor//lib/thor/group.rb#259 - def baseclass; end - - # source://thor//lib/thor/group.rb#263 - def create_command(meth); end - - # source://thor//lib/thor/group.rb#263 - def create_task(meth); end - - # The method responsible for dispatching given the args. - # - # @yield [instance] - # - # source://thor//lib/thor/group.rb#228 - def dispatch(command, given_args, given_opts, config); end - - # Represents the whole class as a command. - # - # source://thor//lib/thor/group.rb#254 - def self_command; end - - # Represents the whole class as a command. - # - # source://thor//lib/thor/group.rb#254 - 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#129 -class Thor::HiddenCommand < ::Thor::Command - # @return [Boolean] - # - # source://thor//lib/thor/command.rb#130 - def hidden?; end -end - -# source://thor//lib/thor/command.rb#134 -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#62 -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#98 -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/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#99 - def aliases_for_usage; end - - # source://thor//lib/thor/parser/option.rb#118 - def array?; end - - # source://thor//lib/thor/parser/option.rb#118 - 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#118 - 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#118 - def numeric?; end - - # Returns the value of attribute repeatable. - # - # source://thor//lib/thor/parser/option.rb#3 - def repeatable; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/option.rb#107 - def show_default?; end - - # source://thor//lib/thor/parser/option.rb#118 - def string?; end - - # source://thor//lib/thor/parser/option.rb#75 - 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#168 - def dasherize(str); end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/option.rb#160 - def dasherized?; end - - # source://thor//lib/thor/parser/option.rb#164 - def undasherize(str); end - - # @raise [ArgumentError] - # - # source://thor//lib/thor/parser/option.rb#126 - def validate!; end - - # source://thor//lib/thor/parser/option.rb#131 - def validate_default_type!; end - - private - - # source://thor//lib/thor/parser/option.rb#174 - def normalize_aliases(aliases); end - - class << self - # This parse quick options given as method_options. It makes several - # assumptions, but you can be more specific using the option method. - # - # 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), relations = T.unsafe(nil)); end - - # source://thor//lib/thor/parser/options.rb#156 - def check_at_least_one!; end - - # source://thor//lib/thor/parser/options.rb#144 - def check_exclusive!; end - - # @raise [UnknownArgumentError] - # - # source://thor//lib/thor/parser/options.rb#168 - def check_unknown!; end - - # source://thor//lib/thor/parser/options.rb#89 - def parse(args); end - - # source://thor//lib/thor/parser/options.rb#65 - def peek; end - - # source://thor//lib/thor/parser/options.rb#61 - def remaining; end - - # source://thor//lib/thor/parser/options.rb#79 - def shift; end - - # source://thor//lib/thor/parser/options.rb#84 - def unshift(arg, is_value: T.unsafe(nil)); end - - protected - - # source://thor//lib/thor/parser/options.rb#189 - 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#203 - def current_is_switch?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/options.rb#215 - def current_is_switch_formatted?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/options.rb#225 - def current_is_value?; end - - # Option names changes to swith name or human name - # - # source://thor//lib/thor/parser/options.rb#179 - def names_to_switch_names(names = T.unsafe(nil)); end - - # Check if the given argument is actually a shortcut. - # - # source://thor//lib/thor/parser/options.rb#244 - def normalize_switch(arg); end - - # Parse boolean values which can be given as --foo=true or --foo for true values, or - # --foo=false, --no-foo or --skip-foo for false values. - # - # source://thor//lib/thor/parser/options.rb#256 - 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#274 - def parse_peek(switch, option); end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/options.rb#248 - def parsing_options?; end - - # @return [Boolean] - # - # source://thor//lib/thor/parser/options.rb#230 - def switch?(arg); end - - # source://thor//lib/thor/parser/options.rb#234 - 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) - -# source://thor//lib/thor/error.rb#95 -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<Object>:: 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#7 -class Thor::Shell::Basic - # Initialize base, mute and padding to nil. - # - # @return [Basic] a new instance of Basic - # - # source://thor//lib/thor/shell/basic.rb#13 - 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 => "Neptune") - # - # 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#80 - def ask(statement, *args); end - - # Returns the value of attribute base. - # - # source://thor//lib/thor/shell/basic.rb#8 - def base; end - - # Sets the attribute base - # - # @param value the value to set the attribute base to. - # - # source://thor//lib/thor/shell/basic.rb#8 - 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#251 - 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<String>:: the destination file to solve conflicts - # block<Proc>:: an optional block that returns the value to be used in diff and merge - # - # source://thor//lib/thor/shell/basic.rb#207 - def file_collision(destination); end - - # Sets the output padding while executing a block and resets it. - # - # source://thor//lib/thor/shell/basic.rb#43 - def indent(count = T.unsafe(nil)); end - - # Mute everything that's inside given block - # - # source://thor//lib/thor/shell/basic.rb#22 - def mute; end - - # Check if base is muted - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#31 - def mute?; end - - # Asks the user a question and returns true if the user replies "n" or - # "no". - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#156 - def no?(statement, color = T.unsafe(nil)); end - - # Returns the value of attribute padding. - # - # source://thor//lib/thor/shell/basic.rb#9 - def padding; end - - # Sets the output padding, not allowing less than zero values. - # - # source://thor//lib/thor/shell/basic.rb#37 - def padding=(value); end - - # Prints values in columns - # - # ==== Parameters - # Array[String, String, ...] - # - # source://thor//lib/thor/shell/basic.rb#165 - def print_in_columns(array); end - - # Prints a table. - # - # ==== Parameters - # Array[Array[String, String, ...]] - # - # ==== Options - # indent<Integer>:: Indent the first column by indent value. - # colwidth<Integer>:: Force the first column to colwidth spaces wide. - # borders<Boolean>:: Adds ascii borders. - # - # source://thor//lib/thor/shell/basic.rb#180 - def print_table(array, options = T.unsafe(nil)); end - - # Prints a long string, word-wrapping the text to the current width of the - # terminal display. Ideal for printing heredocs. - # - # ==== Parameters - # String - # - # ==== Options - # indent<Integer>:: Indent each line of the printed paragraph by indent value. - # - # source://thor//lib/thor/shell/basic.rb#194 - def print_wrapped(message, options = T.unsafe(nil)); end - - # Say (print) something to the user. If the sentence ends with a whitespace - # 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#98 - def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end - - # Say (print) an error to the user. If the sentence ends with a whitespace - # 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#115 - def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end - - # Say a status with the given color and appends the message. Since this - # 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#130 - def say_status(status, message, log_status = T.unsafe(nil)); end - - # Apply color to the given string with optional bold. Disabled in the - # Thor::Shell::Basic class. - # - # source://thor//lib/thor/shell/basic.rb#258 - def set_color(string, *_arg1); end - - # Asks the user a question and returns true if the user replies "y" or - # "yes". - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#149 - def yes?(statement, color = T.unsafe(nil)); end - - protected - - # source://thor//lib/thor/shell/basic.rb#362 - def answer_match(possibilities, answer, case_insensitive); end - - # source://thor//lib/thor/shell/basic.rb#349 - def ask_filtered(statement, color, options); end - - # source://thor//lib/thor/shell/basic.rb#332 - def ask_simply(statement, color, options); end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#269 - def can_display_colors?; end - - # source://thor//lib/thor/shell/basic.rb#296 - def file_collision_help(block_given); end - - # source://thor//lib/thor/shell/basic.rb#383 - def git_merge_tool; end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#286 - def is?(value); end - - # source://thor//lib/thor/shell/basic.rb#273 - def lookup_color(color); end - - # source://thor//lib/thor/shell/basic.rb#370 - def merge(destination, content); end - - # source://thor//lib/thor/shell/basic.rb#379 - def merge_tool; end - - # source://thor//lib/thor/shell/basic.rb#264 - def prepare_message(message, *color); end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#324 - def quiet?; end - - # source://thor//lib/thor/shell/basic.rb#313 - def show_diff(destination, content); end - - # source://thor//lib/thor/shell/basic.rb#282 - def stderr; end - - # source://thor//lib/thor/shell/basic.rb#278 - def stdout; end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/basic.rb#328 - def unix?; end -end - -# Inherit from Thor::Shell::Basic and add set_color behavior. Check -# Thor::Shell::Basic to see all available methods. -# -# source://thor//lib/thor/shell/color.rb#9 -class Thor::Shell::Color < ::Thor::Shell::Basic - include ::LCSDiff - - # Set color by using a string or one of the defined constants. If a third - # option is set to true, it also adds bold to the string. This is based - # on Highline implementation and it automatically appends CLEAR to the end - # 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#82 - def set_color(string, *colors); end - - protected - - # @return [Boolean] - # - # source://thor//lib/thor/shell/color.rb#110 - def are_colors_disabled?; end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/color.rb#106 - def are_colors_supported?; end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/color.rb#102 - def can_display_colors?; end -end - -# Set the terminal's foreground ANSI color to black. -# -# source://thor//lib/thor/shell/color.rb#18 -Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to blue. -# -# source://thor//lib/thor/shell/color.rb#26 -Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) - -# The start of an ANSI bold sequence. -# -# source://thor//lib/thor/shell/color.rb#15 -Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) - -# Embed in a String to clear all previous ANSI sequences. -# -# source://thor//lib/thor/shell/color.rb#13 -Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to cyan. -# -# source://thor//lib/thor/shell/color.rb#30 -Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to green. -# -# source://thor//lib/thor/shell/color.rb#22 -Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to magenta. -# -# source://thor//lib/thor/shell/color.rb#28 -Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to black. -# -# source://thor//lib/thor/shell/color.rb#35 -Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to blue. -# -# source://thor//lib/thor/shell/color.rb#43 -Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to cyan. -# -# source://thor//lib/thor/shell/color.rb#47 -Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to green. -# -# source://thor//lib/thor/shell/color.rb#39 -Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to magenta. -# -# source://thor//lib/thor/shell/color.rb#45 -Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to red. -# -# source://thor//lib/thor/shell/color.rb#37 -Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to white. -# -# source://thor//lib/thor/shell/color.rb#49 -Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) - -# Set the terminal's background ANSI color to yellow. -# -# source://thor//lib/thor/shell/color.rb#41 -Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to red. -# -# source://thor//lib/thor/shell/color.rb#20 -Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to white. -# -# source://thor//lib/thor/shell/color.rb#32 -Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground ANSI color to yellow. -# -# source://thor//lib/thor/shell/color.rb#24 -Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) - -# source://thor//lib/thor/shell/column_printer.rb#5 -class Thor::Shell::ColumnPrinter - # @return [ColumnPrinter] a new instance of ColumnPrinter - # - # source://thor//lib/thor/shell/column_printer.rb#8 - def initialize(stdout, options = T.unsafe(nil)); end - - # Returns the value of attribute options. - # - # source://thor//lib/thor/shell/column_printer.rb#6 - def options; end - - # source://thor//lib/thor/shell/column_printer.rb#14 - def print(array); end - - # Returns the value of attribute stdout. - # - # source://thor//lib/thor/shell/column_printer.rb#6 - def stdout; end -end - -# Inherit from Thor::Shell::Basic and add set_color behavior. Check -# Thor::Shell::Basic to see all available methods. -# -# source://thor//lib/thor/shell/html.rb#9 -class Thor::Shell::HTML < ::Thor::Shell::Basic - include ::LCSDiff - - # 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#73 - 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#54 - def set_color(string, *colors); end - - protected - - # @return [Boolean] - # - # source://thor//lib/thor/shell/html.rb#79 - def can_display_colors?; end -end - -# Set the terminal's foreground HTML color to black. -# -# source://thor//lib/thor/shell/html.rb#16 -Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to blue. -# -# source://thor//lib/thor/shell/html.rb#24 -Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) - -# The start of an HTML bold sequence. -# -# source://thor//lib/thor/shell/html.rb#13 -Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to cyan. -# -# source://thor//lib/thor/shell/html.rb#28 -Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to green. -# -# source://thor//lib/thor/shell/html.rb#20 -Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to magenta. -# -# source://thor//lib/thor/shell/html.rb#26 -Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to black. -# -# source://thor//lib/thor/shell/html.rb#33 -Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to blue. -# -# source://thor//lib/thor/shell/html.rb#41 -Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to cyan. -# -# source://thor//lib/thor/shell/html.rb#45 -Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to green. -# -# source://thor//lib/thor/shell/html.rb#37 -Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to magenta. -# -# source://thor//lib/thor/shell/html.rb#43 -Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to red. -# -# source://thor//lib/thor/shell/html.rb#35 -Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to white. -# -# source://thor//lib/thor/shell/html.rb#47 -Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) - -# Set the terminal's background HTML color to yellow. -# -# source://thor//lib/thor/shell/html.rb#39 -Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to red. -# -# source://thor//lib/thor/shell/html.rb#18 -Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to white. -# -# source://thor//lib/thor/shell/html.rb#30 -Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) - -# Set the terminal's foreground HTML color to yellow. -# -# source://thor//lib/thor/shell/html.rb#22 -Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) - -# source://thor//lib/thor/shell.rb#24 -Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) - -# source://thor//lib/thor/shell/table_printer.rb#6 -class Thor::Shell::TablePrinter < ::Thor::Shell::ColumnPrinter - # @return [TablePrinter] a new instance of TablePrinter - # - # source://thor//lib/thor/shell/table_printer.rb#9 - def initialize(stdout, options = T.unsafe(nil)); end - - # source://thor//lib/thor/shell/table_printer.rb#18 - def print(array); end - - private - - # source://thor//lib/thor/shell/table_printer.rb#72 - def format_cell(column, row_size, index); end - - # source://thor//lib/thor/shell/table_printer.rb#113 - def indentation; end - - # source://thor//lib/thor/shell/table_printer.rb#47 - def prepare(array); end - - # source://thor//lib/thor/shell/table_printer.rb#96 - def print_border_separator; end - - # source://thor//lib/thor/shell/table_printer.rb#103 - def truncate(string); end -end - -# source://thor//lib/thor/shell/table_printer.rb#7 -Thor::Shell::TablePrinter::BORDER_SEPARATOR = T.let(T.unsafe(nil), Symbol) - -# source://thor//lib/thor/shell/terminal.rb#3 -module Thor::Shell::Terminal - class << self - # source://thor//lib/thor/shell/terminal.rb#9 - def terminal_width; end - - # @return [Boolean] - # - # source://thor//lib/thor/shell/terminal.rb#20 - def unix?; end - - private - - # Calculate the dynamic width of the terminal - # - # source://thor//lib/thor/shell/terminal.rb#27 - def dynamic_width; end - - # source://thor//lib/thor/shell/terminal.rb#31 - def dynamic_width_stty; end - - # source://thor//lib/thor/shell/terminal.rb#35 - def dynamic_width_tput; end - end -end - -# source://thor//lib/thor/shell/terminal.rb#4 -Thor::Shell::Terminal::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) - -# source://thor//lib/thor/shell/wrapped_printer.rb#6 -class Thor::Shell::WrappedPrinter < ::Thor::Shell::ColumnPrinter - # source://thor//lib/thor/shell/wrapped_printer.rb#7 - def print(message); end -end - -# source://thor//lib/thor/base.rb#23 -Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) - -# 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#126 -Thor::Task = Thor::Command - -# Raised when a command was not found. -# -# source://thor//lib/thor/error.rb#24 -class Thor::UndefinedCommandError < ::Thor::Error - include ::Thor::Correctable - - # @return [UndefinedCommandError] a new instance of UndefinedCommandError - # - # source://thor//lib/thor/error.rb#43 - def initialize(command, all_commands, namespace); end - - # Returns the value of attribute all_commands. - # - # source://thor//lib/thor/error.rb#41 - def all_commands; end - - # Returns the value of attribute command. - # - # source://thor//lib/thor/error.rb#41 - def command; end -end - -# source://thor//lib/thor/error.rb#25 -class Thor::UndefinedCommandError::SpellChecker - # @return [SpellChecker] a new instance of SpellChecker - # - # source://thor//lib/thor/error.rb#28 - def initialize(error); end - - # source://thor//lib/thor/error.rb#32 - def corrections; end - - # Returns the value of attribute error. - # - # source://thor//lib/thor/error.rb#26 - def error; end - - # source://thor//lib/thor/error.rb#36 - def spell_checker; end -end - -# source://thor//lib/thor/error.rb#55 -Thor::UndefinedTaskError = Thor::UndefinedCommandError - -# source://thor//lib/thor/error.rb#65 -class Thor::UnknownArgumentError < ::Thor::Error - include ::Thor::Correctable - - # @return [UnknownArgumentError] a new instance of UnknownArgumentError - # - # source://thor//lib/thor/error.rb#85 - def initialize(switches, unknown); end - - # Returns the value of attribute switches. - # - # source://thor//lib/thor/error.rb#83 - def switches; end - - # Returns the value of attribute unknown. - # - # source://thor//lib/thor/error.rb#83 - def unknown; end -end - -# source://thor//lib/thor/error.rb#66 -class Thor::UnknownArgumentError::SpellChecker - # @return [SpellChecker] a new instance of SpellChecker - # - # source://thor//lib/thor/error.rb#69 - def initialize(error); end - - # source://thor//lib/thor/error.rb#73 - def corrections; end - - # Returns the value of attribute error. - # - # source://thor//lib/thor/error.rb#67 - def error; end - - # source://thor//lib/thor/error.rb#78 - 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#264 - def escape_globs(path); end - - # Returns a string that has had any HTML characters escaped. - # - # ==== Examples - # - # Thor::Util.escape_html('<div>') # => "<div>" - # - # ==== Parameters - # String - # - # ==== Returns - # String - # - # source://thor//lib/thor/util.rb#280 - def escape_html(string); end - - # Receives a namespace and search for it in the Thor::Base subclasses. - # - # ==== Parameters - # namespace<String>:: 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<String> - # - # 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<String> - # - # 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#213 - def globs_for(path); end - - # Receives a path and load the thor file in the path. The file is evaluated - # inside the sandbox to avoid namespacing conflicts. - # - # source://thor//lib/thor/util.rb#153 - def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end - - # Receives a constant and converts it to a Thor namespace. Since Thor - # 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<Object>:: 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<String> - # - # ==== 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#221 - 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#192 - 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#203 - def thor_root_glob; end - - # source://thor//lib/thor/util.rb#168 - def user_home; end - end -end diff --git a/tools/ruby-tools/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi b/tools/ruby-tools/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi deleted file mode 100644 index 2993f8e..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +++ /dev/null @@ -1,435 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `yard-sorbet` gem. -# Please instead update this file by running `bin/tapioca gem yard-sorbet`. - - -class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base - include ::YARDSorbet::Handlers::StructClassHandler -end - -# Types are documentation -# -# source://yard-sorbet//lib/yard-sorbet/version.rb#5 -module YARDSorbet; end - -# Extract & re-add directives to a docstring -# -# source://yard-sorbet//lib/yard-sorbet/directives.rb#6 -module YARDSorbet::Directives - class << self - # source://yard-sorbet//lib/yard-sorbet/directives.rb#21 - sig { params(docstring: ::String, directives: T::Array[::String]).void } - def add_directives(docstring, directives); end - - # source://yard-sorbet//lib/yard-sorbet/directives.rb#10 - sig { params(docstring: T.nilable(::String)).returns([::YARD::Docstring, T::Array[::String]]) } - def extract_directives(docstring); end - end -end - -# Custom YARD Handlers -# -# @see https://rubydoc.info/gems/yard/YARD/Handlers/Base YARD Base Handler documentation -# -# source://yard-sorbet//lib/yard-sorbet/handlers.rb#7 -module YARDSorbet::Handlers; end - -# Applies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present). -# -# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#7 -class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base - # source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#21 - sig { void } - def process; end -end - -# Extra text for class namespaces -# -# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#18 -YARDSorbet::Handlers::AbstractDSLHandler::CLASS_TAG_TEXT = T.let(T.unsafe(nil), String) - -# The text accompanying the `@abstract` tag. -# -# @see https://github.com/lsegal/yard/blob/main/templates/default/docstring/html/abstract.erb The `@abstract` tag template -# -# source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#16 -YARDSorbet::Handlers::AbstractDSLHandler::TAG_TEXT = T.let(T.unsafe(nil), String) - -# Handle `enums` calls, registering enum values as constants -# -# source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#7 -class YARDSorbet::Handlers::EnumsHandler < ::YARD::Handlers::Ruby::Base - # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#14 - sig { void } - def process; end - - private - - # source://yard-sorbet//lib/yard-sorbet/handlers/enums_handler.rb#29 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } - def const_assign_node?(node); end -end - -# Extends any modules included via `mixes_in_class_methods` -# -# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation -# -# source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#9 -class YARDSorbet::Handlers::IncludeHandler < ::YARD::Handlers::Ruby::Base - # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#16 - sig { void } - def process; end - - private - - # source://yard-sorbet//lib/yard-sorbet/handlers/include_handler.rb#28 - sig { returns(::YARD::CodeObjects::NamespaceObject) } - def included_in; end -end - -# Tracks modules that invoke `mixes_in_class_methods` for use in {IncludeHandler} -# -# @see https://sorbet.org/docs/abstract#interfaces-and-the-included-hook Sorbet `mixes_in_class_methods` documentation -# -# source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#9 -class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base - # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#21 - sig { void } - def process; end - - class << self - # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#18 - sig { params(code_obj: ::String).returns(T.nilable(T::Array[::String])) } - def mixed_in_class_methods(code_obj); end - end -end - -# A YARD Handler for Sorbet type declarations -# -# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#7 -class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base - # Swap the method definition docstring and the sig docstring. - # Parse relevant parts of the `sig` and include them as well. - # - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#24 - sig { void } - def process; end - - private - - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73 - sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void } - def document_attrs(method_objects); end - - # An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr* - # declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr* - # declarations. - # - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#60 - sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) } - def merged_into_attr?(attr_node); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#76 - sig do - params( - attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode), - docstring: T.nilable(::String), - include_params: T::Boolean - ).void - end - def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#97 - sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } - def parse_params(node, docstring); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#107 - sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } - def parse_return(node, docstring); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#85 - sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void } - def parse_sig(docstring, include_params: T.unsafe(nil)); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#50 - sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).void } - def process_attr(attr_node); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#36 - sig { params(def_node: ::YARD::Parser::Ruby::MethodDefinitionNode).void } - def process_def(def_node); end -end - -# YARD types that can have docstrings attached to them -# -# source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#14 -YARDSorbet::Handlers::SigHandler::Documentable = T.type_alias { T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) } - -# Class-level handler that folds all `const` and `prop` declarations into the constructor documentation -# this needs to be injected as a module otherwise the default Class handler will overwrite documentation -# -# @note this module is included in `YARD::Handlers::Ruby::ClassHandler` -# -# source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#10 -module YARDSorbet::Handlers::StructClassHandler - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#14 - sig { void } - def process; end - - private - - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#50 - sig do - params( - object: ::YARD::CodeObjects::MethodObject, - props: T::Array[::YARDSorbet::TStructProp], - docstring: ::YARD::Docstring, - directives: T::Array[::String] - ).void - end - def decorate_t_struct_init(object, props, docstring, directives); end - - # Create a virtual `initialize` method with all the `prop`/`const` arguments - # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#30 - sig { params(props: T::Array[::YARDSorbet::TStructProp], class_ns: ::YARD::CodeObjects::ClassObject).void } - def process_t_struct_props(props, class_ns); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_class_handler.rb#60 - sig { params(props: T::Array[::YARDSorbet::TStructProp]).returns(T::Array[[::String, T.nilable(::String)]]) } - def to_object_parameters(props); end -end - -# Handles all `const`/`prop` calls, creating accessor methods, and compiles them for later usage at the class level -# in creating a constructor -# -# source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#8 -class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#15 - sig { void } - def process; end - - private - - # Add the source and docstring to the method object - # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#28 - sig { params(object: ::YARD::CodeObjects::MethodObject, prop: ::YARDSorbet::TStructProp).void } - def decorate_object(object, prop); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#38 - sig { returns(T::Boolean) } - def immutable?; end - - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#42 - sig { params(kwd: ::String).returns(T.nilable(::String)) } - def kw_arg(kwd); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#45 - sig { params(name: ::String).returns(::YARDSorbet::TStructProp) } - def make_prop(name); end - - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#56 - sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) } - def params; end - - # Register the field explicitly as an attribute. - # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60 - sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void } - def register_attrs(object, name); end - - # Store the prop for use in the constructor definition - # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#68 - sig { params(prop: ::YARDSorbet::TStructProp).void } - def update_state(prop); end -end - -# Helper methods for working with `YARD` AST Nodes -# -# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#6 -module YARDSorbet::NodeUtils - class << self - # Traverse AST nodes in breadth-first order - # - # @note This will skip over some node types. - # @yield [YARD::Parser::Ruby::AstNode] - # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#21 - sig do - params( - node: ::YARD::Parser::Ruby::AstNode, - _blk: T.proc.params(n: ::YARD::Parser::Ruby::AstNode).void - ).void - end - def bfs_traverse(node, &_blk); end - - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#31 - sig { params(node: ::YARD::Parser::Ruby::AstNode).void } - def delete_node(node); end - - # Enqueue the eligible children of a node in the BFS queue - # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#35 - sig { params(queue: ::Thread::Queue, node: ::YARD::Parser::Ruby::AstNode).void } - def enqueue_children(queue, node); end - - # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like - # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#48 - sig do - params( - node: ::YARD::Parser::Ruby::AstNode - ).returns(T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode)) - end - def get_method_node(node); end - - # Find and return the adjacent node (ascending) - # - # @raise [IndexError] if the node does not have an adjacent sibling (ascending) - # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#53 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) } - def sibling_node(node); end - - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#60 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } - def sigable_node?(node); end - - # @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names - # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#71 - sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } - def validated_attribute_names(attr_node); end - end -end - -# Command node types that can have type signatures -# -# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#10 -YARDSorbet::NodeUtils::ATTRIBUTE_METHODS = T.let(T.unsafe(nil), Array) - -# Skip these method contents during BFS node traversal, they can have their own nested types via `T.Proc` -# -# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#12 -YARDSorbet::NodeUtils::SKIP_METHOD_CONTENTS = T.let(T.unsafe(nil), Array) - -# Node types that can have type signatures -# -# source://yard-sorbet//lib/yard-sorbet/node_utils.rb#14 -YARDSorbet::NodeUtils::SigableNode = T.type_alias { T.any(::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode) } - -# Translate `sig` type syntax to `YARD` type syntax. -# -# source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#6 -module YARDSorbet::SigToYARD - class << self - # @see https://yardoc.org/types.html - # - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#23 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } - def convert(node); end - - private - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#58 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) } - def build_generic_type(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#67 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } - def convert_aref(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#79 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } - def convert_array(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#87 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } - def convert_collection(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#94 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } - def convert_hash(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#102 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } - def convert_list(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#28 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } - def convert_node(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#40 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } - def convert_node_type(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#107 - sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } - def convert_t_method(node); end - - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#118 - sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } - def convert_unknown(node); end - end -end - -# Used to store the details of a `T::Struct` `prop` definition -# -# source://yard-sorbet//lib/yard-sorbet/t_struct_prop.rb#6 -class YARDSorbet::TStructProp < ::T::Struct - const :default, T.nilable(::String) - const :doc, ::String - const :prop_name, ::String - const :source, ::String - const :types, T::Array[::String] - - class << self - # source://sorbet-runtime/0.5.11554/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# Helper methods for working with `YARD` tags -# -# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#6 -module YARDSorbet::TagUtils - class << self - # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#16 - sig do - params( - docstring: ::YARD::Docstring, - tag_name: ::String, - name: T.nilable(::String) - ).returns(T.nilable(::YARD::Tags::Tag)) - end - def find_tag(docstring, tag_name, name); end - - # Create or update a `YARD` tag with type information - # - # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#28 - sig do - params( - docstring: ::YARD::Docstring, - tag_name: ::String, - types: T.nilable(T::Array[::String]), - name: T.nilable(::String), - text: ::String - ).void - end - def upsert_tag(docstring, tag_name, types = T.unsafe(nil), name = T.unsafe(nil), text = T.unsafe(nil)); end - end -end - -# The `void` return type, as a constant to reduce array allocations -# -# source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#10 -YARDSorbet::TagUtils::VOID_RETURN_TYPE = T.let(T.unsafe(nil), Array) - -# {https://rubygems.org/gems/yard-sorbet Version history} -# -# source://yard-sorbet//lib/yard-sorbet/version.rb#7 -YARDSorbet::VERSION = T.let(T.unsafe(nil), String) diff --git a/tools/ruby-tools/sorbet/rbi/gems/yard@0.9.37.rbi b/tools/ruby-tools/sorbet/rbi/gems/yard@0.9.37.rbi deleted file mode 100644 index f908a9a..0000000 --- a/tools/ruby-tools/sorbet/rbi/gems/yard@0.9.37.rbi +++ /dev/null @@ -1,18244 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `yard` gem. -# Please instead update this file by running `bin/tapioca gem yard`. - - -# source://yard//lib/yard.rb#61 -::RUBY18 = T.let(T.unsafe(nil), FalseClass) - -# source://yard//lib/yard.rb#62 -::RUBY19 = T.let(T.unsafe(nil), TrueClass) - -# source://yard//lib/yard/core_ext/array.rb#2 -class Array - include ::Enumerable - - # Places values before or after another object (by value) in - # an array. This is used in tandem with the before and after - # methods of the {Insertion} class. - # - # @example Places an item before another - # [1, 2, 3].place(4).before(3) # => [1, 2, 4, 3] - # @example Places an item after another - # [:a, :b, :c].place(:x).after(:a) # => [:a, :x, :b, :c] - # @param values [Array] value to insert - # @return [Insertion] an insertion object to - # @see Insertion#before - # @see Insertion#after - # - # source://yard//lib/yard/core_ext/array.rb#15 - def place(*values); end -end - -# source://yard//lib/yard/core_ext/file.rb#4 -class File < ::IO - class << self - # Cleans a path by removing extraneous '..', '.' and '/' characters - # - # @example Clean a path - # File.cleanpath('a/b//./c/../e') # => "a/b/e" - # @param path [String] the path to clean - # @param rel_root [Boolean] allows relative path above root value - # @return [String] the sanitized path - # - # source://yard//lib/yard/core_ext/file.rb#37 - def cleanpath(path, rel_root = T.unsafe(nil)); end - - # Forces opening a file (for writing) by first creating the file's directory - # - # @param file [String] the filename to open - # @since 0.5.2 - # - # source://yard//lib/yard/core_ext/file.rb#57 - def open!(file, *args, &block); end - - # Reads a file with binary encoding - # - # @return [String] the ascii-8bit encoded data - # @since 0.5.3 - # - # source://yard//lib/yard/core_ext/file.rb#66 - def read_binary(file); end - - # Turns a path +to+ into a relative path from starting - # point +from+. The argument +from+ is assumed to be - # a filename. To treat it as a directory, make sure it - # ends in +File::SEPARATOR+ ('/' on UNIX filesystems). - # - # @param from [String] the starting filename - # (or directory with +from_isdir+ set to +true+). - # @param to [String] the final path that should be made relative. - # @return [String] the relative path from +from+ to +to+. - # - # source://yard//lib/yard/core_ext/file.rb#19 - def relative_path(from, to); end - end -end - -# source://yard//lib/yard/core_ext/file.rb#5 -File::RELATIVE_PARENTDIR = T.let(T.unsafe(nil), String) - -# source://yard//lib/yard/core_ext/file.rb#6 -File::RELATIVE_SAMEDIR = T.let(T.unsafe(nil), String) - -# :stopdoc: -# -# source://yard//lib/yard/rubygems/backports/gem.rb#2 -module Gem - class << self - # Returns the Gem::SourceIndex of specifications that are in the Gem.path - # - # source://yard//lib/yard/rubygems/backports/gem.rb#6 - def source_index; end - end -end - -# Cache is an alias for SourceIndex to allow older YAMLized source index -# objects to load properly. -# -# source://yard//lib/yard/rubygems/backports/source_index.rb#363 -Gem::Cache = Gem::SourceIndex - -# The SourceIndex object indexes all the gems available from a -# particular source (e.g. a list of gem directories, or a remote -# source). A SourceIndex maps a gem full name to a gem -# specification. -# -# NOTE:: The class used to be named Cache, but that became -# confusing when cached source fetchers where introduced. The -# constant Gem::Cache is an alias for this class to allow old -# YAMLized source index objects to load properly. -# -# source://yard//lib/yard/rubygems/backports/source_index.rb#21 -class Gem::SourceIndex - include ::Enumerable - - # Constructs a source index instance from the provided specifications, which - # is a Hash of gem full names and Gem::Specifications. - # -- - # TODO merge @gems and @prerelease_gems and provide a separate method - # #prerelease_gems - # - # @return [SourceIndex] a new instance of SourceIndex - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#102 - def initialize(specifications = T.unsafe(nil)); end - - # source://yard//lib/yard/rubygems/backports/source_index.rb#348 - def ==(other); end - - # Add a gem specification to the source index. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#193 - def add_spec(gem_spec, name = T.unsafe(nil)); end - - # Add gem specifications to the source index. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#202 - def add_specs(*gem_specs); end - - # TODO: remove method - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#109 - def all_gems; end - - # source://yard//lib/yard/rubygems/backports/source_index.rb#352 - def dump; end - - # Iterate over the specifications in the source index. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#218 - def each(&block); end - - # Find a gem by an exact match on the short name. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#256 - def find_name(gem_name, requirement = T.unsafe(nil)); end - - # The signature for the given gem specification. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#242 - def gem_signature(gem_full_name); end - - # source://yard//lib/yard/rubygems/backports/source_index.rb#34 - def gems; end - - # The signature for the source index. Changes in the signature indicate a - # change in the index. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#233 - def index_signature; end - - # Returns an Array specifications for the latest released versions - # of each gem in this index. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#143 - def latest_specs(include_prerelease = T.unsafe(nil)); end - - # source://yard//lib/yard/rubygems/backports/source_index.rb#248 - def length; end - - # Reconstruct the source index from the specifications in +spec_dirs+. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#124 - def load_gems_in(*spec_dirs); end - - # Returns an Array of Gem::Specifications that are not up to date. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#330 - def outdated; end - - # source://yard//lib/yard/rubygems/backports/source_index.rb#113 - def prerelease_gems; end - - # An array including only the prerelease gemspecs - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#179 - def prerelease_specs; end - - # Replaces the gems in the source index from specifications in the - # directories this source index was created from. Raises an exception if - # this source index wasn't created from a directory (via from_gems_in or - # from_installed_gems, or having spec_dirs set). - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#322 - def refresh!; end - - # source://yard//lib/yard/rubygems/backports/source_index.rb#117 - def released_gems; end - - # An array including only the released gemspecs - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#186 - def released_specs; end - - # Remove a gem specification named +full_name+. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#211 - def remove_spec(full_name); end - - # Search for a gem by Gem::Dependency +gem_pattern+. If +only_platform+ - # is true, only gems matching Gem::Platform.local will be returned. An - # Array of matching Gem::Specification objects is returned. - # - # For backwards compatibility, a String or Regexp pattern may be passed as - # +gem_pattern+, and a Gem::Requirement for +platform_only+. This - # behavior is deprecated and will be removed. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#270 - def search(gem_pattern, platform_only = T.unsafe(nil)); end - - # source://yard//lib/yard/rubygems/backports/source_index.rb#248 - def size; end - - # Directories to use to refresh this SourceIndex when calling refresh! - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#39 - def spec_dirs; end - - # Directories to use to refresh this SourceIndex when calling refresh! - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#39 - def spec_dirs=(_arg0); end - - # The gem specification given a full gem spec name. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#225 - def specification(full_name); end - - class << self - # Creates a new SourceIndex from the ruby format gem specifications in - # +spec_dirs+. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#80 - def from_gems_in(*spec_dirs); end - - # Factory method to construct a source index instance for a given - # path. - # - # deprecated:: - # If supplied, from_installed_gems will act just like - # +from_gems_in+. This argument is deprecated and is provided - # just for backwards compatibility, and should not generally - # be used. - # - # return:: - # SourceIndex instance - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#61 - def from_installed_gems(*deprecated); end - - # Returns a list of directories from Gem.path that contain specifications. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#72 - def installed_spec_directories; end - - # Loads a ruby-format specification from +file_name+ and returns the - # loaded spec. - # - # source://yard//lib/yard/rubygems/backports/source_index.rb#90 - def load_specification(file_name); end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#17 -class IRB::SLex - # @return [SLex] a new instance of SLex - # - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#25 - def initialize; end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#60 - def create(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#29 - def def_rule(token, preproc = T.unsafe(nil), postproc = T.unsafe(nil), &block); end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#36 - def def_rules(*tokens, &block); end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#77 - def inspect; end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#64 - def match(token); end - - # need a check? - # - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#51 - def postproc(token); end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#45 - def preproc(token, proc); end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#56 - def search(token); end -end - -# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#18 -IRB::SLex::DOUT = T.let(T.unsafe(nil), IRB::Notifier::CompositeNotifier) - -# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#20 -IRB::SLex::D_DEBUG = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) - -# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#21 -IRB::SLex::D_DETAIL = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) - -# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#19 -IRB::SLex::D_WARN = T.let(T.unsafe(nil), IRB::Notifier::LeveledNotifier) - -# ---------------------------------------------------------------------- -# -# class Node - -# -# ---------------------------------------------------------------------- -# -# source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#86 -class IRB::SLex::Node - # if postproc is nil, this node is an abstract node. - # if postproc is non-nil, this node is a real node. - # - # @return [Node] a new instance of Node - # - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#89 - def initialize(preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#113 - def create_subnode(chrs, preproc = T.unsafe(nil), postproc = T.unsafe(nil)); end - - # chrs: String - # character array - # io must have getc()/ungetc(); and ungetc() must be - # able to be called arbitrary number of times. - # - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#161 - def match(chrs, op = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#198 - def match_io(io, op = T.unsafe(nil)); end - - # Returns the value of attribute postproc. - # - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96 - def postproc; end - - # Sets the attribute postproc - # - # @param value the value to set the attribute postproc to. - # - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#96 - def postproc=(_arg0); end - - # Returns the value of attribute preproc. - # - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95 - def preproc; end - - # Sets the attribute preproc - # - # @param value the value to set the attribute preproc to. - # - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#95 - def preproc=(_arg0); end - - # source://yard//lib/yard/parser/ruby/legacy/irb/slex.rb#98 - def search(chrs, opt = T.unsafe(nil)); end -end - -# The Insertion class inserts a value before or after another -# value in a list. -# -# @example -# Insertion.new([1, 2, 3], 4).before(3) # => [1, 2, 4, 3] -# -# source://yard//lib/yard/core_ext/insertion.rb#7 -class Insertion - # Creates an insertion object on a list with a value to be - # inserted. To finalize the insertion, call {#before} or - # {#after} on the object. - # - # @param list [Array] the list to perform the insertion on - # @param value [Object] the value to insert - # @return [Insertion] a new instance of Insertion - # - # source://yard//lib/yard/core_ext/insertion.rb#14 - def initialize(list, value); end - - # Inserts the value after +val+. - # - # @example If subsections are ignored - # Insertion.new([1, [2], 3], :X).after(1) # => [1, [2], :X, 3] - # @param val [Object] the object the value will be inserted after - # @param recursive [Boolean] look inside sublists - # - # source://yard//lib/yard/core_ext/insertion.rb#30 - def after(val, recursive = T.unsafe(nil)); end - - # Alias for {#after} with +recursive+ set to true - # - # @since 0.6.0 - # - # source://yard//lib/yard/core_ext/insertion.rb#38 - def after_any(val); end - - # Inserts the value before +val+ - # - # @param val [Object] the object the value will be inserted before - # @param recursive [Boolean] look inside sublists - # - # source://yard//lib/yard/core_ext/insertion.rb#22 - def before(val, recursive = T.unsafe(nil)); end - - # Alias for {#before} with +recursive+ set to true - # - # @since 0.6.0 - # - # source://yard//lib/yard/core_ext/insertion.rb#34 - def before_any(val); end - - private - - # This method performs the actual insertion - # - # @param val [Object] the value to insert - # @param rel [Fixnum] the relative index (0 or 1) of where the object - # should be placed - # @param recursive [Boolean] look inside sublists - # @param list [Array] the list to place objects into - # - # source://yard//lib/yard/core_ext/insertion.rb#49 - def insertion(val, rel, recursive = T.unsafe(nil), list = T.unsafe(nil)); end -end - -# source://yard//lib/yard/core_ext/module.rb#2 -class Module - # Returns the class name of a full module namespace path - # - # @example - # module A::B::C; class_name end # => "C" - # @return [String] the last part of a module path - # - # source://yard//lib/yard/core_ext/module.rb#8 - def class_name; end -end - -class Object < ::BasicObject - include ::Kernel - include ::PP::ObjectMixin - - private - - # source://yard//lib/yard/globals.rb#8 - def P(namespace, name = T.unsafe(nil), type = T.unsafe(nil)); end - - # source://yard//lib/yard/globals.rb#20 - def log; end -end - -# Keep track of Ruby version for compatibility code -# -# @deprecated Use {YARD.ruby18?} or {YARD.ruby19?} instead. -# -# source://yard//lib/yard.rb#61 -RUBY18 = T.let(T.unsafe(nil), FalseClass) - -# source://yard//lib/yard.rb#62 -RUBY19 = T.let(T.unsafe(nil), TrueClass) - -# source://yard//lib/yard/core_ext/string.rb#2 -class String - include ::Comparable - - # Splits text into tokens the way a shell would, handling quoted - # text as a single token. Use '\"' and "\'" to escape quotes and - # '\\' to escape a backslash. - # - # @return [Array] an array representing the tokens - # - # source://yard//lib/yard/core_ext/string.rb#8 - def shell_split; end -end - -# A subclass of Hash where all keys are converted into Symbols, and -# optionally, all String values are converted into Symbols. -# -# source://yard//lib/yard/core_ext/symbol_hash.rb#4 -class SymbolHash < ::Hash - # Creates a new SymbolHash object - # - # @param symbolize_value [Boolean] converts any String values into Symbols - # if this is set to +true+. - # @return [SymbolHash] a new instance of SymbolHash - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#9 - def initialize(symbolize_value = T.unsafe(nil)); end - - # Accessed a symbolized key - # - # @param key [#to_sym] the key to access - # @return [Object] the value associated with the key - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#49 - def [](key); end - - # Assigns a value to a symbolized key - # - # @param key [#to_sym] the key - # @param value [Object] the value to be assigned. If this is a String and - # values are set to be symbolized, it will be converted into a Symbol. - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#42 - def []=(key, value); end - - # Deleted a key and value associated with it - # - # @param key [#to_sym] the key to delete - # @return [void] - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#54 - def delete(key); end - - # Tests if a symbolized key exists - # - # @param key [#to_sym] the key to test - # @return [Boolean] whether the key exists - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#59 - def has_key?(key); end - - # Tests if a symbolized key exists - # - # @param key [#to_sym] the key to test - # @return [Boolean] whether the key exists - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#59 - def key?(key); end - - # Merges the contents of another hash into a new SymbolHash object - # - # @param hash [Hash] the hash of objects to copy - # @return [SymbolHash] a new SymbolHash containing the merged data - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#74 - def merge(hash); end - - # Updates the object with the contents of another Hash object. - # This method modifies the original SymbolHash object - # - # @param hash [Hash] the hash object to copy the values from - # @return [SymbolHash] self - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#67 - def merge!(hash); end - - # Updates the object with the contents of another Hash object. - # This method modifies the original SymbolHash object - # - # @param hash [Hash] the hash object to copy the values from - # @return [SymbolHash] self - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#67 - def update(hash); end - - class << self - # @overload [] - # @overload [] - # - # source://yard//lib/yard/core_ext/symbol_hash.rb#28 - def [](*hsh); end - end -end - -# Gem::YARDoc provides methods to generate YARDoc and yri data for installed gems -# upon gem installation. -# -# This file is automatically required by RubyGems 1.9 and newer. -# -# source://yard//lib/yard.rb#2 -module YARD - class << self - # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except - # those listed in +~/.yard/ignored_plugins+. This is called immediately - # after YARD is loaded to allow plugin support. - # - # @deprecated Use {Config.load_plugins} - # @return [Boolean] true if all plugins loaded successfully, false otherwise. - # - # source://yard//lib/yard.rb#31 - def load_plugins; end - - # An alias to {Parser::SourceParser}'s parsing method - # - # @example Parse a glob of files - # YARD.parse('lib/**/*.rb') - # @see Parser::SourceParser.parse - # - # source://yard//lib/yard.rb#20 - def parse(*args); end - - # An alias to {Parser::SourceParser}'s parsing method - # - # @example Parse a string of input - # YARD.parse_string('class Foo; end') - # @see Parser::SourceParser.parse_string - # - # source://yard//lib/yard.rb#27 - def parse_string(*args); end - - # @return [Boolean] whether YARD is being run in Ruby 1.8 mode - # - # source://yard//lib/yard.rb#44 - def ruby18?; end - - # @return [Boolean] whether YARD is being run in Ruby 1.9 mode - # - # source://yard//lib/yard.rb#47 - def ruby19?; end - - # @return [Boolean] whether YARD is being run in Ruby 2.0 - # - # source://yard//lib/yard.rb#50 - def ruby2?; end - - # @return [Boolean] whether YARD is being run in Ruby 3.1 - # - # source://yard//lib/yard.rb#56 - def ruby31?; end - - # @return [Boolean] whether YARD is being run in Ruby 3.0 - # - # source://yard//lib/yard.rb#53 - def ruby3?; end - - # @return [Boolean] whether YARD is being run inside of Windows - # - # source://yard//lib/yard.rb#34 - def windows?; end - end -end - -# Namespace for command-line interface components -# -# source://yard//lib/yard/autoload.rb#6 -module YARD::CLI; end - -# Abstract base class for CLI utilities. Provides some helper methods for -# the option parser -# -# @abstract -# @since 0.6.0 -# -# source://yard//lib/yard/cli/command.rb#11 -class YARD::CLI::Command - # @since 0.6.0 - # - # source://yard//lib/yard/cli/command.rb#16 - def description; end - - protected - - # Adds a set of common options to the tail of the OptionParser - # - # @param opts [OptionParser] the option parser object - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/cli/command.rb#24 - def common_options(opts); end - - # Loads a Ruby script. If <tt>Config.options[:safe_mode]</tt> is enabled, - # this method will do nothing. - # - # @param file [String] the path to the script to load - # @since 0.6.2 - # - # source://yard//lib/yard/cli/command.rb#68 - def load_script(file); end - - # Parses the option and gracefully handles invalid switches - # - # @param opts [OptionParser] the option parser object - # @param args [Array<String>] the arguments passed from input. This - # array will be modified. - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/cli/command.rb#55 - def parse_options(opts, args); end - - # Callback when an unrecognize option is parsed - # - # @param err [OptionParser::ParseError] the exception raised by the - # option parser - # @since 0.6.0 - # - # source://yard//lib/yard/cli/command.rb#80 - def unrecognized_option(err); end - - class << self - # Helper method to run the utility on an instance. - # - # @see #run - # @since 0.6.0 - # - # source://yard//lib/yard/cli/command.rb#14 - def run(*args); end - end -end - -# This class parses a command name out of the +yard+ CLI command and calls -# that command in the form: -# -# $ yard command_name [options] -# -# If no command or arguments are specified, or if the arguments immediately -# begin with a +--opt+ (not +--help+), the {default_command} will be used -# (which itself defaults to +:doc+). -# -# == Adding a Command -# -# To add a custom command via plugin, create a mapping in {commands} from -# the Symbolic command name to the {Command} class that implements the -# command. To implement a command, see the documentation for the {Command} -# class. -# -# @see Command -# @see commands -# @see default_command -# -# source://yard//lib/yard/cli/command_parser.rb#23 -class YARD::CLI::CommandParser - # @return [CommandParser] a new instance of CommandParser - # - # source://yard//lib/yard/cli/command_parser.rb#56 - def initialize; end - - # Runs the {Command} object matching the command name of the first - # argument. - # - # @return [void] - # - # source://yard//lib/yard/cli/command_parser.rb#63 - def run(*args); end - - private - - # source://yard//lib/yard/cli/command_parser.rb#80 - def commands; end - - # source://yard//lib/yard/cli/command_parser.rb#82 - def list_commands; end - - class << self - # @return [Hash{Symbol => Command}] the mapping of command names to - # command classes to parse the user command. - # - # source://yard//lib/yard/cli/command_parser.rb#27 - def commands; end - - # @return [Hash{Symbol => Command}] the mapping of command names to - # command classes to parse the user command. - # - # source://yard//lib/yard/cli/command_parser.rb#27 - def commands=(_arg0); end - - # @return [Symbol] the default command name to use when no options - # are specified or - # - # source://yard//lib/yard/cli/command_parser.rb#31 - def default_command; end - - # @return [Symbol] the default command name to use when no options - # are specified or - # - # source://yard//lib/yard/cli/command_parser.rb#31 - def default_command=(_arg0); end - - # Convenience method to create a new CommandParser and call {#run} - # - # @return [void] - # - # source://yard//lib/yard/cli/command_parser.rb#54 - def run(*args); end - end -end - -# CLI command to view or edit configuration options -# -# @since 0.6.2 -# -# source://yard//lib/yard/cli/config.rb#6 -class YARD::CLI::Config < ::YARD::CLI::Command - # @return [Config] a new instance of Config - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#26 - def initialize; end - - # @return [Boolean] whether to append values to existing key - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#20 - def append; end - - # @return [Boolean] whether to append values to existing key - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#20 - def append=(_arg0); end - - # @return [Boolean] whether the value being set should be inside a list - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#17 - def as_list; end - - # @return [Boolean] whether the value being set should be inside a list - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#17 - def as_list=(_arg0); end - - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#36 - def description; end - - # @return [String, nil] command to use when configuring ~/.gemrc file. - # If the string is nil, configuration should not occur. - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#24 - def gem_install_cmd; end - - # @return [String, nil] command to use when configuring ~/.gemrc file. - # If the string is nil, configuration should not occur. - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#24 - def gem_install_cmd=(_arg0); end - - # @return [Symbol, nil] the key to view/edit, if any - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#8 - def key; end - - # @return [Symbol, nil] the key to view/edit, if any - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#8 - def key=(_arg0); end - - # @return [Boolean] whether to reset the {#key} - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#14 - def reset; end - - # @return [Boolean] whether to reset the {#key} - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#14 - def reset=(_arg0); end - - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#40 - def run(*args); end - - # @return [Array, nil] the list of values to set (or single value), if modifying - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#11 - def values; end - - # @return [Array, nil] the list of values to set (or single value), if modifying - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#11 - def values=(_arg0); end - - private - - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#57 - def configure_gemrc; end - - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#111 - def encode_value(value); end - - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#103 - def encode_values; end - - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#97 - def list_configuration; end - - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#78 - def modify_item; end - - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#120 - def optparse(*args); end - - # @since 0.6.2 - # - # source://yard//lib/yard/cli/config.rb#92 - def view_item; end -end - -# CLI command to return the objects that were added/removed from 2 versions -# of a project (library, gem, working copy). -# -# @since 0.6.0 -# -# source://yard//lib/yard/cli/diff.rb#11 -class YARD::CLI::Diff < ::YARD::CLI::Command - # @return [Diff] a new instance of Diff - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#12 - def initialize; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#24 - def description; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#28 - def run(*args); end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#83 - def added_objects(registry1, registry2); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#78 - def all_objects; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#233 - def cleanup(gemfile); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#175 - def expand_and_parse(gemfile, io); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#187 - def expand_gem(gemfile, io); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#181 - def generate_yardoc(dir); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#118 - def load_gem_data(gemfile); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#102 - def load_git_commit(commit); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#87 - def modified_objects(registry1, registry2); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#239 - def optparse(*args); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#98 - def removed_objects(registry1, registry2); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/diff.rb#225 - def require_rubygems; end -end - -# Display one object -# -# @since 0.8.6 -# -# source://yard//lib/yard/cli/display.rb#6 -class YARD::CLI::Display < ::YARD::CLI::Yardoc - # @return [Display] a new instance of Display - # @since 0.8.6 - # - # source://yard//lib/yard/cli/display.rb#9 - def initialize(*args); end - - # @since 0.8.6 - # - # source://yard//lib/yard/cli/display.rb#7 - def description; end - - # @return [String] the output data for all formatted objects - # @since 0.8.6 - # - # source://yard//lib/yard/cli/display.rb#27 - def format_objects; end - - # @since 0.8.6 - # - # source://yard//lib/yard/cli/display.rb#61 - def output_options(opts); end - - # Parses commandline options. - # - # @param args [Array<String>] each tokenized argument - # @since 0.8.6 - # - # source://yard//lib/yard/cli/display.rb#46 - def parse_arguments(*args); end - - # Runs the commandline utility, parsing arguments and displaying an object - # from the {Registry}. - # - # @param args [Array<String>] the list of arguments. - # @return [void] - # @since 0.8.6 - # - # source://yard//lib/yard/cli/display.rb#21 - def run(*args); end - - # @since 0.8.6 - # - # source://yard//lib/yard/cli/display.rb#33 - def wrap_layout(contents); end -end - -# @since 0.6.0 -# -# source://yard//lib/yard/cli/gems.rb#5 -class YARD::CLI::Gems < ::YARD::CLI::Command - # @return [Gems] a new instance of Gems - # @since 0.6.0 - # - # source://yard//lib/yard/cli/gems.rb#6 - def initialize; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/gems.rb#11 - def description; end - - # Runs the commandline utility, parsing arguments and generating - # YARD indexes for gems. - # - # @param args [Array<String>] the list of arguments - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/cli/gems.rb#18 - def run(*args); end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/gems.rb#47 - def add_gems(gems); end - - # Builds .yardoc files for all non-existing gems - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/gems.rb#27 - def build_gems; end - - # Parses options - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/gems.rb#61 - def optparse(*args); end -end - -# A command-line utility to generate Graphviz graphs from -# a set of objects -# -# @see Graph#run -# @since 0.6.0 -# -# source://yard//lib/yard/cli/graph.rb#24 -class YARD::CLI::Graph < ::YARD::CLI::YardoptsCommand - # Creates a new instance of the command-line utility - # - # @return [Graph] a new instance of Graph - # @since 0.6.0 - # - # source://yard//lib/yard/cli/graph.rb#34 - def initialize; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/graph.rb#42 - def description; end - - # The set of objects to include in the graph. - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/graph.rb#31 - def objects; end - - # The options parsed out of the commandline. - # Default options are: - # :format => :dot - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/graph.rb#28 - def options; end - - # Runs the command-line utility. - # - # @example - # grapher = Graph.new - # grapher.run('--private') - # @param args [Array<String>] each tokenized argument - # @since 0.6.0 - # - # source://yard//lib/yard/cli/graph.rb#52 - def run(*args); end - - private - - # Parses commandline options. - # - # @param args [Array<String>] each tokenized argument - # @since 0.6.0 - # - # source://yard//lib/yard/cli/graph.rb#69 - def optparse(*args); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/graph.rb#65 - def unrecognized_option(err); end -end - -# Options to pass to the {Graph} CLI. -# -# source://yard//lib/yard/cli/graph.rb#5 -class YARD::CLI::GraphOptions < ::YARD::Templates::TemplateOptions - # @return [String] any contents to pass to the digraph - # - # source://yard//lib/yard/cli/graph.rb#16 - def contents; end - - # @return [String] any contents to pass to the digraph - # - # source://yard//lib/yard/cli/graph.rb#16 - def contents=(_arg0); end - - # @return [Boolean] whether to show the object dependencies - # - # source://yard//lib/yard/cli/graph.rb#13 - def dependencies; end - - # @return [Boolean] whether to show the object dependencies - # - # source://yard//lib/yard/cli/graph.rb#13 - def dependencies=(_arg0); end - - # @return [:dot] the default output format - # - # source://yard//lib/yard/options.rb#82 - def format; end - - # source://yard//lib/yard/options.rb#82 - def format=(_arg0); end - - # @return [Boolean] whether to list the full class diagram - # - # source://yard//lib/yard/cli/graph.rb#10 - def full; end - - # @return [Boolean] whether to list the full class diagram - # - # source://yard//lib/yard/cli/graph.rb#10 - def full=(_arg0); end -end - -# Handles help for commands -# -# @since 0.6.0 -# -# source://yard//lib/yard/cli/help.rb#6 -class YARD::CLI::Help < ::YARD::CLI::Command - # @since 0.6.0 - # - # source://yard//lib/yard/cli/help.rb#7 - def description; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/help.rb#9 - def run(*args); end -end - -# CLI command to support internationalization (a.k.a. i18n). -# I18n feature is based on gettext technology. -# This command generates .pot file from docstring and extra -# documentation. -# -# @since 0.8.0 -# @todo Support msgminit and msgmerge features? -# -# source://yard//lib/yard/cli/i18n.rb#13 -class YARD::CLI::I18n < ::YARD::CLI::Yardoc - # @return [I18n] a new instance of I18n - # @since 0.8.0 - # - # source://yard//lib/yard/cli/i18n.rb#14 - def initialize; end - - # @since 0.8.0 - # - # source://yard//lib/yard/cli/i18n.rb#19 - def description; end - - # @since 0.8.0 - # - # source://yard//lib/yard/cli/i18n.rb#23 - def run(*args); end - - private - - # @since 0.8.0 - # - # source://yard//lib/yard/cli/i18n.rb#44 - def general_options(opts); end - - # @since 0.8.0 - # - # source://yard//lib/yard/cli/i18n.rb#61 - def generate_pot(relative_base_path); end -end - -# Lists all constant and method names in the codebase. Uses {Yardoc} --list. -# -# source://yard//lib/yard/cli/list.rb#5 -class YARD::CLI::List < ::YARD::CLI::Command - # source://yard//lib/yard/cli/list.rb#6 - def description; end - - # Runs the commandline utility, parsing arguments and displaying a - # list of objects - # - # @param args [Array<String>] the list of arguments. - # @return [void] - # - # source://yard//lib/yard/cli/list.rb#13 - def run(*args); end -end - -# Lists all markup types -# -# @since 0.8.6 -# -# source://yard//lib/yard/cli/markup_types.rb#6 -class YARD::CLI::MarkupTypes < ::YARD::CLI::Command - # @since 0.8.6 - # - # source://yard//lib/yard/cli/markup_types.rb#7 - def description; end - - # Runs the commandline utility, parsing arguments and displaying a - # list of markup types - # - # @param args [Array<String>] the list of arguments. - # @return [void] - # @since 0.8.6 - # - # source://yard//lib/yard/cli/markup_types.rb#14 - def run(*args); end -end - -# A local documentation server -# -# @since 0.6.0 -# -# source://yard//lib/yard/cli/server.rb#7 -class YARD::CLI::Server < ::YARD::CLI::Command - # Creates a new instance of the Server command line utility - # - # @return [Server] a new instance of Server - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#29 - def initialize; end - - # @return [YARD::Server::Adapter] the adapter to use for loading the web server - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#18 - def adapter; end - - # @return [YARD::Server::Adapter] the adapter to use for loading the web server - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#18 - def adapter=(_arg0); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#41 - def description; end - - # @return [Hash] a list of library names and yardoc files to serve - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#15 - def libraries; end - - # @return [Hash] a list of library names and yardoc files to serve - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#15 - def libraries=(_arg0); end - - # @return [Hash] a list of options to pass to the doc server - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#9 - def options; end - - # @return [Hash] a list of options to pass to the doc server - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#9 - def options=(_arg0); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#45 - def run(*args); end - - # @return [Array<String>] a list of scripts to load - # @since 0.6.2 - # - # source://yard//lib/yard/cli/server.rb#22 - def scripts; end - - # @return [Array<String>] a list of scripts to load - # @since 0.6.2 - # - # source://yard//lib/yard/cli/server.rb#22 - def scripts=(_arg0); end - - # @return [Hash] a list of options to pass to the web server - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#12 - def server_options; end - - # @return [Hash] a list of options to pass to the web server - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#12 - def server_options=(_arg0); end - - # @return [Array<String>] a list of template paths to register - # @since 0.6.2 - # - # source://yard//lib/yard/cli/server.rb#26 - def template_paths; end - - # @return [Array<String>] a list of template paths to register - # @since 0.6.2 - # - # source://yard//lib/yard/cli/server.rb#26 - def template_paths=(_arg0); end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#131 - def add_gems; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#140 - def add_gems_from_gemfile(gemfile = T.unsafe(nil)); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#76 - def add_libraries(args); end - - # @param library [String] The library name. - # @param dir [String, nil] The argument provided on the CLI after the - # library name. Is supposed to point to either a project directory - # with a Yard options file, or a yardoc db. - # @return [LibraryVersion, nil] - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#115 - def create_library_version_if_yardopts_exist(library, dir); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#249 - def extract_db_from_options_file(options_file); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#239 - def generate_doc_for_first_time(libver); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#56 - def load_scripts; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#60 - def load_template_paths; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#156 - def optparse(*args); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/server.rb#66 - def select_adapter; end -end - -# @since 0.6.0 -# -# source://yard//lib/yard/cli/stats.rb#5 -class YARD::CLI::Stats < ::YARD::CLI::Yardoc - include ::YARD::Templates::Helpers::BaseHelper - - # @param parse [Boolean] whether to parse and load registry (see {#parse}) - # @return [Stats] a new instance of Stats - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#18 - def initialize(parse = T.unsafe(nil)); end - - # @return [Array<CodeObjects::Base>] all the parsed objects in the registry, - # removing any objects that are not visible (private, protected) depending - # on the arguments passed to the command. - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#108 - def all_objects; end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#25 - def description; end - - # Prints a statistic to standard out. This method is optimized for - # getting Integer values, though it allows any data to be printed. - # - # @param name [String] the statistic name - # @param data [Integer, String] the numeric (or any) data representing - # the statistic. If +data+ is an Integer, it should represent the - # total objects of a type. - # @param undoc [Integer, nil] number of undocumented objects for the type - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#162 - def output(name, data, undoc = T.unsafe(nil)); end - - # @return [Boolean] whether to parse and load registry - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#15 - def parse; end - - # @return [Boolean] whether to parse and load registry - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#15 - def parse=(_arg0); end - - # Prints statistics for different object types - # - # To add statistics for a specific type, add a method +#stats_for_TYPE+ - # to this class that calls {#output}. - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#54 - def print_statistics; end - - # Prints list of undocumented objects - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#79 - def print_undocumented_objects; end - - # Runs the commandline utility, parsing arguments and generating - # output if set. - # - # @param args [Array<String>] the list of arguments - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#34 - def run(*args); end - - # Statistics for attributes - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#135 - def stats_for_attributes; end - - # Statistics for classes - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#125 - def stats_for_classes; end - - # Statistics for constants - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#130 - def stats_for_constants; end - - # Statistics for files - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#113 - def stats_for_files; end - - # Statistics for methods - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#144 - def stats_for_methods; end - - # Statistics for modules - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#120 - def stats_for_modules; end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#199 - def general_options(opts); end - - # Parses commandline options. - # - # @param args [Array<String>] each tokenized argument - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#185 - def optparse(*args); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/stats.rb#176 - def type_statistics(type); end -end - -# Maintains the order in which +stats_for_+ statistics methods should be -# printed. -# -# @see #print_statistics -# @since 0.6.0 -# -# source://yard//lib/yard/cli/stats.rb#12 -YARD::CLI::Stats::STATS_ORDER = T.let(T.unsafe(nil), Array) - -# A tool to view documentation in the console like `ri` -# -# source://yard//lib/yard/cli/yri.rb#7 -class YARD::CLI::YRI < ::YARD::CLI::Command - # @return [YRI] a new instance of YRI - # - # source://yard//lib/yard/cli/yri.rb#31 - def initialize; end - - # source://yard//lib/yard/cli/yri.rb#41 - def description; end - - # Runs the command-line utility. - # - # @example - # YRI.new.run('String#reverse') - # @param args [Array<String>] each tokenized argument - # - # source://yard//lib/yard/cli/yri.rb#50 - def run(*args); end - - protected - - # Caches the .yardoc file where an object can be found in the {CACHE_FILE} - # - # @return [void] - # - # source://yard//lib/yard/cli/yri.rb#85 - def cache_object(name, path); end - - # Locates an object by name starting in the cached paths and then - # searching through any search paths. - # - # @param name [String] the full name of the object - # @return [CodeObjects::Base] an object if found - # @return [nil] if no object is found - # - # source://yard//lib/yard/cli/yri.rb#113 - def find_object(name); end - - # @param object [CodeObjects::Base] the object to print. - # @return [String] the formatted output for an object. - # - # source://yard//lib/yard/cli/yri.rb#98 - def print_object(object); end - - # Prints the command usage - # - # @return [void] - # @since 0.5.6 - # - # source://yard//lib/yard/cli/yri.rb#78 - def print_usage; end - - private - - # Adds paths in {SEARCH_PATHS_FILE} - # - # @since 0.5.1 - # - # source://yard//lib/yard/cli/yri.rb#181 - def add_default_paths; end - - # Adds all RubyGems yardoc files to search paths - # - # @return [void] - # - # source://yard//lib/yard/cli/yri.rb#161 - def add_gem_paths; end - - # Loads {CACHE_FILE} - # - # @return [void] - # - # source://yard//lib/yard/cli/yri.rb#151 - def load_cache; end - - # Parses commandline options. - # - # @param args [Array<String>] each tokenized argument - # - # source://yard//lib/yard/cli/yri.rb#190 - def optparse(*args); end - - # Tries to load the object with name. If successful, caches the object - # with the cache_path - # - # @param name [String] the object path - # @param cache_path [String] the location of the yardoc - # db containing the object to cache for future lookups. - # No caching is done if this is nil. - # @return [void] - # - # source://yard//lib/yard/cli/yri.rb#143 - def try_load_object(name, cache_path); end - - class << self - # Helper method to run the utility on an instance. - # - # @see #run - # - # source://yard//lib/yard/cli/yri.rb#29 - def run(*args); end - end -end - -# The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded -# from. -# -# source://yard//lib/yard/cli/yri.rb#10 -YARD::CLI::YRI::CACHE_FILE = T.let(T.unsafe(nil), String) - -# Default search paths that should be loaded dynamically into YRI. These paths -# take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems -# paths). To add a path, call: -# -# DEFAULT_SEARCH_PATHS.push("/path/to/.yardoc") -# -# @return [Array<String>] a list of extra search paths -# @since 0.6.0 -# -# source://yard//lib/yard/cli/yri.rb#25 -YARD::CLI::YRI::DEFAULT_SEARCH_PATHS = T.let(T.unsafe(nil), Array) - -# A file containing all paths, delimited by newlines, to search for -# yardoc databases. -# -# @since 0.5.1 -# -# source://yard//lib/yard/cli/yri.rb#15 -YARD::CLI::YRI::SEARCH_PATHS_FILE = T.let(T.unsafe(nil), String) - -# source://yard//lib/yard/cli/yardoc.rb#145 -class YARD::CLI::Yardoc < ::YARD::CLI::YardoptsCommand - # Creates a new instance of the commandline utility - # - # @return [Yardoc] a new instance of Yardoc - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#207 - def initialize; end - - # The list of all objects to process. Override this method to change - # which objects YARD should generate documentation for. - # - # @deprecated To hide methods use the +@private+ tag instead. - # @return [Array<CodeObjects::Base>] a list of code objects to process - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#330 - def all_objects; end - - # Keep track of which APIs are to be shown - # - # @return [Array<String>] a list of APIs - # @since 0.8.1 - # - # source://yard//lib/yard/cli/yardoc.rb#180 - def apis; end - - # Keep track of which APIs are to be shown - # - # @return [Array<String>] a list of APIs - # @since 0.8.1 - # - # source://yard//lib/yard/cli/yardoc.rb#180 - def apis=(_arg0); end - - # @return [Array<String>] a list of assets to copy after generation - # @since 0.6.0 - # - # source://yard//lib/yard/cli/yardoc.rb#197 - def assets; end - - # @return [Array<String>] a list of assets to copy after generation - # @since 0.6.0 - # - # source://yard//lib/yard/cli/yardoc.rb#197 - def assets=(_arg0); end - - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#234 - def description; end - - # @return [Array<String>] list of excluded paths (regexp matches) - # @since 0.5.3 - # - # source://yard//lib/yard/cli/yardoc.rb#155 - def excluded; end - - # @return [Array<String>] list of excluded paths (regexp matches) - # @since 0.5.3 - # - # source://yard//lib/yard/cli/yardoc.rb#155 - def excluded=(_arg0); end - - # @return [Boolean] whether yard exits with error status code if a warning occurs - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#204 - def fail_on_warning; end - - # @return [Boolean] whether yard exits with error status code if a warning occurs - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#204 - def fail_on_warning=(_arg0); end - - # @return [Array<String>] list of Ruby source files to process - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#151 - def files; end - - # @return [Array<String>] list of Ruby source files to process - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#151 - def files=(_arg0); end - - # @return [Boolean] whether to generate output - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#166 - def generate; end - - # @return [Boolean] whether to generate output - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#166 - def generate=(_arg0); end - - # @return [Boolean] whether markup option was specified - # @since 0.7.0 - # - # source://yard//lib/yard/cli/yardoc.rb#201 - def has_markup; end - - # @return [Boolean] whether markup option was specified - # @since 0.7.0 - # - # source://yard//lib/yard/cli/yardoc.rb#201 - def has_markup=(_arg0); end - - # Keep track of which APIs are to be hidden - # - # @return [Array<String>] a list of APIs to be hidden - # @since 0.8.7 - # - # source://yard//lib/yard/cli/yardoc.rb#185 - def hidden_apis; end - - # Keep track of which APIs are to be hidden - # - # @return [Array<String>] a list of APIs to be hidden - # @since 0.8.7 - # - # source://yard//lib/yard/cli/yardoc.rb#185 - def hidden_apis=(_arg0); end - - # @return [Array<Symbol>] a list of tags to hide from templates - # @since 0.6.0 - # - # source://yard//lib/yard/cli/yardoc.rb#189 - def hidden_tags; end - - # @return [Array<Symbol>] a list of tags to hide from templates - # @since 0.6.0 - # - # source://yard//lib/yard/cli/yardoc.rb#189 - def hidden_tags=(_arg0); end - - # @return [Boolean] whether to print a list of objects - # @since 0.5.5 - # - # source://yard//lib/yard/cli/yardoc.rb#170 - def list; end - - # @return [Boolean] whether to print a list of objects - # @since 0.5.5 - # - # source://yard//lib/yard/cli/yardoc.rb#170 - def list=(_arg0); end - - # @return [Hash] the hash of options passed to the template. - # @see Templates::Engine#render - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#148 - def options; end - - # Parses commandline arguments - # - # @param args [Array<String>] the list of arguments - # @return [Boolean] whether or not arguments are valid - # @since 0.5.6 - # - # source://yard//lib/yard/cli/yardoc.rb#291 - def parse_arguments(*args); end - - # Runs the commandline utility, parsing arguments and generating - # output if set. - # - # @param args [Array<String>] the list of arguments. If the list only - # contains a single nil value, skip calling of {#parse_arguments} - # @return [void] - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#244 - def run(*args); end - - # @return [Boolean] whether objects should be serialized to .yardoc db - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#163 - def save_yardoc; end - - # @return [Boolean] whether objects should be serialized to .yardoc db - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#163 - def save_yardoc=(_arg0); end - - # @return [Boolean] whether to print statistics after parsing - # @since 0.6.0 - # - # source://yard//lib/yard/cli/yardoc.rb#193 - def statistics; end - - # @return [Boolean] whether to print statistics after parsing - # @since 0.6.0 - # - # source://yard//lib/yard/cli/yardoc.rb#193 - def statistics=(_arg0); end - - # @return [Boolean] whether to use the existing yardoc db if the - # .yardoc already exists. Also makes use of file checksums to - # parse only changed files. - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#160 - def use_cache; end - - # @return [Boolean] whether to use the existing yardoc db if the - # .yardoc already exists. Also makes use of file checksums to - # parse only changed files. - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#160 - def use_cache=(_arg0); end - - # Keep track of which visibilities are to be shown - # - # @return [Array<Symbol>] a list of visibilities - # @since 0.5.6 - # - # source://yard//lib/yard/cli/yardoc.rb#175 - def visibilities; end - - # Keep track of which visibilities are to be shown - # - # @return [Array<Symbol>] a list of visibilities - # @since 0.5.6 - # - # source://yard//lib/yard/cli/yardoc.rb#175 - def visibilities=(_arg0); end - - private - - # Adds verifier rule for APIs - # - # @return [void] - # @since 0.8.1 - # - # source://yard//lib/yard/cli/yardoc.rb#474 - def add_api_verifier; end - - # Adds a set of extra documentation files to be processed - # - # @param files [Array<String>] the set of documentation files - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#413 - def add_extra_files(*files); end - - # @since 0.6.0 - # - # source://yard//lib/yard/cli/yardoc.rb#507 - def add_tag(tag_data, factory_method = T.unsafe(nil)); end - - # Adds verifier rule for visibilities - # - # @return [void] - # @since 0.5.6 - # - # source://yard//lib/yard/cli/yardoc.rb#466 - def add_visibility_verifier; end - - # Applies the specified locale to collected objects - # - # @return [void] - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardoc.rb#494 - def apply_locale; end - - # Copies any assets to the output directory - # - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/cli/yardoc.rb#389 - def copy_assets; end - - # @param file [String] the filename to validate - # @param check_exists [Boolean] whether the file should exist on disk - # @return [Boolean] whether the file is allowed to be used - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#425 - def extra_file_valid?(file, check_exists = T.unsafe(nil)); end - - # Adds general options - # - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#541 - def general_options(opts); end - - # Parses commandline options. - # - # @param args [Array<String>] each tokenized argument - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#516 - def optparse(*args); end - - # Adds output options - # - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#586 - def output_options(opts); end - - # Parses the file arguments into Ruby files and extra files, which are - # separated by a '-' element. - # - # @example Parses a set of Ruby source files - # parse_files %w(file1 file2 file3) - # @example Parses a set of Ruby files with a separator and extra files - # parse_files %w(file1 file2 - extrafile1 extrafile2) - # @param files [Array<String>] the list of files to parse - # @return [void] - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#446 - def parse_files(*files); end - - # Prints a list of all objects - # - # @return [void] - # @since 0.5.5 - # - # source://yard//lib/yard/cli/yardoc.rb#403 - def print_list; end - - # Generates output for objects - # - # @param checksums [Hash, nil] if supplied, a list of checksums for files. - # @return [void] - # @since 0.5.1 - # - # source://yard//lib/yard/cli/yardoc.rb#340 - def run_generate(checksums); end - - # Runs a list of objects against the {Verifier} object passed into the - # template and returns the subset of verified objects. - # - # @param list [Array<CodeObjects::Base>] a list of code objects - # @return [Array<CodeObjects::Base>] a list of code objects that match - # the verifier. If no verifier is supplied, all objects are returned. - # - # source://yard//lib/yard/cli/yardoc.rb#502 - def run_verifier(list); end - - # Adds tag options - # - # @since 0.6.0 - # - # source://yard//lib/yard/cli/yardoc.rb#753 - def tag_options(opts); end - - # Verifies that the markup options are valid before parsing any code. - # Failing early is better than failing late. - # - # @return [Boolean] whether the markup provider was successfully loaded. - # @since 0.2.1 - # - # source://yard//lib/yard/cli/yardoc.rb#364 - def verify_markup_options; end -end - -# Default options used in +yard doc+ command. -# -# source://yard//lib/yard/cli/yardoc.rb#8 -class YARD::CLI::YardocOptions < ::YARD::Templates::TemplateOptions - # @return [CodeObjects::ExtraFileObject] the file object being rendered. - # The +object+ key is not used so that a file may be rendered in the context - # of an object's namespace (for generating links). - # - # source://yard//lib/yard/cli/yardoc.rb#48 - def file; end - - # @return [CodeObjects::ExtraFileObject] the file object being rendered. - # The +object+ key is not used so that a file may be rendered in the context - # of an object's namespace (for generating links). - # - # source://yard//lib/yard/cli/yardoc.rb#48 - def file=(_arg0); end - - # @return [Array<CodeObjects::ExtraFileObject>] the list of extra files rendered along with objects - # - # source://yard//lib/yard/options.rb#82 - def files; end - - # source://yard//lib/yard/options.rb#82 - def files=(_arg0); end - - # @return [Symbol] the default output format (:html). - # - # source://yard//lib/yard/options.rb#82 - def format; end - - # source://yard//lib/yard/options.rb#82 - def format=(_arg0); end - - # @return [Numeric] An index value for rendering sequentially related templates - # - # source://yard//lib/yard/cli/yardoc.rb#39 - def index; end - - # @return [Numeric] An index value for rendering sequentially related templates - # - # source://yard//lib/yard/cli/yardoc.rb#39 - def index=(_arg0); end - - # @return [CodeObjects::Base] an extra item to send to a template that is not - # the main rendered object - # - # source://yard//lib/yard/cli/yardoc.rb#43 - def item; end - - # @return [CodeObjects::Base] an extra item to send to a template that is not - # the main rendered object - # - # source://yard//lib/yard/cli/yardoc.rb#43 - def item=(_arg0); end - - # @return [String] the current locale - # - # source://yard//lib/yard/cli/yardoc.rb#51 - def locale; end - - # @return [String] the current locale - # - # source://yard//lib/yard/cli/yardoc.rb#51 - def locale=(_arg0); end - - # @return [Array<CodeObjects::Base>] the list of code objects to render - # the templates with. - # - # source://yard//lib/yard/cli/yardoc.rb#36 - def objects; end - - # @return [Array<CodeObjects::Base>] the list of code objects to render - # the templates with. - # - # source://yard//lib/yard/cli/yardoc.rb#36 - def objects=(_arg0); end - - # @return [Boolean] whether the data should be rendered in a single page, - # if the template supports it. - # - # source://yard//lib/yard/options.rb#82 - def onefile; end - - # source://yard//lib/yard/options.rb#82 - def onefile=(_arg0); end - - # @return [CodeObjects::ExtraFileObject] the README file object rendered - # along with objects - # - # source://yard//lib/yard/cli/yardoc.rb#32 - def readme; end - - # @return [CodeObjects::ExtraFileObject] the README file object rendered - # along with objects - # - # source://yard//lib/yard/cli/yardoc.rb#32 - def readme=(_arg0); end - - # @return [Serializers::Base] the default serializer for generating output - # to disk. - # - # source://yard//lib/yard/options.rb#82 - def serializer; end - - # source://yard//lib/yard/options.rb#82 - def serializer=(_arg0); end - - # @return [String] the default title appended to each generated page - # - # source://yard//lib/yard/options.rb#82 - def title; end - - # source://yard//lib/yard/options.rb#82 - def title=(_arg0); end - - # @return [Verifier] the default verifier object to filter queries - # - # source://yard//lib/yard/options.rb#82 - def verifier; end - - # source://yard//lib/yard/options.rb#82 - def verifier=(_arg0); end -end - -# Abstract base class for command that reads .yardopts file -# -# @abstract -# @since 0.8.3 -# -# source://yard//lib/yard/cli/yardopts_command.rb#10 -class YARD::CLI::YardoptsCommand < ::YARD::CLI::Command - # Creates a new command that reads .yardopts - # - # @return [YardoptsCommand] a new instance of YardoptsCommand - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#25 - def initialize; end - - # The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) - # - # @return [String] the filename to load extra options from - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#22 - def options_file; end - - # The options file name (defaults to {DEFAULT_YARDOPTS_FILE}) - # - # @return [String] the filename to load extra options from - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#22 - def options_file=(_arg0); end - - # Parses commandline arguments - # - # @param args [Array<String>] the list of arguments - # @return [Boolean] whether or not arguments are valid - # @since 0.5.6 - # - # source://yard//lib/yard/cli/yardopts_command.rb#36 - def parse_arguments(*args); end - - # @return [Boolean] whether to parse options from .document - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#18 - def use_document_file; end - - # @return [Boolean] whether to parse options from .document - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#18 - def use_document_file=(_arg0); end - - # @return [Boolean] whether to parse options from .yardopts - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#15 - def use_yardopts_file; end - - # @return [Boolean] whether to parse options from .yardopts - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#15 - def use_yardopts_file=(_arg0); end - - protected - - # Adds --[no-]yardopts / --[no-]document - # - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#48 - def yardopts_options(opts); end - - private - - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#92 - def parse_rdoc_document_file(file = T.unsafe(nil)); end - - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#96 - def parse_yardopts(file = T.unsafe(nil)); end - - # Parses out the yardopts/document options - # - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#78 - def parse_yardopts_options(*args); end - - # Reads a .document file in the directory to get source file globs - # - # @return [Array<String>] an array of files parsed from .document - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#102 - def support_rdoc_document_file!(file = T.unsafe(nil)); end - - # Parses the .yardopts file for default yard options - # - # @return [Array<String>] an array of options parsed from .yardopts - # @since 0.8.3 - # - # source://yard//lib/yard/cli/yardopts_command.rb#70 - def yardopts(file = T.unsafe(nil)); end -end - -# The configuration filename to load extra options from -# -# @since 0.8.3 -# -# source://yard//lib/yard/cli/yardopts_command.rb#12 -YARD::CLI::YardoptsCommand::DEFAULT_YARDOPTS_FILE = T.let(T.unsafe(nil), String) - -# @deprecated Use {Config::CONFIG_DIR} -# -# source://yard//lib/yard.rb#13 -YARD::CONFIG_DIR = T.let(T.unsafe(nil), String) - -# A "code object" is defined as any entity in the Ruby language. -# Classes, modules, methods, class variables and constants are the -# major objects, but DSL languages can create their own by inheriting -# from {CodeObjects::Base}. -# -# source://yard//lib/yard/autoload.rb#29 -module YARD::CodeObjects - extend ::YARD::CodeObjects::NamespaceMapper -end - -# All builtin Ruby classes and modules. -# -# source://yard//lib/yard/code_objects/base.rb#91 -YARD::CodeObjects::BUILTIN_ALL = T.let(T.unsafe(nil), Array) - -# All builtin Ruby classes for inheritance tree. -# -# @note MatchingData is a 1.8.x legacy class -# -# source://yard//lib/yard/code_objects/base.rb#78 -YARD::CodeObjects::BUILTIN_CLASSES = T.let(T.unsafe(nil), Array) - -# All builtin Ruby exception classes for inheritance tree. -# -# source://yard//lib/yard/code_objects/base.rb#67 -YARD::CodeObjects::BUILTIN_EXCEPTIONS = T.let(T.unsafe(nil), Array) - -# Hash of {BUILTIN_EXCEPTIONS} as keys and true as value (for O(1) lookups) -# -# source://yard//lib/yard/code_objects/base.rb#94 -YARD::CodeObjects::BUILTIN_EXCEPTIONS_HASH = T.let(T.unsafe(nil), Hash) - -# All builtin Ruby modules for mixin handling. -# -# source://yard//lib/yard/code_objects/base.rb#87 -YARD::CodeObjects::BUILTIN_MODULES = T.let(T.unsafe(nil), Array) - -# +Base+ is the superclass of all code objects recognized by YARD. A code -# object is any entity in the Ruby language (class, method, module). A -# DSL might subclass +Base+ to create a new custom object representing -# a new entity type. -# -# == Registry Integration -# Any created object associated with a namespace is immediately registered -# with the registry. This allows the Registry to act as an identity map -# to ensure that no object is represented by more than one Ruby object -# in memory. A unique {#path} is essential for this identity map to work -# correctly. -# -# == Custom Attributes -# Code objects allow arbitrary custom attributes to be set using the -# {#[]=} assignment method. -# -# == Namespaces -# There is a special type of object called a "namespace". These are subclasses -# of the {NamespaceObject} and represent Ruby entities that can have -# objects defined within them. Classically these are modules and classes, -# though a DSL might create a custom {NamespaceObject} to describe a -# specific set of objects. -# -# == Separators -# Custom classes with different separator tokens should define their own -# separators using the {NamespaceMapper.register_separator} method. The -# standard Ruby separators have already been defined ('::', '#', '.', etc). -# -# @abstract This class should not be used directly. Instead, create a -# subclass that implements {#path}, {#sep} or {#type}. You might also -# need to register custom separators if {#sep} uses alternate separator -# tokens. -# @see Registry -# @see #path -# @see #[]= -# @see NamespaceObject -# @see NamespaceMapper.register_separator -# -# source://yard//lib/yard/code_objects/base.rb#133 -class YARD::CodeObjects::Base - # Creates a new code object - # - # @example Create a method in the root namespace - # CodeObjects::Base.new(:root, '#method') # => #<yardoc method #method> - # @example Create class Z inside namespace X::Y - # CodeObjects::Base.new(P("X::Y"), :Z) # or - # CodeObjects::Base.new(Registry.root, "X::Y") - # @param namespace [NamespaceObject] the namespace the object belongs in, - # {Registry.root} or :root should be provided if it is associated with - # the top level namespace. - # @param name [Symbol, String] the name (or complex path) of the object. - # @return [Base] the newly created object - # @yield [self] a block to perform any extra initialization on the object - # @yieldparam self [Base] the newly initialized code object - # - # source://yard//lib/yard/code_objects/base.rb#238 - def initialize(namespace, name, *_arg2); end - - # Tests if another object is equal to this, including a proxy - # - # @param other [Base, Proxy] if other is a {Proxy}, tests if - # the paths are equal - # @return [Boolean] whether or not the objects are considered the same - # - # source://yard//lib/yard/code_objects/base.rb#323 - def ==(other); end - - # Accesses a custom attribute on the object - # - # @param key [#to_s] the name of the custom attribute - # @return [Object, nil] the custom attribute or nil if not found. - # @see #[]= - # - # source://yard//lib/yard/code_objects/base.rb#343 - def [](key); end - - # Sets a custom attribute on the object - # - # @param key [#to_s] the name of the custom attribute - # @param value [Object] the value to associate - # @return [void] - # @see #[] - # - # source://yard//lib/yard/code_objects/base.rb#356 - def []=(key, value); end - - # Associates a file with a code object, optionally adding the line where it was defined. - # By convention, '<stdin>' should be used to associate code that comes form standard input. - # - # @param file [String] the filename ('<stdin>' for standard input) - # @param line [Fixnum, nil] the line number where the object lies in the file - # @param has_comments [Boolean] whether or not the definition has comments associated. This - # will allow {#file} to return the definition where the comments were made instead - # of any empty definitions that might have been parsed before (module namespaces for instance). - # @raise [ArgumentError] - # - # source://yard//lib/yard/code_objects/base.rb#290 - def add_file(file, line = T.unsafe(nil), has_comments = T.unsafe(nil)); end - - # Add tags to the {#docstring} - # - # @see Docstring#add_tag - # @since 0.8.4 - # - # source://yard//lib/yard/code_objects/base.rb#561 - def add_tag(*tags); end - - # The non-localized documentation string associated with the object - # - # @return [Docstring] the documentation string - # @since 0.8.4 - # - # source://yard//lib/yard/code_objects/base.rb#166 - def base_docstring; end - - # Copies all data in this object to another code object, except for - # uniquely identifying information (path, namespace, name, scope). - # - # @param other [Base] the object to copy data to - # @return [Base] the other object - # @since 0.8.0 - # - # source://yard//lib/yard/code_objects/base.rb#263 - def copy_to(other); end - - # The documentation string associated with the object - # - # @param locale [String, I18n::Locale] (I18n::Locale.default) - # the locale of the documentation string. - # @return [Docstring] the documentation string - # - # source://yard//lib/yard/code_objects/base.rb#405 - def docstring(locale = T.unsafe(nil)); end - - # Attaches a docstring to a code object by parsing the comments attached to the statement - # and filling the {#tags} and {#docstring} methods with the parsed information. - # - # @param comments [String, Array<String>, Docstring] the comments attached to the code object to be parsed - # into a docstring and meta tags. - # - # source://yard//lib/yard/code_objects/base.rb#427 - def docstring=(comments); end - - # Marks whether or not the method is conditionally defined at runtime - # - # @return [Boolean] true if the method is conditionally defined at runtime - # - # source://yard//lib/yard/code_objects/base.rb#170 - def dynamic; end - - # Marks whether or not the method is conditionally defined at runtime - # - # @return [Boolean] true if the method is conditionally defined at runtime - # - # source://yard//lib/yard/code_objects/base.rb#170 - def dynamic=(_arg0); end - - # Is the object defined conditionally at runtime? - # - # @return [Boolean] - # @see #dynamic - # - # source://yard//lib/yard/code_objects/base.rb#178 - def dynamic?; end - - # Tests if another object is equal to this, including a proxy - # - # @param other [Base, Proxy] if other is a {Proxy}, tests if - # the paths are equal - # @return [Boolean] whether or not the objects are considered the same - # - # source://yard//lib/yard/code_objects/base.rb#323 - def eql?(other); end - - # Tests if another object is equal to this, including a proxy - # - # @param other [Base, Proxy] if other is a {Proxy}, tests if - # the paths are equal - # @return [Boolean] whether or not the objects are considered the same - # - # source://yard//lib/yard/code_objects/base.rb#323 - def equal?(other); end - - # Returns the filename the object was first parsed at, taking - # definitions with docstrings first. - # - # @return [String] a filename - # @return [nil] if there is no file associated with the object - # - # source://yard//lib/yard/code_objects/base.rb#307 - def file; end - - # The files the object was defined in. To add a file, use {#add_file}. - # - # @return [Array<Array(String, Integer)>] a list of files - # @see #add_file - # - # source://yard//lib/yard/code_objects/base.rb#137 - def files; end - - # Renders the object using the {Templates::Engine templating system}. - # - # @example Formats a class in plaintext - # puts P('MyClass').format - # @example Formats a method in html with rdoc markup - # puts P('MyClass#meth').format(:format => :html, :markup => :rdoc) - # @option options - # @option options - # @option options - # @option options - # @param options [Hash] a set of options to pass to the template - # @return [String] the rendered template - # @see Templates::Engine#render - # - # source://yard//lib/yard/code_objects/base.rb#505 - def format(options = T.unsafe(nil)); end - - # @return [String] the group this object is associated with - # @since 0.6.0 - # - # source://yard//lib/yard/code_objects/base.rb#174 - def group; end - - # @return [String] the group this object is associated with - # @since 0.6.0 - # - # source://yard//lib/yard/code_objects/base.rb#174 - def group=(_arg0); end - - # Tests if the {#docstring} has a tag - # - # @return [Boolean] - # @see Docstring#has_tag? - # - # source://yard//lib/yard/code_objects/base.rb#556 - def has_tag?(name); end - - # @return [Integer] the object's hash value (for equality checking) - # - # source://yard//lib/yard/code_objects/base.rb#334 - def hash; end - - # Inspects the object, returning the type and path - # - # @return [String] a string describing the object - # - # source://yard//lib/yard/code_objects/base.rb#513 - def inspect; end - - # Returns the line the object was first parsed at (or nil) - # - # @return [Fixnum] the line where the object was first defined. - # @return [nil] if there is no line associated with the object - # - # source://yard//lib/yard/code_objects/base.rb#315 - def line; end - - # @overload dynamic_attr_name - # @overload dynamic_attr_name= - # - # source://yard//lib/yard/code_objects/base.rb#373 - def method_missing(meth, *args, &block); end - - # The name of the object - # - # @param prefix [Boolean] whether to show a prefix. Implement - # this in a subclass to define how the prefix is showed. - # @return [Symbol] if prefix is false, the symbolized name - # @return [String] if prefix is true, prefix + the name as a String. - # This must be implemented by the subclass. - # - # source://yard//lib/yard/code_objects/base.rb#278 - def name(prefix = T.unsafe(nil)); end - - # The namespace the object is defined in. If the object is in the - # top level namespace, this is {Registry.root} - # - # @return [NamespaceObject] the namespace object - # - # source://yard//lib/yard/code_objects/base.rb#142 - def namespace; end - - # Sets the namespace the object is defined in. - # - # @param obj [NamespaceObject, :root, nil] the new namespace (:root - # for {Registry.root}). If obj is nil, the object is unregistered - # from the Registry. - # - # source://yard//lib/yard/code_objects/base.rb#522 - def namespace=(obj); end - - # The namespace the object is defined in. If the object is in the - # top level namespace, this is {Registry.root} - # - # @return [NamespaceObject] the namespace object - # - # source://yard//lib/yard/code_objects/base.rb#142 - def parent; end - - # Sets the namespace the object is defined in. - # - # @param obj [NamespaceObject, :root, nil] the new namespace (:root - # for {Registry.root}). If obj is nil, the object is unregistered - # from the Registry. - # - # source://yard//lib/yard/code_objects/base.rb#522 - def parent=(obj); end - - # Represents the unique path of the object. The default implementation - # joins the path of {#namespace} with {#name} via the value of {#sep}. - # Custom code objects should ensure that the path is unique to the code - # object by either overriding {#sep} or this method. - # - # @example The path of an instance method - # MethodObject.new(P("A::B"), :c).path # => "A::B#c" - # @return [String] the unique path of the object - # @see #sep - # - # source://yard//lib/yard/code_objects/base.rb#453 - def path; end - - # @param other [Base, String] another code object (or object path) - # @return [String] the shortest relative path from this object to +other+ - # @since 0.5.3 - # - # source://yard//lib/yard/code_objects/base.rb#475 - def relative_path(other); end - - # @return [Boolean] whether or not this object is a RootObject - # - # source://yard//lib/yard/code_objects/base.rb#567 - def root?; end - - # Override this method with a custom component separator. For instance, - # {MethodObject} implements sep as '#' or '.' (depending on if the - # method is instance or class respectively). {#path} depends on this - # value to generate the full path in the form: namespace.path + sep + name - # - # @return [String] the component that separates the namespace path - # and the name (default is {NSEP}) - # - # source://yard//lib/yard/code_objects/base.rb#576 - def sep; end - - # The one line signature representing an object. For a method, this will - # be of the form "def meth(arguments...)". This is usually the first - # source line. - # - # @return [String] a line of source - # - # source://yard//lib/yard/code_objects/base.rb#159 - def signature; end - - # The one line signature representing an object. For a method, this will - # be of the form "def meth(arguments...)". This is usually the first - # source line. - # - # @return [String] a line of source - # - # source://yard//lib/yard/code_objects/base.rb#159 - def signature=(_arg0); end - - # The source code associated with the object - # - # @return [String, nil] source, if present, or nil - # - # source://yard//lib/yard/code_objects/base.rb#146 - def source; end - - # Attaches source code to a code object with an optional file location - # - # @param statement [#source, String] the +Parser::Statement+ holding the source code or the raw source - # as a +String+ for the definition of the code object only (not the block) - # - # source://yard//lib/yard/code_objects/base.rb#388 - def source=(statement); end - - # Language of the source code associated with the object. Defaults to - # +:ruby+. - # - # @return [Symbol] the language type - # - # source://yard//lib/yard/code_objects/base.rb#152 - def source_type; end - - # Language of the source code associated with the object. Defaults to - # +:ruby+. - # - # @return [Symbol] the language type - # - # source://yard//lib/yard/code_objects/base.rb#152 - def source_type=(_arg0); end - - # Gets a tag from the {#docstring} - # - # @see Docstring#tag - # - # source://yard//lib/yard/code_objects/base.rb#548 - def tag(name); end - - # Gets a list of tags from the {#docstring} - # - # @see Docstring#tags - # - # source://yard//lib/yard/code_objects/base.rb#552 - def tags(name = T.unsafe(nil)); end - - # @note Override this method if your object has a special title that does - # not match the {#path} attribute value. This title will be used - # when linking or displaying the object. - # @return [String] the display title for an object - # @see 0.8.4 - # - # source://yard//lib/yard/code_objects/base.rb#468 - def title; end - - # @return [nil] this object does not turn into an array - # - # source://yard//lib/yard/code_objects/base.rb#337 - def to_ary; end - - # Represents the unique path of the object. The default implementation - # joins the path of {#namespace} with {#name} via the value of {#sep}. - # Custom code objects should ensure that the path is unique to the code - # object by either overriding {#sep} or this method. - # - # @example The path of an instance method - # MethodObject.new(P("A::B"), :c).path # => "A::B#c" - # @return [String] the unique path of the object - # @see #sep - # - # source://yard//lib/yard/code_objects/base.rb#453 - def to_s; end - - # Default type is the lowercase class name without the "Object" suffix. - # Override this method to provide a custom object type - # - # @return [Symbol] the type of code object this represents - # - # source://yard//lib/yard/code_objects/base.rb#437 - def type; end - - # @return [Symbol] the visibility of an object (:public, :private, :protected) - # - # source://yard//lib/yard/code_objects/base.rb#181 - def visibility; end - - # @return [Symbol] the visibility of an object (:public, :private, :protected) - # - # source://yard//lib/yard/code_objects/base.rb#183 - def visibility=(v); end - - protected - - # Override this method if your code object subclass does not allow - # copying of certain attributes. - # - # @return [Array<String>] the list of instance variable names (without - # "@" prefix) that should be copied when {#copy_to} is called - # @see #copy_to - # @since 0.8.0 - # - # source://yard//lib/yard/code_objects/base.rb#587 - def copyable_attributes; end - - private - - # Formats source code by removing leading indentation - # - # @param source [String] the source code to format - # @return [String] formatted source - # - # source://yard//lib/yard/code_objects/base.rb#599 - def format_source(source); end - - # source://yard//lib/yard/code_objects/base.rb#606 - def translate_docstring(locale); end - - class << self - # Compares the class with subclasses - # - # @param other [Object] the other object to compare classes with - # @return [Boolean] true if other is a subclass of self - # - # source://yard//lib/yard/code_objects/base.rb#219 - def ===(other); end - - # Allocates a new code object - # - # @raise [ArgumentError] - # @return [Base] - # @see #initialize - # @yield [obj] - # - # source://yard//lib/yard/code_objects/base.rb#189 - def new(namespace, name, *args, &block); end - end -end - -# Regular expression to match constant name -# -# source://yard//lib/yard/code_objects/base.rb#52 -YARD::CodeObjects::CONSTANTMATCH = T.let(T.unsafe(nil), Regexp) - -# Regular expression to match the beginning of a constant -# -# source://yard//lib/yard/code_objects/base.rb#55 -YARD::CodeObjects::CONSTANTSTART = T.let(T.unsafe(nil), Regexp) - -# Class method separator -# -# source://yard//lib/yard/code_objects/base.rb#46 -YARD::CodeObjects::CSEP = T.let(T.unsafe(nil), String) - -# Regex-quoted class method separator -# -# source://yard//lib/yard/code_objects/base.rb#49 -YARD::CodeObjects::CSEPQ = T.let(T.unsafe(nil), String) - -# A ClassObject represents a Ruby class in source code. It is a {ModuleObject} -# with extra inheritance semantics through the superclass. -# -# source://yard//lib/yard/code_objects/class_object.rb#7 -class YARD::CodeObjects::ClassObject < ::YARD::CodeObjects::NamespaceObject - # Creates a new class object in +namespace+ with +name+ - # - # @return [ClassObject] a new instance of ClassObject - # @see Base.new - # - # source://yard//lib/yard/code_objects/class_object.rb#15 - def initialize(namespace, name, *args, &block); end - - # Returns the list of constants matching the options hash. - # - # @option opts - # @option opts - # @param opts [Hash] the options hash to match - # @return [Array<ConstantObject>] the list of constant that matched - # - # source://yard//lib/yard/code_objects/class_object.rb#101 - def constants(opts = T.unsafe(nil)); end - - # Returns the inheritance tree of the object including self. - # - # @param include_mods [Boolean] whether or not to include mixins in the - # inheritance tree. - # @return [Array<NamespaceObject>] the list of code objects that make up - # the inheritance tree. - # - # source://yard//lib/yard/code_objects/class_object.rb#45 - def inheritance_tree(include_mods = T.unsafe(nil)); end - - # Returns only the constants that were inherited. - # - # @return [Array<ConstantObject>] the list of inherited constant objects - # - # source://yard//lib/yard/code_objects/class_object.rb#109 - def inherited_constants; end - - # Returns only the methods that were inherited. - # - # @return [Array<MethodObject>] the list of inherited method objects - # - # source://yard//lib/yard/code_objects/class_object.rb#79 - def inherited_meths(opts = T.unsafe(nil)); end - - # Whether or not the class is a Ruby Exception - # - # @return [Boolean] whether the object represents a Ruby exception - # - # source://yard//lib/yard/code_objects/class_object.rb#35 - def is_exception?; end - - # Returns the list of methods matching the options hash. Returns - # all methods if hash is empty. - # - # @option opts - # @option opts - # @param opts [Hash] the options hash to match - # @return [Array<MethodObject>] the list of methods that matched - # - # source://yard//lib/yard/code_objects/class_object.rb#66 - def meths(opts = T.unsafe(nil)); end - - # The {ClassObject} that this class object inherits from in Ruby source. - # - # @return [ClassObject] a class object that is the superclass of this one - # - # source://yard//lib/yard/code_objects/class_object.rb#10 - def superclass; end - - # Sets the superclass of the object - # - # @param object [Base, Proxy, String, Symbol, nil] the superclass value - # @return [void] - # - # source://yard//lib/yard/code_objects/class_object.rb#125 - def superclass=(object); end -end - -# Represents a class variable inside a namespace. The path is expressed -# in the form "A::B::@@classvariable" -# -# source://yard//lib/yard/code_objects/class_variable_object.rb#7 -class YARD::CodeObjects::ClassVariableObject < ::YARD::CodeObjects::Base - # @return [String] the class variable's value - # - # source://yard//lib/yard/code_objects/class_variable_object.rb#9 - def value; end - - # @return [String] the class variable's value - # - # source://yard//lib/yard/code_objects/class_variable_object.rb#9 - def value=(_arg0); end -end - -# A list of code objects. This array acts like a set (no unique items) -# but also disallows any {Proxy} objects from being added. -# -# source://yard//lib/yard/code_objects/base.rb#6 -class YARD::CodeObjects::CodeObjectList < ::Array - # Creates a new object list associated with a namespace - # - # @param owner [NamespaceObject] the namespace the list should be associated with - # @return [CodeObjectList] - # - # source://yard//lib/yard/code_objects/base.rb#11 - def initialize(owner = T.unsafe(nil)); end - - # Adds a new value to the list - # - # @param value [Base] a code object to add - # @return [CodeObjectList] self - # - # source://yard//lib/yard/code_objects/base.rb#19 - def <<(value); end - - # Adds a new value to the list - # - # @param value [Base] a code object to add - # @return [CodeObjectList] self - # - # source://yard//lib/yard/code_objects/base.rb#19 - def push(value); end -end - -# A +ConstantObject+ represents a Ruby constant (not a module or class). -# To access the constant's (source code) value, use {#value}. -# -# source://yard//lib/yard/code_objects/constant_object.rb#7 -class YARD::CodeObjects::ConstantObject < ::YARD::CodeObjects::Base - # The source code representing the constant's value - # - # @return [String] the value the constant is set to - # - # source://yard//lib/yard/code_objects/constant_object.rb#10 - def value; end - - # source://yard//lib/yard/code_objects/constant_object.rb#12 - def value=(value); end -end - -# Represents an instance method of a module that was mixed into the class -# scope of another namespace. -# -# @see MethodObject -# -# source://yard//lib/yard/code_objects/extended_method_object.rb#7 -class YARD::CodeObjects::ExtendedMethodObject - # Sets up a delegate for {MethodObject} obj. - # - # @param obj [MethodObject] the instance method to treat as a mixed in - # class method on another namespace. - # @return [ExtendedMethodObject] a new instance of ExtendedMethodObject - # - # source://yard//lib/yard/code_objects/extended_method_object.rb#17 - def initialize(obj); end - - # Sends all methods to the {MethodObject} assigned in {#initialize} - # - # @see #initialize - # @see MethodObject - # - # source://yard//lib/yard/code_objects/extended_method_object.rb#22 - def method_missing(sym, *args, &block); end - - # @return [Symbol] always +:class+ - # - # source://yard//lib/yard/code_objects/extended_method_object.rb#11 - def scope; end -end - -# An ExtraFileObject represents an extra documentation file (README or other -# file). It is not strictly a CodeObject (does not inherit from `Base`) although -# it implements `path`, `name` and `type`, and therefore should be structurally -# compatible with most CodeObject interfaces. -# -# source://yard//lib/yard/code_objects/extra_file_object.rb#7 -class YARD::CodeObjects::ExtraFileObject - # Creates a new extra file object. - # - # @param filename [String] the location on disk of the file - # @param contents [String] the file contents. If not set, the contents - # will be read from disk using the +filename+. - # @return [ExtraFileObject] a new instance of ExtraFileObject - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#18 - def initialize(filename, contents = T.unsafe(nil)); end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#64 - def ==(other); end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#30 - def attributes; end - - # Sets the attribute attributes - # - # @param value the value to set the attribute attributes to. - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#9 - def attributes=(_arg0); end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#39 - def contents; end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#44 - def contents=(contents); end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#64 - def eql?(other); end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#64 - def equal?(other); end - - # Returns the value of attribute filename. - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#8 - def filename; end - - # Sets the attribute filename - # - # @param value the value to set the attribute filename to. - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#8 - def filename=(_arg0); end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#70 - def hash; end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#57 - def inspect; end - - # @since 0.8.3 - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#12 - def locale; end - - # @param locale [String] the locale name to be translated. - # @return [void] - # @since 0.8.3 - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#52 - def locale=(locale); end - - # Returns the value of attribute name. - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#10 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#10 - def name=(_arg0); end - - # Returns the value of attribute name. - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#10 - def path; end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#35 - def title; end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#57 - def to_s; end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#62 - def type; end - - private - - # source://yard//lib/yard/code_objects/extra_file_object.rb#74 - def ensure_parsed; end - - # @param data [String] the file contents - # - # source://yard//lib/yard/code_objects/extra_file_object.rb#81 - def parse_contents(data); end - - # source://yard//lib/yard/code_objects/extra_file_object.rb#129 - def translate(data); end -end - -# Instance method separator -# -# source://yard//lib/yard/code_objects/base.rb#40 -YARD::CodeObjects::ISEP = T.let(T.unsafe(nil), String) - -# Regex-quoted instance method separator -# -# source://yard//lib/yard/code_objects/base.rb#43 -YARD::CodeObjects::ISEPQ = T.let(T.unsafe(nil), String) - -# Regular expression to match a fully qualified method def (self.foo, Class.foo). -# -# source://yard//lib/yard/code_objects/base.rb#64 -YARD::CodeObjects::METHODMATCH = T.let(T.unsafe(nil), Regexp) - -# Regular expression to match a method name -# -# source://yard//lib/yard/code_objects/base.rb#61 -YARD::CodeObjects::METHODNAMEMATCH = T.let(T.unsafe(nil), Regexp) - -# A MacroObject represents a docstring defined through +@!macro NAME+ and can be -# reused by specifying the tag +@!macro NAME+. You can also provide the -# +attached+ type flag to the macro definition to have it attached to the -# specific DSL method so it will be implicitly reused. -# -# Macros are fully described in the {file:docs/Tags.md#macro Tags Overview} -# document. -# -# @example Creating a basic named macro -# # @!macro prop -# # @!method $1(${3-}) -# # @return [$2] the value of the $0 -# property :foo, String, :a, :b -# -# # @!macro prop -# property :bar, Numeric, :value -# @example Creating a macro that is attached to the method call -# # @!macro [attach] prop2 -# # @!method $1(value) -# property :foo -# -# # Extra data added to docstring -# property :bar -# -# source://yard//lib/yard/code_objects/macro_object.rb#29 -class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base - # @return [Boolean] whether this macro is attached to a method - # - # source://yard//lib/yard/code_objects/macro_object.rb#148 - def attached?; end - - # Expands the macro using - # - # @example Expanding a Macro - # macro.expand(%w(property foo bar), 'property :foo, :bar', '') #=> - # "...macro data interpolating this line of code..." - # @param call_params [Array<String>] a list of tokens that are passed - # to the method call - # @param full_source [String] the full method call (not including the block) - # @param block_source [String] the source passed in the block of the method - # call, if there is a block. - # @see expand - # - # source://yard//lib/yard/code_objects/macro_object.rb#166 - def expand(call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end - - # @return [String] the macro data stored on the object - # - # source://yard//lib/yard/code_objects/macro_object.rb#141 - def macro_data; end - - # @return [String] the macro data stored on the object - # - # source://yard//lib/yard/code_objects/macro_object.rb#141 - def macro_data=(_arg0); end - - # @return [CodeObjects::Base] the method object that this macro is - # attached to. - # - # source://yard//lib/yard/code_objects/macro_object.rb#145 - def method_object; end - - # @return [CodeObjects::Base] the method object that this macro is - # attached to. - # - # source://yard//lib/yard/code_objects/macro_object.rb#145 - def method_object=(_arg0); end - - # Overrides {Base#path} so the macro path is ".macro.MACRONAME" - # - # source://yard//lib/yard/code_objects/macro_object.rb#151 - def path; end - - # Overrides the separator to be '.' - # - # source://yard//lib/yard/code_objects/macro_object.rb#154 - def sep; end - - class << self - # Applies a macro on a docstring by creating any macro data inside of - # the docstring first. Equivalent to calling {find_or_create} and {apply_macro} - # on the new macro object. - # - # @param docstring [Docstring] the docstring to create a macro out of - # @param call_params [Array<String>] the method name and parameters - # to the method call. These arguments will fill $0-N - # @param full_source [String] the full source line (excluding block) - # interpolated as $* - # @param block_source [String] Currently unused. Will support - # interpolating the block data as a variable. - # @return [String] the expanded macro data - # @see find_or_create - # - # source://yard//lib/yard/code_objects/macro_object.rb#119 - def apply(docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil), _method_object = T.unsafe(nil)); end - - # Applies a macro to a docstring, interpolating the macro's data on the - # docstring and appending any extra local docstring data that was in - # the original +docstring+ object. - # - # @param macro [MacroObject] the macro object - # @param call_params [Array<String>] the method name and parameters - # to the method call. These arguments will fill $0-N - # @param full_source [String] the full source line (excluding block) - # interpolated as $* - # @param block_source [String] Currently unused. Will support - # interpolating the block data as a variable. - # @return [String] the expanded macro data - # - # source://yard//lib/yard/code_objects/macro_object.rb#135 - def apply_macro(macro, docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end - - # Creates a new macro and fills in the relevant properties. - # - # @param macro_name [String] the name of the macro, must be unique. - # @param data [String] the data the macro should expand when re-used - # @param method_object [CodeObjects::Base] an object to attach this - # macro to. If supplied, {#attached?} will be true - # @return [MacroObject] the newly created object - # - # source://yard//lib/yard/code_objects/macro_object.rb#39 - def create(macro_name, data, method_object = T.unsafe(nil)); end - - # Parses a given docstring and determines if the macro is "new" or - # not. If the macro has $variable names or if it has a @!macro tag - # with the [new] or [attached] flag, it is considered new. - # - # If a new macro is found, the macro is created and registered. Otherwise - # the macro name is searched and returned. If a macro is not found, - # nil is returned. - # - # @param macro_name [#to_s] the name of the macro - # @param method_object [CodeObjects::Base] an optional method to attach - # the macro to. Only used if the macro is being created, otherwise - # this argument is ignored. - # @return [MacroObject] the newly created or existing macro, depending - # on whether the @!macro tag was a new tag or not. - # @return [nil] if the +data+ has no macro tag or if the macro is - # not new and no macro by the macro name is found. - # - # source://yard//lib/yard/code_objects/macro_object.rb#70 - def create_docstring(macro_name, data, method_object = T.unsafe(nil)); end - - # Expands +macro_data+ using the interpolation parameters. - # - # Interpolation rules: - # * $0, $1, $2, ... = the Nth parameter in +call_params+ - # * $* = the full statement source (excluding block) - # * Also supports $!{N-M} ranges, as well as negative indexes on N or M - # * Use \$ to escape the variable name in a macro. - # - # @param macro_data [String] the macro data to expand (taken from {#macro_data}) - # - # source://yard//lib/yard/code_objects/macro_object.rb#92 - def expand(macro_data, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end - - # Finds a macro using +macro_name+ - # - # @param macro_name [#to_s] the name of the macro - # @return [MacroObject] if a macro is found - # @return [nil] if there is no registered macro by that name - # - # source://yard//lib/yard/code_objects/macro_object.rb#50 - def find(macro_name); end - - # Parses a given docstring and determines if the macro is "new" or - # not. If the macro has $variable names or if it has a @!macro tag - # with the [new] or [attached] flag, it is considered new. - # - # If a new macro is found, the macro is created and registered. Otherwise - # the macro name is searched and returned. If a macro is not found, - # nil is returned. - # - # @param macro_name [#to_s] the name of the macro - # @param method_object [CodeObjects::Base] an optional method to attach - # the macro to. Only used if the macro is being created, otherwise - # this argument is ignored. - # @return [MacroObject] the newly created or existing macro, depending - # on whether the @!macro tag was a new tag or not. - # @return [nil] if the +data+ has no macro tag or if the macro is - # not new and no macro by the macro name is found. - # - # source://yard//lib/yard/code_objects/macro_object.rb#70 - def find_or_create(macro_name, data, method_object = T.unsafe(nil)); end - end -end - -# source://yard//lib/yard/code_objects/macro_object.rb#30 -YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) - -# Represents a Ruby method in source -# -# source://yard//lib/yard/code_objects/method_object.rb#7 -class YARD::CodeObjects::MethodObject < ::YARD::CodeObjects::Base - # Creates a new method object in +namespace+ with +name+ and an instance - # or class +scope+ - # - # If scope is +:module+, this object is instantiated as a public - # method in +:class+ scope, but also creates a new (empty) method - # as a private +:instance+ method on the same class or module. - # - # @param namespace [NamespaceObject] the namespace - # @param name [String, Symbol] the method name - # @param scope [Symbol] +:instance+, +:class+, or +:module+ - # @return [MethodObject] a new instance of MethodObject - # - # source://yard//lib/yard/code_objects/method_object.rb#37 - def initialize(namespace, name, scope = T.unsafe(nil), &block); end - - # Returns all alias names of the object - # - # @return [Array<MethodObject>] the alias names - # - # source://yard//lib/yard/code_objects/method_object.rb#149 - def aliases; end - - # Returns the read/writer info for the attribute if it is one - # - # @return [SymbolHash] if there is information about the attribute - # @return [nil] if the method is not an attribute - # @since 0.5.3 - # - # source://yard//lib/yard/code_objects/method_object.rb#93 - def attr_info; end - - # @return [Boolean] whether or not the method is the #initialize constructor method - # - # source://yard//lib/yard/code_objects/method_object.rb#78 - def constructor?; end - - # Whether the object is explicitly defined in source or whether it was - # inferred by a handler. For instance, attribute methods are generally - # inferred and therefore not explicitly defined in source. - # - # @return [Boolean] whether the object is explicitly defined in source. - # - # source://yard//lib/yard/code_objects/method_object.rb#18 - def explicit; end - - # Whether the object is explicitly defined in source or whether it was - # inferred by a handler. For instance, attribute methods are generally - # inferred and therefore not explicitly defined in source. - # - # @return [Boolean] whether the object is explicitly defined in source. - # - # source://yard//lib/yard/code_objects/method_object.rb#18 - def explicit=(_arg0); end - - # Tests if the object is defined as an alias of another method - # - # @return [Boolean] whether the object is an alias - # - # source://yard//lib/yard/code_objects/method_object.rb#126 - def is_alias?; end - - # Tests if the object is defined as an attribute in the namespace - # - # @return [Boolean] whether the object is an attribute - # - # source://yard//lib/yard/code_objects/method_object.rb#114 - def is_attribute?; end - - # Tests boolean {#explicit} value. - # - # @return [Boolean] whether the method is explicitly defined in source - # - # source://yard//lib/yard/code_objects/method_object.rb#134 - def is_explicit?; end - - # @return [Boolean] whether or not this method was created as a module - # function - # @since 0.8.0 - # - # source://yard//lib/yard/code_objects/method_object.rb#85 - def module_function?; end - - # Returns the name of the object. - # - # @example The name of an instance method (with prefix) - # an_instance_method.name(true) # => "#mymethod" - # @example The name of a class method (with prefix) - # a_class_method.name(true) # => "mymethod" - # @param prefix [Boolean] whether or not to show the prefix - # @return [String] returns {#sep} + +name+ for an instance method if - # prefix is true - # @return [Symbol] the name without {#sep} if prefix is set to false - # - # source://yard//lib/yard/code_objects/method_object.rb#175 - def name(prefix = T.unsafe(nil)); end - - # @return [MethodObject] the object that this method overrides - # @return [nil] if it does not override a method - # @since 0.6.0 - # - # source://yard//lib/yard/code_objects/method_object.rb#141 - def overridden_method; end - - # Returns the list of parameters parsed out of the method signature - # with their default values. - # - # @return [Array<Array(String, String)>] a list of parameter names followed - # by their default values (or nil) - # - # source://yard//lib/yard/code_objects/method_object.rb#25 - def parameters; end - - # Returns the list of parameters parsed out of the method signature - # with their default values. - # - # @return [Array<Array(String, String)>] a list of parameter names followed - # by their default values (or nil) - # - # source://yard//lib/yard/code_objects/method_object.rb#25 - def parameters=(_arg0); end - - # Override path handling for instance methods in the root namespace - # (they should still have a separator as a prefix). - # - # @return [String] the path of a method - # - # source://yard//lib/yard/code_objects/method_object.rb#161 - def path; end - - # @return [Boolean] whether the method is a reader attribute - # @since 0.5.3 - # - # source://yard//lib/yard/code_objects/method_object.rb#107 - def reader?; end - - # The scope of the method (+:class+ or +:instance+) - # - # @return [Symbol] the scope - # - # source://yard//lib/yard/code_objects/method_object.rb#11 - def scope; end - - # Changes the scope of an object from :instance or :class - # - # @param v [Symbol] the new scope - # - # source://yard//lib/yard/code_objects/method_object.rb#58 - def scope=(v); end - - # Override separator to differentiate between class and instance - # methods. - # - # @return [String] "#" for an instance method, "." for class - # - # source://yard//lib/yard/code_objects/method_object.rb#182 - def sep; end - - # @return [Boolean] whether the method is a writer attribute - # @since 0.5.3 - # - # source://yard//lib/yard/code_objects/method_object.rb#100 - def writer?; end - - protected - - # source://yard//lib/yard/code_objects/method_object.rb#192 - def copyable_attributes; end -end - -# Represents a Ruby module. -# -# source://yard//lib/yard/code_objects/module_object.rb#6 -class YARD::CodeObjects::ModuleObject < ::YARD::CodeObjects::NamespaceObject - # Returns the inheritance tree of mixins. - # - # @param include_mods [Boolean] if true, will include mixed in - # modules (which is likely what is wanted). - # @return [Array<NamespaceObject>] a list of namespace objects - # - # source://yard//lib/yard/code_objects/module_object.rb#12 - def inheritance_tree(include_mods = T.unsafe(nil)); end -end - -# Regular expression to match namespaces (const A or complex path A::B) -# -# source://yard//lib/yard/code_objects/base.rb#58 -YARD::CodeObjects::NAMESPACEMATCH = T.let(T.unsafe(nil), Regexp) - -# Namespace separator -# -# source://yard//lib/yard/code_objects/base.rb#34 -YARD::CodeObjects::NSEP = T.let(T.unsafe(nil), String) - -# Regex-quoted namespace separator -# -# source://yard//lib/yard/code_objects/base.rb#37 -YARD::CodeObjects::NSEPQ = T.let(T.unsafe(nil), String) - -# This module controls registration and accessing of namespace separators -# for {Registry} lookup. -# -# @since 0.9.1 -# -# source://yard//lib/yard/code_objects/namespace_mapper.rb#8 -module YARD::CodeObjects::NamespaceMapper - # Clears the map of separators. - # - # @return [void] - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#55 - def clear_separators; end - - # Gets or sets the default separator value to use when no - # separator for the namespace can be determined. - # - # @example - # default_separator "::" - # @param value [String, nil] the default separator, or nil to return the - # value - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#68 - def default_separator(value = T.unsafe(nil)); end - - # Registers a separator with an optional set of valid types that - # must follow the separator lexically. - # - # Calls all callbacks defined by {NamespaceMapper.on_invalidate} after - # the separator is registered. - # - # @example Registering separators for a method object - # # Anything after a "#" denotes a method object - # register_separator "#", :method - # # Anything after a "." denotes a method object - # register_separator ".", :method - # @param sep [String] the separator string for the namespace - # @param valid_types [Array<Symbol>] a list of object types that - # must follow the separator. If the list is empty, any type can - # follow the separator. - # @see .on_invalidate - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#27 - def register_separator(sep, *valid_types); end - - # @return [Array<String>] all of the registered separators - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#80 - def separators; end - - # @param type [String] the type to return separators for - # @return [Array<Symbol>] a list of separators registered to a type - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#97 - def separators_for_type(type); end - - # @return [Regexp] the regexp match of all separators - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#85 - def separators_match; end - - # @param sep [String] the separator to return types for - # @return [Array<Symbol>] a list of types registered to a separator - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#91 - def types_for_separator(sep); end - - # Unregisters a separator by a type. - # - # @param type [Symbol] the type to unregister - # @see #register_separator - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#43 - def unregister_separator_by_type(type); end - - class << self - # @return [String] the default separator when no separator can begin - # determined. - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#137 - def default_separator; end - - # @return [String] the default separator when no separator can begin - # determined. - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#137 - def default_separator=(_arg0); end - - # Invalidates all separators - # - # @return [void] - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#125 - def invalidate; end - - # @return [Hash] a mapping of types to separators - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#114 - def map; end - - # @return [Regexp] the full list of separators as a regexp match - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#131 - def map_match; end - - # Adds a callback that triggers when a new separator is registered or - # the cache is cleared by invalidation. - # - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#107 - def on_invalidate(&block); end - - # @return [Hash] a reverse mapping of separators to types - # @since 0.9.1 - # - # source://yard//lib/yard/code_objects/namespace_mapper.rb#119 - def rev_map; end - end -end - -# A "namespace" is any object that can store other objects within itself. -# The two main Ruby objects that can act as namespaces are modules -# ({ModuleObject}) and classes ({ClassObject}). -# -# source://yard//lib/yard/code_objects/namespace_object.rb#9 -class YARD::CodeObjects::NamespaceObject < ::YARD::CodeObjects::Base - # Creates a new namespace object inside +namespace+ with +name+. - # - # @return [NamespaceObject] a new instance of NamespaceObject - # @see Base#initialize - # - # source://yard//lib/yard/code_objects/namespace_object.rb#56 - def initialize(namespace, name, *args, &block); end - - # A hash containing two keys, :class and :instance, each containing - # a hash of objects and their alias names. - # - # @return [Hash] a list of methods - # - # source://yard//lib/yard/code_objects/namespace_object.rb#44 - def aliases; end - - # A hash containing two keys, class and instance, each containing - # the attribute name with a { :read, :write } hash for the read and - # write objects respectively. - # - # @example The attributes of an object - # >> Registry.at('YARD::Docstring').attributes - # => { - # :class => { }, - # :instance => { - # :ref_tags => { - # :read => #<yardoc method YARD::Docstring#ref_tags>, - # :write => nil - # }, - # :object => { - # :read => #<yardoc method YARD::Docstring#object>, - # :write => #<yardoc method YARD::Docstring#object=> - # }, - # ... - # } - # } - # @return [Hash] a list of methods - # - # source://yard//lib/yard/code_objects/namespace_object.rb#39 - def attributes; end - - # Looks for a child that matches the attributes specified by +opts+. - # - # @example Finds a child by name and scope - # namespace.child(:name => :to_s, :scope => :instance) - # # => #<yardoc method MyClass#to_s> - # @return [Base, nil] the first matched child object, or nil - # - # source://yard//lib/yard/code_objects/namespace_object.rb#86 - def child(opts = T.unsafe(nil)); end - - # The list of objects defined in this namespace - # - # @return [Array<Base>] a list of objects - # - # source://yard//lib/yard/code_objects/namespace_object.rb#16 - def children; end - - # Only the class attributes - # - # @return [Hash] a list of method names and their read/write objects - # @see #attributes - # - # source://yard//lib/yard/code_objects/namespace_object.rb#69 - def class_attributes; end - - # Class mixins - # - # @return [Array<ModuleObject>] a list of mixins - # - # source://yard//lib/yard/code_objects/namespace_object.rb#48 - def class_mixins; end - - # Returns all constants in the namespace - # - # @option opts - # @param opts [Hash] a customizable set of options - # @return [Array<ConstantObject>] a list of constant objects - # - # source://yard//lib/yard/code_objects/namespace_object.rb#164 - def constants(opts = T.unsafe(nil)); end - - # Returns class variables defined in this namespace. - # - # @return [Array<ClassVariableObject>] a list of class variable objects - # - # source://yard//lib/yard/code_objects/namespace_object.rb#186 - def cvars; end - - # @return [Array<String>] a list of ordered group names inside the namespace - # @since 0.6.0 - # - # source://yard//lib/yard/code_objects/namespace_object.rb#12 - def groups; end - - # @return [Array<String>] a list of ordered group names inside the namespace - # @since 0.6.0 - # - # source://yard//lib/yard/code_objects/namespace_object.rb#12 - def groups=(_arg0); end - - # Returns constants included from any mixins - # - # @return [Array<ConstantObject>] a list of constant objects - # - # source://yard//lib/yard/code_objects/namespace_object.rb#172 - def included_constants; end - - # Returns methods included from any mixins that match the attributes - # specified by +opts+. If no options are specified, returns all included - # methods. - # - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @see #meths - # - # source://yard//lib/yard/code_objects/namespace_object.rb#144 - def included_meths(opts = T.unsafe(nil)); end - - # Only the instance attributes - # - # @return [Hash] a list of method names and their read/write objects - # @see #attributes - # - # source://yard//lib/yard/code_objects/namespace_object.rb#76 - def instance_attributes; end - - # Instance mixins - # - # @return [Array<ModuleObject>] a list of mixins - # - # source://yard//lib/yard/code_objects/namespace_object.rb#52 - def instance_mixins; end - - # Returns all methods that match the attributes specified by +opts+. If - # no options are provided, returns all methods. - # - # @example Finds all private and protected class methods - # namespace.meths(:visibility => [:private, :protected], :scope => :class) - # # => [#<yardoc method MyClass.privmeth>, #<yardoc method MyClass.protmeth>] - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @return [Array<MethodObject>] a list of method objects - # - # source://yard//lib/yard/code_objects/namespace_object.rb#113 - def meths(opts = T.unsafe(nil)); end - - # Returns for specific scopes. If no scopes are provided, returns all mixins. - # - # @param scopes [Array<Symbol>] a list of scopes (:class, :instance) to - # return mixins for. If this is empty, all scopes will be returned. - # @return [Array<ModuleObject>] a list of mixins - # - # source://yard//lib/yard/code_objects/namespace_object.rb#194 - def mixins(*scopes); end -end - -# @private -# -# source://yard//lib/yard/code_objects/proxy.rb#8 -YARD::CodeObjects::PROXY_MATCH = T.let(T.unsafe(nil), Regexp) - -# The Proxy class is a way to lazily resolve code objects in -# cases where the object may not yet exist. A proxy simply stores -# an unresolved path until a method is called on the object, at which -# point it does a lookup using {Registry.resolve}. If the object is -# not found, a warning is raised and {ProxyMethodError} might be raised. -# -# @example Creates a Proxy to the String class from a module -# # When the String class is parsed this method will -# # begin to act like the String ClassObject. -# Proxy.new(mymoduleobj, "String") -# @see Registry.resolve -# @see ProxyMethodError -# -# source://yard//lib/yard/code_objects/proxy.rb#24 -class YARD::CodeObjects::Proxy - # Creates a new Proxy - # - # @raise [ArgumentError] if namespace is not a NamespaceObject - # @return [Proxy] self - # - # source://yard//lib/yard/code_objects/proxy.rb#34 - def initialize(namespace, name, type = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/proxy.rb#118 - def <=>(other); end - - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/proxy.rb#127 - def ==(other); end - - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/proxy.rb#113 - def ===(other); end - - # Returns the class name of the object the proxy is mimicking, if - # resolved. Otherwise returns +Proxy+. - # - # @return [Class] the resolved object's class or +Proxy+ - # - # source://yard//lib/yard/code_objects/proxy.rb#142 - def class; end - - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/proxy.rb#127 - def equal?(other); end - - # @return [Integer] the object's hash value (for equality checking) - # - # source://yard//lib/yard/code_objects/proxy.rb#137 - def hash; end - - # Returns a text representation of the Proxy - # - # @return [String] the object's #inspect method or P(OBJECTPATH) - # - # source://yard//lib/yard/code_objects/proxy.rb#91 - def inspect; end - - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/proxy.rb#161 - def instance_of?(klass); end - - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/proxy.rb#108 - def is_a?(klass); end - - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/proxy.rb#166 - def kind_of?(klass); end - - # Dispatches the method to the resolved object. - # - # @raise [ProxyMethodError] if the proxy cannot find the real object - # - # source://yard//lib/yard/code_objects/proxy.rb#178 - def method_missing(meth, *args, &block); end - - # The name of the object - # - # @param prefix [Boolean] whether to show a prefix. Implement - # this in a subclass to define how the prefix is showed. - # @return [Symbol] if prefix is false, the symbolized name - # @return [String] if prefix is true, prefix + the name as a String. - # This must be implemented by the subclass. - # - # source://yard//lib/yard/code_objects/proxy.rb#85 - def name(prefix = T.unsafe(nil)); end - - # Returns the value of attribute namespace. - # - # source://yard//lib/yard/code_objects/proxy.rb#27 - def namespace; end - - # Returns the value of attribute namespace. - # - # source://yard//lib/yard/code_objects/proxy.rb#27 - def parent; end - - # If the proxy resolves to an object, returns its path, otherwise - # guesses at the correct path using the original namespace and name. - # - # @return [String] the assumed path of the proxy (or the real path - # of the resolved object) - # - # source://yard//lib/yard/code_objects/proxy.rb#100 - def path; end - - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/proxy.rb#171 - def respond_to?(meth, include_private = T.unsafe(nil)); end - - # This class is never a root object - # - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/proxy.rb#200 - def root?; end - - # If the proxy resolves to an object, returns its path, otherwise - # guesses at the correct path using the original namespace and name. - # - # @return [String] the assumed path of the proxy (or the real path - # of the resolved object) - # - # source://yard//lib/yard/code_objects/proxy.rb#100 - def title; end - - # If the proxy resolves to an object, returns its path, otherwise - # guesses at the correct path using the original namespace and name. - # - # @return [String] the assumed path of the proxy (or the real path - # of the resolved object) - # - # source://yard//lib/yard/code_objects/proxy.rb#100 - def to_s; end - - # If the proxy resolves to an object, returns its path, otherwise - # guesses at the correct path using the original namespace and name. - # - # @return [String] the assumed path of the proxy (or the real path - # of the resolved object) - # - # source://yard//lib/yard/code_objects/proxy.rb#100 - def to_str; end - - # Returns the type of the proxy. If it cannot be resolved at the - # time of the call, it will either return the inferred proxy type - # (see {#type=}) or +:proxy+ - # - # @return [Symbol] the Proxy's type - # @see #type= - # - # source://yard//lib/yard/code_objects/proxy.rb#151 - def type; end - - # Allows a parser to infer the type of the proxy by its path. - # - # @param type [#to_sym] the proxy's inferred type - # @return [void] - # - # source://yard//lib/yard/code_objects/proxy.rb#158 - def type=(type); end - - private - - # source://yard//lib/yard/code_objects/proxy.rb#228 - def proxy_path; end - - # @note this method fixes a bug in 1.9.2: http://gist.github.com/437136 - # - # source://yard//lib/yard/code_objects/proxy.rb#205 - def to_ary; end - - # Attempts to find the object that this unresolved object - # references by checking if any objects by this name are - # registered all the way up the namespace tree. - # - # @return [Base, nil] the registered code object or nil - # - # source://yard//lib/yard/code_objects/proxy.rb#212 - def to_obj; end - - class << self - # source://yard//lib/yard/code_objects/proxy.rb#25 - def ===(other); end - end -end - -# A special type of +NoMethodError+ when raised from a {Proxy} -# -# source://yard//lib/yard/code_objects/proxy.rb#5 -class YARD::CodeObjects::ProxyMethodError < ::NoMethodError; end - -# Represents the root namespace object (the invisible Ruby module that -# holds all top level modules, class and other objects). -# -# source://yard//lib/yard/code_objects/root_object.rb#6 -class YARD::CodeObjects::RootObject < ::YARD::CodeObjects::ModuleObject - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/root_object.rb#12 - def equal?(other); end - - # source://yard//lib/yard/code_objects/root_object.rb#16 - def hash; end - - # source://yard//lib/yard/code_objects/root_object.rb#8 - def inspect; end - - # source://yard//lib/yard/code_objects/root_object.rb#7 - def path; end - - # @return [Boolean] - # - # source://yard//lib/yard/code_objects/root_object.rb#9 - def root?; end - - # source://yard//lib/yard/code_objects/root_object.rb#10 - def title; end -end - -# This class maintains all system-wide configuration for YARD and handles -# the loading of plugins. To access options call {options}, and to load -# a plugin use {load_plugin}. All other public methods are used by YARD -# during load time. -# -# == User Configuration Files -# -# Persistent user configuration files can be stored in the file -# +~/.yard/config+, which is read when YARD first loads. The file should -# be formatted as YAML, and should contain a map of keys and values. -# -# Although you can specify any key-value mapping in the configuration file, -# YARD defines special keys specified in {DEFAULT_CONFIG_OPTIONS}. -# -# An example of a configuration file is listed below: -# -# !!!yaml -# load_plugins: true # Auto-load plugins when YARD starts -# ignored_plugins: -# - yard-broken -# - broken2 # yard- prefix not necessary -# autoload_plugins: -# - yard-rspec -# -# == Automatic Loading of Plugins -# -# YARD 0.6.2 will no longer automatically load all plugins by default. This -# option can be reset by setting 'load_plugins' to true in the configuration -# file. In addition, you can specify a set of specific plugins to load on -# load through the 'autoload_plugins' list setting. This setting is -# independent of the 'load_plugins' value and will always be processed. -# -# == Ignored Plugins File -# -# YARD 0.5 and below used a +~/.yard/ignored_plugins+ file to specify -# plugins to be ignored at load time. Ignored plugins in 0.6.2 and above -# should now be specified in the main configuration file, though YARD -# will support the +ignored_plugins+ file until 0.7.x. -# -# == Safe Mode -# -# YARD supports running in safe-mode. By doing this, it will avoid executing -# any user code such as require files or queries. Plugins will still be -# loaded with safe mode on, because plugins are properly namespaced with -# a 'yard-' prefix, must be installed as a gem, and therefore cannot be -# touched by the user. To specify safe mode, use the +safe_mode+ key. -# -# == Plugin Specific Configuration -# -# Additional settings can be defined within the configuration file -# specifically to provide configuration for a plugin. A plugin that utilizes -# the YARD configuration is strongly encouraged to utilize namespacing of -# their configuration content. -# -# !!!yaml -# load_plugins: true # Auto-load plugins when YARD starts -# ignored_plugins: -# - yard-broken -# - broken2 # yard- prefix not necessary -# autoload_plugins: -# - yard-rspec -# # Plugin Specific Configuration -# yard-sample-plugin: -# show-results-inline: true -# -# As the configuration is available system wide, it can be -# accessed within the plugin code. -# -# -# if YARD::Config.options['yard-sample-plugin'] and -# YARD::Config.options['yard-sample-plugin']['show-results-inline'] -# # ... perform the action that places the results inline ... -# else -# # ... do the default behavior of not showing the results inline ... -# end -# -# When accessing the configuration, be aware that this file is user managed -# so configuration keys and values may not be present. Make no assumptions and -# instead ensure that you check for the existence of keys before proceeding to -# retrieve values. -# -# @see options -# @since 0.6.2 -# -# source://yard//lib/yard/config.rb#86 -class YARD::Config - class << self - # Legacy support for {IGNORED_PLUGINS} - # - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#221 - def add_ignored_plugins_file; end - - # @return [Array<String>] arguments from commandline and yardopts file - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#268 - def arguments; end - - # Loads settings from {CONFIG_FILE}. This method is called by YARD at - # load time and should not be called by the user. - # - # @return [void] - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#119 - def load; end - - # Load plugins set in :autoload_plugins - # - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#189 - def load_autoload_plugins; end - - # Load plugins from {arguments} - # - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#194 - def load_commandline_plugins; end - - # Check for command-line safe_mode switch in {arguments} - # - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#204 - def load_commandline_safemode; end - - # Load gem plugins if :load_plugins is true - # - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#169 - def load_gem_plugins; end - - # Loads an individual plugin by name. It is not necessary to include the - # +yard-+ plugin prefix here. - # - # @param name [String] the name of the plugin (with or without +yard-+ prefix) - # @return [Boolean] whether the plugin was successfully loaded - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#157 - def load_plugin(name); end - - # Print a warning if the plugin failed to load - # - # @return [false] - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#214 - def load_plugin_failed(name, exception); end - - # Loads gems that match the name 'yard-*' (recommended) or 'yard_*' except - # those listed in +~/.yard/ignored_plugins+. This is called immediately - # after YARD is loaded to allow plugin support. - # - # @return [Boolean] true if all plugins loaded successfully, false otherwise. - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#146 - def load_plugins; end - - # The system-wide configuration options for YARD - # - # @return [SymbolHash] a map a key-value pair settings. - # @see DEFAULT_CONFIG_OPTIONS - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#91 - def options; end - - # The system-wide configuration options for YARD - # - # @return [SymbolHash] a map a key-value pair settings. - # @see DEFAULT_CONFIG_OPTIONS - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#91 - def options=(_arg0); end - - # Loads the YAML configuration file into memory - # - # @return [Hash] the contents of the YAML file from disk - # @see CONFIG_FILE - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#236 - def read_config_file; end - - # Saves settings to {CONFIG_FILE}. - # - # @return [void] - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#135 - def save; end - - # Sanitizes and normalizes a plugin name to include the 'yard-' prefix. - # - # @param name [String] the plugin name - # @return [String] the sanitized and normalized plugin name. - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#252 - def translate_plugin_name(name); end - - # Translates plugin names to add yard- prefix. - # - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#228 - def translate_plugin_names; end - - # Temporarily loads .yardopts file into @yardopts - # - # @since 0.6.2 - # - # source://yard//lib/yard/config.rb#259 - def with_yardopts; end - end -end - -# The location where YARD stores user-specific settings -# -# @since 0.6.2 -# -# source://yard//lib/yard/config.rb#95 -YARD::Config::CONFIG_DIR = T.let(T.unsafe(nil), String) - -# The main configuration YAML file. -# -# @since 0.6.2 -# -# source://yard//lib/yard/config.rb#98 -YARD::Config::CONFIG_FILE = T.let(T.unsafe(nil), String) - -# Default configuration options -# -# @since 0.6.2 -# -# source://yard//lib/yard/config.rb#105 -YARD::Config::DEFAULT_CONFIG_OPTIONS = T.let(T.unsafe(nil), Hash) - -# File listing all ignored plugins -# -# @deprecated Set `ignored_plugins` in the {CONFIG_FILE} instead. -# @since 0.6.2 -# -# source://yard//lib/yard/config.rb#102 -YARD::Config::IGNORED_PLUGINS = T.let(T.unsafe(nil), String) - -# The prefix used for YARD plugins. Name your gem with this prefix -# to allow it to be used as a plugin. -# -# @since 0.6.2 -# -# source://yard//lib/yard/config.rb#114 -YARD::Config::YARD_PLUGIN_PREFIX = T.let(T.unsafe(nil), Regexp) - -# A documentation string, or "docstring" for short, encapsulates the -# comments and metadata, or "tags", of an object. Meta-data is expressed -# in the form +@tag VALUE+, where VALUE can span over multiple lines as -# long as they are indented. The following +@example+ tag shows how tags -# can be indented: -# -# # @example My example -# # a = "hello world" -# # a.reverse -# # @version 1.0 -# -# Tags can be nested in a documentation string, though the {Tags::Tag} -# itself is responsible for parsing the inner tags. -# -# source://yard//lib/yard/docstring.rb#16 -class YARD::Docstring < ::String - # Creates a new docstring with the raw contents attached to an optional - # object. Parsing will be done by the {DocstringParser} class. - # - # @example - # Docstring.new("hello world\n@return Object return", someobj) - # @note To properly parse directives with proper parser context within - # handlers, you should not use this method to create a Docstring. - # Instead, use the {parser}, which takes a handler object that - # can pass parser state onto directives. If a Docstring is created - # with this method, directives do not have access to any parser - # state, and may not function as expected. - # @param content [String] the raw comments to be parsed into a docstring - # and associated meta-data. - # @param object [CodeObjects::Base] an object to associate the docstring - # with. - # @return [Docstring] a new instance of Docstring - # - # source://yard//lib/yard/docstring.rb#103 - def initialize(content = T.unsafe(nil), object = T.unsafe(nil)); end - - # Adds another {Docstring}, copying over tags. - # - # @param other [Docstring, String] the other docstring (or string) to - # add. - # @return [Docstring] a new docstring with both docstrings combines - # - # source://yard//lib/yard/docstring.rb#116 - def +(other); end - - # Adds a tag or reftag object to the tag list. If you want to parse - # tag data based on the {Tags::DefaultFactory} tag factory, use - # {DocstringParser} instead. - # - # @param tags [Tags::Tag, Tags::RefTag] list of tag objects to add - # @return [void] - # - # source://yard//lib/yard/docstring.rb#242 - def add_tag(*tags); end - - # @return [String] the raw documentation (including raw tag text) - # - # source://yard//lib/yard/docstring.rb#53 - def all; end - - # Replaces the docstring with new raw content. Called by {#all=}. - # - # @param content [String] the raw comments to be parsed - # - # source://yard//lib/yard/docstring.rb#132 - def all=(content, parse = T.unsafe(nil)); end - - # Returns true if the docstring has no content that is visible to a template. - # - # @param only_visible_tags [Boolean] whether only {Tags::Library.visible_tags} - # should be checked, or if all tags should be considered. - # @return [Boolean] whether or not the docstring has content - # - # source://yard//lib/yard/docstring.rb#310 - def blank?(only_visible_tags = T.unsafe(nil)); end - - # Deletes all tags where the block returns true - # - # @return [void] - # @since 0.7.0 - # @yieldparam tag [Tags::Tag] the tag that is being tested - # @yieldreturn [Boolean] true if the tag should be deleted - # - # source://yard//lib/yard/docstring.rb#300 - def delete_tag_if(&block); end - - # Delete all tags with +name+ - # - # @param name [String] the tag name - # @return [void] - # @since 0.7.0 - # - # source://yard//lib/yard/docstring.rb#291 - def delete_tags(name); end - - # Deep-copies a docstring - # - # @note This method creates a new docstring with new tag lists, but does - # not create new individual tags. Modifying the tag objects will still - # affect the original tags. - # @return [Docstring] a new copied docstring - # @since 0.7.0 - # - # source://yard//lib/yard/docstring.rb#153 - def dup; end - - # Returns true if at least one tag by the name +name+ was declared - # - # @param name [String] the tag name to search for - # @return [Boolean] whether or not the tag +name+ was declared - # - # source://yard//lib/yard/docstring.rb#283 - def has_tag?(name); end - - # @return [Boolean] whether the docstring was started with "##" - # - # source://yard//lib/yard/docstring.rb#56 - def hash_flag; end - - # source://yard//lib/yard/docstring.rb#57 - def hash_flag=(v); end - - # @return [Fixnum] the first line of the {#line_range} - # @return [nil] if there is no associated {#line_range} - # - # source://yard//lib/yard/docstring.rb#167 - def line; end - - # @return [Range] line range in the {#object}'s file where the docstring was parsed from - # - # source://yard//lib/yard/docstring.rb#50 - def line_range; end - - # @return [Range] line range in the {#object}'s file where the docstring was parsed from - # - # source://yard//lib/yard/docstring.rb#50 - def line_range=(_arg0); end - - # @return [CodeObjects::Base] the object that owns the docstring. - # - # source://yard//lib/yard/docstring.rb#47 - def object; end - - # @return [CodeObjects::Base] the object that owns the docstring. - # - # source://yard//lib/yard/docstring.rb#47 - def object=(_arg0); end - - # @return [Array<Tags::RefTag>] the list of reference tags - # - # source://yard//lib/yard/docstring.rb#44 - def ref_tags; end - - # Replaces the docstring with new raw content. Called by {#all=}. - # - # @param content [String] the raw comments to be parsed - # - # source://yard//lib/yard/docstring.rb#132 - def replace(content, parse = T.unsafe(nil)); end - - # Resolves unresolved other docstring reference if there is - # unresolved reference. Does nothing if there is no unresolved - # reference. - # - # Normally, you don't need to call this method - # explicitly. Resolving unresolved reference is done implicitly. - # - # @return [void] - # - # source://yard//lib/yard/docstring.rb#328 - def resolve_reference; end - - # Gets the first line of a docstring to the period or the first paragraph. - # - # @return [String] The first line or paragraph of the docstring; always ends with a period. - # - # source://yard//lib/yard/docstring.rb#173 - def summary; end - - # Convenience method to return the first tag - # object in the list of tag objects of that name - # - # @example - # doc = Docstring.new("@return zero when nil") - # doc.tag(:return).text # => "zero when nil" - # @param name [#to_s] the tag name to return data for - # @return [Tags::Tag] the first tag in the list of {#tags} - # - # source://yard//lib/yard/docstring.rb#265 - def tag(name); end - - # Returns a list of tags specified by +name+ or all tags if +name+ is not specified. - # - # @param name [#to_s] the tag name to return data for, or nil for all tags - # @return [Array<Tags::Tag>] the list of tags by the specified tag name - # - # source://yard//lib/yard/docstring.rb#273 - def tags(name = T.unsafe(nil)); end - - # Reformats and returns a raw representation of the tag data using the - # current tag and docstring data, not the original text. - # - # @return [String] the updated raw formatted docstring data - # @since 0.7.0 - # @todo Add Tags::Tag#to_raw and refactor - # - # source://yard//lib/yard/docstring.rb#207 - def to_raw; end - - # source://yard//lib/yard/docstring.rb#125 - def to_s; end - - private - - # Maps valid reference tags - # - # @return [Array<Tags::RefTag>] the list of valid reference tags - # - # source://yard//lib/yard/docstring.rb#344 - def convert_ref_tags; end - - # Parses out comments split by newlines into a new code object - # - # @param comments [String] the newline delimited array of comments. If the comments - # are passed as a String, they will be split by newlines. - # @return [String] the non-metadata portion of the comments to - # be used as a docstring - # - # source://yard//lib/yard/docstring.rb#369 - def parse_comments(comments); end - - # A stable sort_by method. - # - # @param list [Enumerable] the list to sort. - # @return [Array] a stable sorted list. - # - # source://yard//lib/yard/docstring.rb#382 - def stable_sort_by(list); end - - class << self - # @note Plugin developers should make sure to reset this value - # after parsing finishes. This can be done via the - # {Parser::SourceParser.after_parse_list} callback. This will - # ensure that YARD can properly parse multiple projects in - # the same process. - # @return [Class<DocstringParser>] the parser class used to parse - # text and optional meta-data from docstrings. Defaults to - # {DocstringParser}. - # @see DocstringParser - # @see Parser::SourceParser.after_parse_list - # - # source://yard//lib/yard/docstring.rb#28 - def default_parser; end - - # @note Plugin developers should make sure to reset this value - # after parsing finishes. This can be done via the - # {Parser::SourceParser.after_parse_list} callback. This will - # ensure that YARD can properly parse multiple projects in - # the same process. - # @return [Class<DocstringParser>] the parser class used to parse - # text and optional meta-data from docstrings. Defaults to - # {DocstringParser}. - # @see DocstringParser - # @see Parser::SourceParser.after_parse_list - # - # source://yard//lib/yard/docstring.rb#28 - def default_parser=(_arg0); end - - # Creates a new docstring without performing any parsing through - # a {DocstringParser}. This method is called by +DocstringParser+ - # when creating the new docstring object. - # - # @param text [String] the textual portion of the docstring - # @param tags [Array<Tags::Tag>] the list of tag objects in the docstring - # @param object [CodeObjects::Base, nil] the object associated with the - # docstring. May be nil. - # @param raw_data [String] the complete docstring, including all - # original formatting and any unparsed tags/directives. - # @param ref_object [CodeObjects::Base, nil] a reference object used for - # the base set of documentation / tag information. - # - # source://yard//lib/yard/docstring.rb#77 - def new!(text, tags = T.unsafe(nil), object = T.unsafe(nil), raw_data = T.unsafe(nil), ref_object = T.unsafe(nil)); end - - # Creates a parser object using the current {default_parser}. - # Equivalent to: - # Docstring.default_parser.new(*args) - # - # @param args arguments are passed to the {DocstringParser} - # class. See {DocstringParser#initialize} for details on - # arguments. - # @return [DocstringParser] the parser object used to parse a - # docstring. - # - # source://yard//lib/yard/docstring.rb#38 - def parser(*args); end - end -end - -# Matches a tag at the start of a comment line -# -# @deprecated Use {DocstringParser::META_MATCH} -# -# source://yard//lib/yard/docstring.rb#61 -YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) - -# Parses text and creates a {Docstring} object to represent documentation -# for a {CodeObjects::Base}. To create a new docstring, you should initialize -# the parser and call {#parse} followed by {#to_docstring}. -# -# == Subclassing Notes -# -# The DocstringParser can be subclassed and substituted during parsing by -# setting the {Docstring.default_parser} attribute with the name of the -# subclass. This allows developers to change the way docstrings are -# parsed, allowing for completely different docstring syntaxes. -# -# @example Creating a Docstring with a DocstringParser -# DocstringParser.new.parse("text here").to_docstring -# @example Creating a Custom DocstringParser -# # Parses docstrings backwards! -# class ReverseDocstringParser -# def parse_content(content) -# super(content.reverse) -# end -# end -# -# # Set the parser as default when parsing -# YARD::Docstring.default_parser = ReverseDocstringParser -# @see #parse_content -# @since 0.8.0 -# -# source://yard//lib/yard/docstring_parser.rb#29 -class YARD::DocstringParser - # Creates a new parser to parse docstring data - # - # @param library [Tags::Library] a tag library for recognizing - # tags. - # @return [DocstringParser] a new instance of DocstringParser - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#80 - def initialize(library = T.unsafe(nil)); end - - # Creates a new directive using the registered {#library} - # - # @return [Tags::Directive] the directive object that is created - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#231 - def create_directive(tag_name, tag_buf); end - - # Creates a {Tags::RefTag} - # - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#225 - def create_ref_tag(tag_name, name, object_name); end - - # Creates a tag from the {Tags::DefaultFactory tag factory}. - # - # To add an already created tag object, append it to {#tags}. - # - # @param tag_name [String] the tag name - # @param tag_buf [String] the text attached to the tag with newlines removed. - # @return [Tags::Tag, Tags::RefTag] a tag - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#208 - def create_tag(tag_name, tag_buf = T.unsafe(nil)); end - - # @return [Array<Tags::Directive>] a list of directives identified - # by the parser. This list will not be passed on to the - # Docstring object. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#44 - def directives; end - - # @return [Array<Tags::Directive>] a list of directives identified - # by the parser. This list will not be passed on to the - # Docstring object. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#44 - def directives=(_arg0); end - - # @return [Handlers::Base, nil] the handler parsing this - # docstring. May be nil if this docstring parser is not - # initialized through - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#65 - def handler; end - - # @return [Handlers::Base, nil] the handler parsing this - # docstring. May be nil if this docstring parser is not - # initialized through - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#65 - def handler=(_arg0); end - - # @return [Tags::Library] the tag library being used to - # identify registered tags in the docstring. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#69 - def library; end - - # @return [Tags::Library] the tag library being used to - # identify registered tags in the docstring. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#69 - def library=(_arg0); end - - # @return [CodeObjects::Base, nil] the object associated with - # the docstring being parsed. May be nil if the docstring is - # not attached to any object. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#55 - def object; end - - # @return [CodeObjects::Base, nil] the object associated with - # the docstring being parsed. May be nil if the docstring is - # not attached to any object. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#55 - def object=(_arg0); end - - # Parses all content and returns itself. - # - # @param content [String] the docstring text to parse - # @param object [CodeObjects::Base] the object that the docstring - # is attached to. Will be passed to directives to act on - # this object. - # @param handler [Handlers::Base, nil] the handler object that is - # parsing this object. May be nil if this parser is not being - # called from a {Parser::SourceParser} context. - # @return [self] the parser object. To get the docstring, - # call {#to_docstring}. - # @see #to_docstring - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#112 - def parse(content, object = T.unsafe(nil), handler = T.unsafe(nil)); end - - # Parses a given block of text. - # - # @note Subclasses can override this method to perform custom - # parsing of content data. - # @param content [String] the content to parse - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#128 - def parse_content(content); end - - # Call post processing callbacks on parser. - # This is called implicitly by parser. Use this when - # manually configuring a {Docstring} object. - # - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#195 - def post_process; end - - # @return [String] the complete input string to the parser. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#35 - def raw_text; end - - # @return [String] the complete input string to the parser. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#35 - def raw_text=(_arg0); end - - # @return [CodeObjects::Base, nil] the object referenced by - # the docstring being parsed. May be nil if the docstring doesn't - # refer to any object. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#60 - def reference; end - - # @return [CodeObjects::Base, nil] the object referenced by - # the docstring being parsed. May be nil if the docstring doesn't - # refer to any object. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#60 - def reference=(_arg0); end - - # @return [OpenStruct] any arbitrary state to be passed between - # tags during parsing. Mainly used by directives to coordinate - # behaviour (so that directives can be aware of other directives - # used in a docstring). - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#50 - def state; end - - # @return [OpenStruct] any arbitrary state to be passed between - # tags during parsing. Mainly used by directives to coordinate - # behaviour (so that directives can be aware of other directives - # used in a docstring). - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#50 - def state=(_arg0); end - - # Backward compatibility to detect old tags that should be specified - # as directives in 0.8 and onward. - # - # @return [Boolean] - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#251 - def tag_is_directive?(tag_name); end - - # @return [Array<Tags::Tag>] the list of meta-data tags identified - # by the parser - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#39 - def tags; end - - # @return [Array<Tags::Tag>] the list of meta-data tags identified - # by the parser - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#39 - def tags=(_arg0); end - - # @return [String] the parsed text portion of the docstring, - # with tags removed. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#32 - def text; end - - # @return [String] the parsed text portion of the docstring, - # with tags removed. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#32 - def text=(_arg0); end - - # @return [Docstring] translates parsed text into - # a Docstring object. - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#94 - def to_docstring; end - - private - - # Calls all {after_parse} callbacks - # - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#323 - def call_after_parse_callbacks; end - - # Calls the {Tags::Directive#after_parse} callback on all the - # created directives. - # - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#318 - def call_directives_after_parse; end - - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#304 - def detect_reference(content); end - - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#300 - def namespace; end - - class << self - # Creates a callback that is called after a docstring is successfully - # parsed. Use this method to perform sanity checks on a docstring's - # tag data, or add any extra tags automatically to a docstring. - # - # @return [void] - # @since 0.8.0 - # @yield [parser] a block to be called after a docstring is parsed - # @yieldparam parser [DocstringParser] the docstring parser object - # with all directives and tags created. - # @yieldreturn [void] - # - # source://yard//lib/yard/docstring_parser.rb#265 - def after_parse(&block); end - - # @return [Array<Proc>] the {after_parse} callback proc objects - # @since 0.8.0 - # - # source://yard//lib/yard/docstring_parser.rb#270 - def after_parse_callbacks; end - end -end - -# The regular expression to match the tag syntax -# -# @since 0.8.0 -# -# source://yard//lib/yard/docstring_parser.rb#72 -YARD::DocstringParser::META_MATCH = T.let(T.unsafe(nil), Regexp) - -# source://yard//lib/yard/gem_index.rb#6 -module YARD::GemIndex - private - - # source://yard//lib/yard/gem_index.rb#25 - def all; end - - # source://yard//lib/yard/gem_index.rb#17 - def each(&block); end - - # source://yard//lib/yard/gem_index.rb#9 - def find_all_by_name(*args); end - - class << self - # source://yard//lib/yard/gem_index.rb#25 - def all; end - - # source://yard//lib/yard/gem_index.rb#17 - def each(&block); end - - # source://yard//lib/yard/gem_index.rb#9 - def find_all_by_name(*args); end - end -end - -# Handlers are called during the data processing part of YARD's -# parsing phase. This allows YARD as well as any custom extension to -# analyze source and generate {CodeObjects} to be stored for later use. -# -# source://yard//lib/yard/autoload.rb#66 -module YARD::Handlers; end - -# Handlers are pluggable semantic parsers for YARD's code generation -# phase. They allow developers to control what information gets -# generated by YARD, giving them the ability to, for instance, document -# any Ruby DSLs that a customized framework may use. A good example -# of this would be the ability to document and generate meta data for -# the 'describe' declaration of the RSpec testing framework by simply -# adding a handler for such a keyword. Similarly, any Ruby API that -# takes advantage of class level declarations could add these to the -# documentation in a very explicit format by treating them as first- -# class objects in any outputted documentation. -# -# == Overview of a Typical Handler Scenario -# -# Generally, a handler class will declare a set of statements which -# it will handle using the {handles} class declaration. It will then -# implement the {#process} method to do the work. The processing would -# usually involve the manipulation of the {#namespace}, {#owner} -# {CodeObjects::Base code objects} or the creation of new ones, in -# which case they should be registered by {#register}, a method that -# sets some basic attributes for the new objects. -# -# Handlers are usually simple and take up to a page of code to process -# and register a new object or add new attributes to the current +namespace+. -# -# == Setting up a Handler for Use -# -# A Handler is automatically registered when it is subclassed from the -# base class. The only other thing that needs to be done is to specify -# which statement the handler will process. This is done with the +handles+ -# declaration, taking either a {Parser::Ruby::Legacy::RubyToken}, {String} or `Regexp`. -# Here is a simple example which processes module statements. -# -# class MyModuleHandler < YARD::Handlers::Base -# handles TkMODULE -# -# def process -# # do something -# end -# end -# -# == Processing Handler Data -# -# The goal of a specific handler is really up to the developer, and as -# such there is no real guideline on how to process the data. However, -# it is important to know where the data is coming from to be able to use -# it. -# -# === +statement+ Attribute -# -# The +statement+ attribute pertains to the {Parser::Ruby::Legacy::Statement} object -# containing a set of tokens parsed in by the parser. This is the main set -# of data to be analyzed and processed. The comments attached to the statement -# can be accessed by the {Parser::Ruby::Legacy::Statement#comments} method, but generally -# the data to be processed will live in the +tokens+ attribute. This list -# can be converted to a +String+ using +#to_s+ to parse the data with -# regular expressions (or other text processing mechanisms), if needed. -# -# === +namespace+ Attribute -# -# The +namespace+ attribute is a {CodeObjects::NamespaceObject namespace object} -# which represents the current namespace that the parser is in. For instance: -# -# module SomeModule -# class MyClass -# def mymethod; end -# end -# end -# -# If a handler was to parse the 'class MyClass' statement, it would -# be necessary to know that it belonged inside the SomeModule module. -# This is the value that +namespace+ would return when processing such -# a statement. If the class was then entered and another handler was -# called on the method, the +namespace+ would be set to the 'MyClass' -# code object. -# -# === +owner+ Attribute -# -# The +owner+ attribute is similar to the +namespace+ attribute in that -# it also follows the scope of the code during parsing. However, a namespace -# object is loosely defined as a module or class and YARD has the ability -# to parse beyond module and class blocks (inside methods, for instance), -# so the +owner+ attribute would not be limited to modules and classes. -# -# To put this into context, the example from above will be used. If a method -# handler was added to the mix and decided to parse inside the method body, -# the +owner+ would be set to the method object but the namespace would remain -# set to the class. This would allow the developer to process any method -# definitions set inside a method (def x; def y; 2 end end) by adding them -# to the correct namespace (the class, not the method). -# -# In summary, the distinction between +namespace+ and +owner+ can be thought -# of as the difference between first-class Ruby objects (namespaces) and -# second-class Ruby objects (methods). -# -# === +visibility+ and +scope+ Attributes -# -# Mainly needed for parsing methods, the +visibility+ and +scope+ attributes -# refer to the public/protected/private and class/instance values (respectively) -# of the current parsing position. -# -# == Parsing Blocks in Statements -# -# In addition to parsing a statement and creating new objects, some -# handlers may wish to continue parsing the code inside the statement's -# block (if there is one). In this context, a block means the inside -# of any statement, be it class definition, module definition, if -# statement or classic 'Ruby block'. -# -# For example, a class statement would be "class MyClass" and the block -# would be a list of statements including the method definitions inside -# the class. For a class handler, the programmer would execute the -# {#parse_block} method to continue parsing code inside the block, with -# the +namespace+ now pointing to the class object the handler created. -# -# YARD has the ability to continue into any block: class, module, method, -# even if statements. For this reason, the block parsing method must be -# invoked explicitly out of efficiency sake. -# -# @abstract Subclass this class to provide a handler for YARD to use -# during the processing phase. -# @see CodeObjects::Base -# @see CodeObjects::NamespaceObject -# @see handles -# @see #namespace -# @see #owner -# @see #register -# @see #parse_block -# -# source://yard//lib/yard/handlers/base.rb#149 -class YARD::Handlers::Base - include ::YARD::CodeObjects - include ::YARD::Parser - - # @return [Base] a new instance of Base - # - # source://yard//lib/yard/handlers/base.rb#276 - def initialize(source_parser, stmt); end - - # Aborts a handler by raising {Handlers::HandlerAborted}. - # An exception will only be logged in debugging mode for - # this kind of handler exit. - # - # @raise [Handlers::HandlerAborted] - # @since 0.8.4 - # - # source://yard//lib/yard/handlers/base.rb#355 - def abort!; end - - # @abstract Implement this method to return the parameters in a method call - # statement. It should return an empty list if the statement is not a - # method call. - # @raise [NotImplementedError] - # @return [Array<String>] a list of argument names - # - # source://yard//lib/yard/handlers/base.rb#581 - def call_params; end - - # @abstract Implement this method to return the method being called in - # a method call. It should return nil if the statement is not a method - # call. - # @raise [NotImplementedError] - # @return [String] the method name being called - # @return [nil] if the statement is not a method call - # - # source://yard//lib/yard/handlers/base.rb#590 - def caller_method; end - - # Ensures that a specific +object+ has been parsed and loaded into the - # registry. This is necessary when adding data to a namespace, for instance, - # since the namespace may not have been processed yet (it can be located - # in a file that has not been handled). - # - # Calling this method defers the handler until all other files have been - # processed. If the object gets resolved, the rest of the handler continues, - # otherwise an exception is raised. - # - # @example Adding a mixin to the String class programmatically - # ensure_loaded! P('String') - # # "String" is now guaranteed to be loaded - # P('String').mixins << P('MyMixin') - # @param object [Proxy, CodeObjects::Base] the object to resolve. - # @param max_retries [Integer] the number of times to defer the handler - # before raising a +NamespaceMissingError+. - # @raise [NamespaceMissingError] if the object is not resolved within - # +max_retries+ attempts, this exception is raised and the handler - # finishes processing. - # - # source://yard//lib/yard/handlers/base.rb#561 - def ensure_loaded!(object, max_retries = T.unsafe(nil)); end - - # Returns the value of attribute extra_state. - # - # source://yard//lib/yard/handlers/base.rb#348 - def extra_state; end - - # Returns the value of attribute globals. - # - # source://yard//lib/yard/handlers/base.rb#347 - def globals; end - - # Returns the value of attribute namespace. - # - # source://yard//lib/yard/handlers/base.rb#341 - def namespace; end - - # Sets the attribute namespace - # - # @param value the value to set the attribute namespace to. - # - # source://yard//lib/yard/handlers/base.rb#342 - def namespace=(v); end - - # Returns the value of attribute owner. - # - # source://yard//lib/yard/handlers/base.rb#339 - def owner; end - - # Sets the attribute owner - # - # @param value the value to set the attribute owner to. - # - # source://yard//lib/yard/handlers/base.rb#340 - def owner=(v); end - - # Parses the semantic "block" contained in the statement node. - # - # @abstract Subclasses should call {Processor#process parser.process} - # @raise [NotImplementedError] - # - # source://yard//lib/yard/handlers/base.rb#304 - def parse_block(*_arg0); end - - # @return [Processor] the processor object that manages all global state - # during handling. - # - # source://yard//lib/yard/handlers/base.rb#310 - def parser; end - - # The main handler method called by the parser on a statement - # that matches the {handles} declaration. - # - # Subclasses should override this method to provide the handling - # functionality for the class. - # - # @raise [NotImplementedError] - # @return [Array<CodeObjects::Base>, CodeObjects::Base, Object] If this method returns a code object (or a list of them), - # they are passed to the +#register+ method which adds basic - # attributes. It is not necessary to return any objects and in - # some cases you may want to explicitly avoid the returning of - # any objects for post-processing by the register method. - # @see handles - # @see #register - # - # source://yard//lib/yard/handlers/base.rb#297 - def process; end - - # Executes a given block with specific state values for {#owner}, - # {#namespace} and {#scope}. - # - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @yield a block to execute with the given state values. - # - # source://yard//lib/yard/handlers/base.rb#370 - def push_state(opts = T.unsafe(nil)); end - - # Do some post processing on a list of code objects. - # Adds basic attributes to the list of objects like - # the filename, line number, {CodeObjects::Base#dynamic}, - # source code and {CodeObjects::Base#docstring}, - # but only if they don't exist. - # - # @param objects [Array<CodeObjects::Base>] the list of objects to post-process. - # @return [CodeObjects::Base, Array<CodeObjects::Base>] returns whatever is passed in, for chainability. - # - # source://yard//lib/yard/handlers/base.rb#407 - def register(*objects); end - - # Registers any docstring found for the object and expands macros - # - # @param object [CodeObjects::Base] the object to register - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/base.rb#450 - def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end - - # Registers the object as dynamic if the object is defined inside - # a method or block (owner != namespace) - # - # @param object [CodeObjects::Base] the object to register - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/base.rb#537 - def register_dynamic(object); end - - # Ensures that the object's namespace is loaded before attaching it - # to the namespace. - # - # @param object [CodeObjects::Base] the object to register - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/base.rb#429 - def register_ensure_loaded(object); end - - # Registers the file/line of the declaration with the object - # - # @param object [CodeObjects::Base] the object to register - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/base.rb#441 - def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end - - # Registers the object as being inside a specific group - # - # @param object [CodeObjects::Base] the object to register - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/base.rb#473 - def register_group(object, group = T.unsafe(nil)); end - - # Registers the same method information on the module function, if - # the object was defined as a module function. - # - # @param object [CodeObjects::Base] the possible module function object - # to copy data for - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/base.rb#523 - def register_module_function(object); end - - # @param object [CodeObjects::Base] the object to register - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/base.rb#499 - def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end - - # Registers any transitive tags from the namespace on the object - # - # @param object [CodeObjects::Base, nil] the object to register - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/base.rb#487 - def register_transitive_tags(object); end - - # Registers visibility on a method object. If the object does not - # respond to setting visibility, nothing is done. - # - # @param object [#visibility=] the object to register - # @param visibility [Symbol] the visibility to set on the object - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/base.rb#511 - def register_visibility(object, visibility = T.unsafe(nil)); end - - # Returns the value of attribute scope. - # - # source://yard//lib/yard/handlers/base.rb#345 - def scope; end - - # Sets the attribute scope - # - # @param value the value to set the attribute scope to. - # - # source://yard//lib/yard/handlers/base.rb#346 - def scope=(v); end - - # @return [Object] the statement object currently being processed. Usually - # refers to one semantic language statement, though the strict definition - # depends on the parser used. - # - # source://yard//lib/yard/handlers/base.rb#315 - def statement; end - - # Returns the value of attribute visibility. - # - # source://yard//lib/yard/handlers/base.rb#343 - def visibility; end - - # Sets the attribute visibility - # - # @param value the value to set the attribute visibility to. - # - # source://yard//lib/yard/handlers/base.rb#344 - def visibility=(v); end - - class << self - # Clear all registered subclasses. Testing purposes only - # - # @return [void] - # - # source://yard//lib/yard/handlers/base.rb#159 - def clear_subclasses; end - - # @return [Array] a list of matchers for the handler object. - # @see handles? - # - # source://yard//lib/yard/handlers/base.rb#211 - def handlers; end - - # Declares the statement type which will be processed - # by this handler. - # - # A match need not be unique to a handler. Multiple - # handlers can process the same statement. However, - # in this case, care should be taken to make sure that - # {#parse_block} would only be executed by one of - # the handlers, otherwise the same code will be parsed - # multiple times and slow YARD down. - # - # @param matches [Parser::Ruby::Legacy::RubyToken, Symbol, String, Regexp] statements that match the declaration will be - # processed by this handler. A {String} match is - # equivalent to a +/\Astring/+ regular expression - # (match from the beginning of the line), and all - # token matches match only the first token of the - # statement. - # - # source://yard//lib/yard/handlers/base.rb#192 - def handles(*matches); end - - # This class is implemented by {Ruby::Base} and {Ruby::Legacy::Base}. - # To implement a base handler class for another language, implement - # this method to return true if the handler should process the given - # statement object. Use {handlers} to enumerate the matchers declared - # for the handler class. - # - # @param statement a statement object or node (depends on language type) - # @raise [NotImplementedError] - # @return [Boolean] whether or not this handler object should process - # the given statement - # - # source://yard//lib/yard/handlers/base.rb#205 - def handles?(statement); end - - # Declares that a handler should only be called when inside a filename - # by its basename or a regex match for the full path. - # - # @param filename [String, Regexp] a matching filename or regex - # @return [void] - # @since 0.6.2 - # - # source://yard//lib/yard/handlers/base.rb#235 - def in_file(filename); end - - # @private - # - # source://yard//lib/yard/handlers/base.rb#169 - def inherited(subclass); end - - # @return [Boolean] whether the filename matches the declared file - # match for a handler. If no file match is specified, returns true. - # @since 0.6.2 - # - # source://yard//lib/yard/handlers/base.rb#242 - def matches_file?(filename); end - - # Declares that the handler should only be called when inside a - # {CodeObjects::NamespaceObject}, not a method body. - # - # @return [void] - # - # source://yard//lib/yard/handlers/base.rb#219 - def namespace_only; end - - # @return [Boolean] whether the handler should only be processed inside - # a namespace. - # - # source://yard//lib/yard/handlers/base.rb#225 - def namespace_only?; end - - # Generates a +process+ method, equivalent to +def process; ... end+. - # Blocks defined with this syntax will be wrapped inside an anonymous - # module so that the handler class can be extended with mixins that - # override the +process+ method without alias chaining. - # - # @return [void] - # @see #process - # @since 0.5.4 - # - # source://yard//lib/yard/handlers/base.rb#269 - def process(&block); end - - # Returns all registered handler subclasses. - # - # @return [Array<Base>] a list of handlers - # - # source://yard//lib/yard/handlers/base.rb#165 - def subclasses; end - end -end - -# CRuby Handlers -# -# @since 0.8.0 -# -# source://yard//lib/yard/autoload.rb#74 -module YARD::Handlers::C; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/alias_handler.rb#2 -class YARD::Handlers::C::AliasHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/alias_handler.rb#3 -YARD::Handlers::C::AliasHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/attribute_handler.rb#2 -class YARD::Handlers::C::AttributeHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/attribute_handler.rb#3 -YARD::Handlers::C::AttributeHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/base.rb#5 -class YARD::Handlers::C::Base < ::YARD::Handlers::Base - include ::YARD::Parser::C - include ::YARD::Handlers::Common::MethodHandler - include ::YARD::Handlers::C::HandlerMethods - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#77 - def ensure_variable_defined!(var, max_retries = T.unsafe(nil)); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#64 - def namespace_for_variable(var); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#94 - def namespaces; end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#60 - def override_comments; end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#104 - def parse_block(opts = T.unsafe(nil)); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#113 - def process_file(file, object); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#98 - def processed_files; end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#38 - def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#42 - def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#46 - def register_source(object, source = T.unsafe(nil), type = T.unsafe(nil)); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#50 - def register_visibility(object, visibility = T.unsafe(nil)); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#56 - def symbols; end - - private - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#158 - def remove_var_prefix(var); end - - class << self - # @return [Boolean] whether the handler handles this statement - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#10 - def handles?(statement, processor); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/base.rb#28 - def statement_class(type = T.unsafe(nil)); end - end -end - -# Generated by update_error_map.rb (Copy+past results) -# -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/base.rb#131 -YARD::Handlers::C::Base::ERROR_CLASS_NAMES = T.let(T.unsafe(nil), Hash) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/class_handler.rb#2 -class YARD::Handlers::C::ClassHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/class_handler.rb#3 -YARD::Handlers::C::ClassHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/class_handler.rb#9 -YARD::Handlers::C::ClassHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/constant_handler.rb#2 -class YARD::Handlers::C::ConstantHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/constant_handler.rb#3 -YARD::Handlers::C::ConstantHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/handler_methods.rb#5 -module YARD::Handlers::C::HandlerMethods - include ::YARD::Parser::C - include ::YARD::CodeObjects - include ::YARD::Handlers::Common::MethodHandler - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/handler_methods.rb#86 - def handle_alias(var_name, new_name, old_name); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/handler_methods.rb#75 - def handle_attribute(var_name, name, read, write); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/handler_methods.rb#10 - def handle_class(var_name, class_name, parent, in_module = T.unsafe(nil)); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/handler_methods.rb#109 - def handle_constants(type, var_name, const_name, value); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/handler_methods.rb#46 - def handle_method(scope, var_name, name, func_name, _source_file = T.unsafe(nil)); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/handler_methods.rb#33 - def handle_module(var_name, module_name, in_module = T.unsafe(nil)); end - - private - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/handler_methods.rb#123 - def find_constant_docstring(object); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/handler_methods.rb#154 - def find_method_body(object, symbol); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/handler_methods.rb#196 - def record_parameters(object, symbol, src); end -end - -# Handles the Init_Libname() method -# -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/init_handler.rb#3 -class YARD::Handlers::C::InitHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/init_handler.rb#4 -YARD::Handlers::C::InitHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/method_handler.rb#2 -class YARD::Handlers::C::MethodHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/method_handler.rb#3 -YARD::Handlers::C::MethodHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/method_handler.rb#14 -YARD::Handlers::C::MethodHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/method_handler.rb#18 -YARD::Handlers::C::MethodHandler::MATCH3 = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/mixin_handler.rb#2 -class YARD::Handlers::C::MixinHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/mixin_handler.rb#3 -YARD::Handlers::C::MixinHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/module_handler.rb#2 -class YARD::Handlers::C::ModuleHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/module_handler.rb#3 -YARD::Handlers::C::ModuleHandler::MATCH1 = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/module_handler.rb#4 -YARD::Handlers::C::ModuleHandler::MATCH2 = T.let(T.unsafe(nil), Regexp) - -# Parses comments -# -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/override_comment_handler.rb#3 -class YARD::Handlers::C::OverrideCommentHandler < ::YARD::Handlers::C::Base - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/override_comment_handler.rb#24 - def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end - - # @since 0.8.0 - # - # source://yard//lib/yard/handlers/c/override_comment_handler.rb#28 - def register_file_info(object, file = T.unsafe(nil), line = T.unsafe(nil), comments = T.unsafe(nil)); end -end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/path_handler.rb#2 -class YARD::Handlers::C::PathHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/path_handler.rb#3 -YARD::Handlers::C::PathHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/struct_handler.rb#2 -class YARD::Handlers::C::StructHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/struct_handler.rb#3 -YARD::Handlers::C::StructHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -# Keeps track of function bodies for symbol lookup during Ruby method declarations -# -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/symbol_handler.rb#3 -class YARD::Handlers::C::SymbolHandler < ::YARD::Handlers::C::Base; end - -# @since 0.8.0 -# -# source://yard//lib/yard/handlers/c/symbol_handler.rb#4 -YARD::Handlers::C::SymbolHandler::MATCH = T.let(T.unsafe(nil), Regexp) - -# Shared logic between C and Ruby handlers. -# -# source://yard//lib/yard/autoload.rb#68 -module YARD::Handlers::Common; end - -# Shared functionality between Ruby and C method handlers. -# -# source://yard//lib/yard/handlers/common/method_handler.rb#6 -module YARD::Handlers::Common::MethodHandler - # @param obj [MethodObject] - # - # source://yard//lib/yard/handlers/common/method_handler.rb#8 - def add_predicate_return_tag(obj); end -end - -# Raise this error when a handler should exit before completing. -# The exception will be silenced, allowing the next handler(s) in the -# queue to be executed. -# -# @since 0.8.4 -# -# source://yard//lib/yard/handlers/base.rb#8 -class YARD::Handlers::HandlerAborted < ::RuntimeError; end - -# Raised during processing phase when a handler needs to perform -# an operation on an object's namespace but the namespace could -# not be resolved. -# -# source://yard//lib/yard/handlers/base.rb#13 -class YARD::Handlers::NamespaceMissingError < ::YARD::Parser::UndocumentableError - # @return [NamespaceMissingError] a new instance of NamespaceMissingError - # - # source://yard//lib/yard/handlers/base.rb#18 - def initialize(object); end - - # The object the error occurred on - # - # @return [CodeObjects::Base] a code object - # - # source://yard//lib/yard/handlers/base.rb#16 - def object; end - - # The object the error occurred on - # - # @return [CodeObjects::Base] a code object - # - # source://yard//lib/yard/handlers/base.rb#16 - def object=(_arg0); end -end - -# Iterates over all statements in a file and delegates them to the -# {Handlers::Base} objects that are registered to handle the statement. -# -# This class is passed to each handler and keeps overall processing state. -# For example, if the {#visibility} is set in a handler, all following -# statements will have access to this state. This allows "public", -# "protected" and "private" statements to be handled in classes and modules. -# In addition, the {#namespace} can be set during parsing to control -# where objects are being created from. You can also access extra stateful -# properties that any handler can set during the duration of the post -# processing of a file from {#extra_state}. If you need to access state -# across different files, look at {#globals}. -# -# @see Handlers::Base -# -# source://yard//lib/yard/handlers/processor.rb#19 -class YARD::Handlers::Processor - # Creates a new Processor for a +file+. - # - # @param parser [Parser::SourceParser] the parser used to initialize the processor - # @return [Processor] a new instance of Processor - # - # source://yard//lib/yard/handlers/processor.rb#91 - def initialize(parser); end - - # Share state across different handlers inside of a file. - # This attribute is similar to {#visibility}, {#scope}, {#namespace} - # and {#owner}, in that they all maintain state across all handlers - # for the entire source file. Use this attribute to store any data - # your handler might need to save during the parsing of a file. If - # you need to save state across files, see {#globals}. - # - # @return [OpenStruct] an open structure that can store arbitrary data - # @see #globals - # - # source://yard//lib/yard/handlers/processor.rb#87 - def extra_state; end - - # Share state across different handlers inside of a file. - # This attribute is similar to {#visibility}, {#scope}, {#namespace} - # and {#owner}, in that they all maintain state across all handlers - # for the entire source file. Use this attribute to store any data - # your handler might need to save during the parsing of a file. If - # you need to save state across files, see {#globals}. - # - # @return [OpenStruct] an open structure that can store arbitrary data - # @see #globals - # - # source://yard//lib/yard/handlers/processor.rb#87 - def extra_state=(_arg0); end - - # @return [String] the filename - # - # source://yard//lib/yard/handlers/processor.rb#40 - def file; end - - # @return [String] the filename - # - # source://yard//lib/yard/handlers/processor.rb#40 - def file=(_arg0); end - - # Searches for all handlers in {Base.subclasses} that match the +statement+ - # - # @param statement the statement object to match. - # @return [Array<Base>] a list of handlers to process the statement with. - # - # source://yard//lib/yard/handlers/processor.rb#150 - def find_handlers(statement); end - - # Handlers can share state for the entire post processing stage through - # this attribute. Note that post processing stage spans multiple files. - # To share state only within a single file, use {#extra_state} - # - # @example Sharing state among two handlers - # class Handler1 < YARD::Handlers::Ruby::Base - # handles :class - # process { globals.foo = :bar } - # end - # - # class Handler2 < YARD::Handlers::Ruby::Base - # handles :method - # process { puts globals.foo } - # end - # @return [OpenStruct] global shared state for post-processing stage - # @see #extra_state - # - # source://yard//lib/yard/handlers/processor.rb#76 - def globals; end - - # Handlers can share state for the entire post processing stage through - # this attribute. Note that post processing stage spans multiple files. - # To share state only within a single file, use {#extra_state} - # - # @example Sharing state among two handlers - # class Handler1 < YARD::Handlers::Ruby::Base - # handles :class - # process { globals.foo = :bar } - # end - # - # class Handler2 < YARD::Handlers::Ruby::Base - # handles :method - # process { puts globals.foo } - # end - # @return [OpenStruct] global shared state for post-processing stage - # @see #extra_state - # - # source://yard//lib/yard/handlers/processor.rb#76 - def globals=(_arg0); end - - # @return [CodeObjects::NamespaceObject] the current namespace - # - # source://yard//lib/yard/handlers/processor.rb#43 - def namespace; end - - # @return [CodeObjects::NamespaceObject] the current namespace - # - # source://yard//lib/yard/handlers/processor.rb#43 - def namespace=(_arg0); end - - # @return [CodeObjects::Base, nil] unlike the namespace, the owner - # is a non-namespace object that should be stored between statements. - # For instance, when parsing a method body, the {CodeObjects::MethodObject} - # is set as the owner, in case any extra method information is processed. - # - # source://yard//lib/yard/handlers/processor.rb#55 - def owner; end - - # @return [CodeObjects::Base, nil] unlike the namespace, the owner - # is a non-namespace object that should be stored between statements. - # For instance, when parsing a method body, the {CodeObjects::MethodObject} - # is set as the owner, in case any extra method information is processed. - # - # source://yard//lib/yard/handlers/processor.rb#55 - def owner=(_arg0); end - - # Continue parsing the remainder of the files in the +globals.ordered_parser+ - # object. After the remainder of files are parsed, processing will continue - # on the current file. - # - # @return [void] - # @see Parser::OrderedParser - # - # source://yard//lib/yard/handlers/processor.rb#139 - def parse_remaining_files; end - - # @return [Symbol] the parser type (:ruby, :ruby18, :c) - # - # source://yard//lib/yard/handlers/processor.rb#58 - def parser_type; end - - # @return [Symbol] the parser type (:ruby, :ruby18, :c) - # - # source://yard//lib/yard/handlers/processor.rb#58 - def parser_type=(_arg0); end - - # Processes a list of statements by finding handlers to process each - # one. - # - # @param statements [Array] a list of statements - # @return [void] - # - # source://yard//lib/yard/handlers/processor.rb#109 - def process(statements); end - - # @return [Symbol] the current scope (class, instance) - # - # source://yard//lib/yard/handlers/processor.rb#49 - def scope; end - - # @return [Symbol] the current scope (class, instance) - # - # source://yard//lib/yard/handlers/processor.rb#49 - def scope=(_arg0); end - - # @return [Symbol] the current visibility (public, private, protected) - # - # source://yard//lib/yard/handlers/processor.rb#46 - def visibility; end - - # @return [Symbol] the current visibility (public, private, protected) - # - # source://yard//lib/yard/handlers/processor.rb#46 - def visibility=(_arg0); end - - private - - # Returns the handler base class - # - # @return [Base] the base class - # - # source://yard//lib/yard/handlers/processor.rb#171 - def handler_base_class; end - - # The module holding the handlers to be loaded - # - # @return [Module] the module containing the handlers depending on - # {#parser_type}. - # - # source://yard//lib/yard/handlers/processor.rb#179 - def handler_base_namespace; end - - # @return [Boolean] - # - # source://yard//lib/yard/handlers/processor.rb#160 - def handles?(handler, statement); end - - # Loads handlers from {#handler_base_namespace}. This ensures that - # Ruby1.9 handlers are never loaded into 1.8; also lowers the amount - # of modules that are loaded - # - # @return [void] - # - # source://yard//lib/yard/handlers/processor.rb#187 - def load_handlers; end - - class << self - # @private - # @return [Hash] a list of registered parser type extensions - # @since 0.6.0 - # - # source://yard//lib/yard/handlers/processor.rb#32 - def namespace_for_handler; end - - # Registers a new namespace for handlers of the given type. - # - # @since 0.6.0 - # - # source://yard//lib/yard/handlers/processor.rb#23 - def register_handler_namespace(type, ns); end - end -end - -# All Ruby handlers -# -# source://yard//lib/yard/autoload.rb#92 -module YARD::Handlers::Ruby; end - -# Handles alias and alias_method calls -# -# source://yard//lib/yard/handlers/ruby/alias_handler.rb#3 -class YARD::Handlers::Ruby::AliasHandler < ::YARD::Handlers::Ruby::Base; end - -# Handles +attr_*+ statements in modules/classes -# -# source://yard//lib/yard/handlers/ruby/attribute_handler.rb#3 -class YARD::Handlers::Ruby::AttributeHandler < ::YARD::Handlers::Ruby::Base - protected - - # Strips out any non-essential arguments from the attr statement. - # - # @param params [Array<Parser::Ruby::AstNode>] a list of the parameters - # in the attr call. - # @raise [Parser::UndocumentableError] if the arguments are not valid. - # @return [Array<String>] the validated attribute names - # - # source://yard//lib/yard/handlers/ruby/attribute_handler.rb#75 - def validated_attribute_names(params); end -end - -# This is the base handler class for the new-style (1.9) Ruby parser. -# All handlers that subclass this base class will be used when the -# new-style parser is used. For implementing legacy handlers, see -# {Legacy::Base}. -# -# @abstract See {Handlers::Base} for subclassing information. -# @see Handlers::Base -# @see Legacy::Base -# -# source://yard//lib/yard/handlers/ruby/base.rb#65 -class YARD::Handlers::Ruby::Base < ::YARD::Handlers::Base - include ::YARD::Parser::Ruby - extend ::YARD::Parser::Ruby - - # source://yard//lib/yard/handlers/ruby/base.rb#144 - def call_params; end - - # source://yard//lib/yard/handlers/ruby/base.rb#155 - def caller_method; end - - # source://yard//lib/yard/handlers/ruby/base.rb#135 - def parse_block(inner_node, opts = T.unsafe(nil)); end - - class << self - # @return [Boolean] whether or not an {AstNode} object should be - # handled by this handler - # - # source://yard//lib/yard/handlers/ruby/base.rb#113 - def handles?(node); end - - # Matcher for handling a node with a specific meta-type. An {AstNode} - # has a {AstNode#type} to define its type but can also be associated - # with a set of types. For instance, +:if+ and +:unless+ are both - # of the meta-type +:condition+. - # - # A meta-type is any method on the {AstNode} class ending in "?", - # though you should not include the "?" suffix in your declaration. - # Some examples are: "condition", "call", "literal", "kw", "token", - # "ref". - # - # @example Handling any conditional statement (if, unless) - # handles meta_type(:condition) - # @param type [Symbol] the meta-type to match. A meta-type can be - # any method name + "?" that {AstNode} responds to. - # @return [void] - # - # source://yard//lib/yard/handlers/ruby/base.rb#105 - def meta_type(type); end - - # Matcher for handling any type of method call. Method calls can - # be expressed by many {AstNode} types depending on the syntax - # with which it is called, so YARD allows you to use this matcher - # to simplify matching a method call. - # - # @example Match the "describe" method call - # handles method_call(:describe) - # - # # The following will be matched: - # # describe(...) - # # object.describe(...) - # # describe "argument" do ... end - # @param name [#to_s] matches the method call of this name - # @return [void] - # - # source://yard//lib/yard/handlers/ruby/base.rb#86 - def method_call(name = T.unsafe(nil)); end - end -end - -# Matches if/unless conditions inside classes and attempts to process only -# one branch (by evaluating the condition if possible). -# -# @example A simple class conditional -# class Foo -# if 0 -# # This method is ignored -# def xyz; end -# end -# end -# -# source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#12 -class YARD::Handlers::Ruby::ClassConditionHandler < ::YARD::Handlers::Ruby::Base - protected - - # Parses the condition part of the if/unless statement - # - # @return [true, false, nil] true if the condition can be definitely - # parsed to true, false if not, and nil if the condition cannot be - # parsed with certainty (it's dynamic) - # - # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#36 - def parse_condition; end - - # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#87 - def parse_else_block; end - - # source://yard//lib/yard/handlers/ruby/class_condition_handler.rb#83 - def parse_then_block; end -end - -# Handles class declarations -# -# source://yard//lib/yard/handlers/ruby/class_handler.rb#3 -class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::StructHandlerMethods - - private - - # source://yard//lib/yard/handlers/ruby/class_handler.rb#73 - def create_struct_superclass(superclass, superclass_def); end - - # Extract the parameters from the Struct.new AST node, returning them as a list - # of strings - # - # @param superclass [MethodCallNode] the AST node for the Struct.new call - # @return [Array<String>] the member names to generate methods for - # - # source://yard//lib/yard/handlers/ruby/class_handler.rb#67 - def extract_parameters(superclass); end - - # source://yard//lib/yard/handlers/ruby/class_handler.rb#92 - def parse_struct_superclass(klass, superclass); end - - # source://yard//lib/yard/handlers/ruby/class_handler.rb#98 - def parse_superclass(superclass); end - - # source://yard//lib/yard/handlers/ruby/class_handler.rb#82 - def struct_superclass_name(superclass); end -end - -# Handles a class variable (@@variable) -# -# source://yard//lib/yard/handlers/ruby/class_variable_handler.rb#3 -class YARD::Handlers::Ruby::ClassVariableHandler < ::YARD::Handlers::Ruby::Base; end - -# Handles any lone comment statement in a Ruby file -# -# source://yard//lib/yard/handlers/ruby/comment_handler.rb#3 -class YARD::Handlers::Ruby::CommentHandler < ::YARD::Handlers::Ruby::Base; end - -# Handles any constant assignment -# -# source://yard//lib/yard/handlers/ruby/constant_handler.rb#3 -class YARD::Handlers::Ruby::ConstantHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::StructHandlerMethods - - private - - # Extract the parameters from the Struct.new AST node, returning them as a list - # of strings - # - # @param superclass [MethodCallNode] the AST node for the Struct.new call - # @return [Array<String>] the member names to generate methods for - # - # source://yard//lib/yard/handlers/ruby/constant_handler.rb#49 - def extract_parameters(superclass); end - - # source://yard//lib/yard/handlers/ruby/constant_handler.rb#21 - def process_constant(statement); end - - # source://yard//lib/yard/handlers/ruby/constant_handler.rb#33 - def process_structclass(statement); end -end - -# Handles automatic detection of dsl-style methods -# -# source://yard//lib/yard/handlers/ruby/dsl_handler.rb#6 -class YARD::Handlers::Ruby::DSLHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DSLHandlerMethods -end - -# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#5 -module YARD::Handlers::Ruby::DSLHandlerMethods - include ::YARD::CodeObjects - include ::YARD::Parser - - # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#14 - def handle_comments; end - - # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#48 - def register_docstring(object, docstring = T.unsafe(nil), stmt = T.unsafe(nil)); end - - private - - # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#72 - def find_attached_macro; end - - # @return [Boolean] - # - # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#54 - def implicit_docstring?; end - - # @return [Boolean] whether caller method matches a macro or - # its alias names. - # - # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#85 - def macro_name_matches(macro); end - - # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#59 - def method_name; end - - # source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#68 - def method_signature; end -end - -# source://yard//lib/yard/handlers/ruby/dsl_handler_methods.rb#9 -YARD::Handlers::Ruby::DSLHandlerMethods::IGNORE_METHODS = T.let(T.unsafe(nil), Hash) - -# Helper methods to assist with processing decorators. -# -# source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#3 -module YARD::Handlers::Ruby::DecoratorHandlerMethods - # @overload process_decorator - # - # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#43 - def process_decorator(*nodes, &block); end - - private - - # @yield [method, node, name.to_sym] - # - # source://yard//lib/yard/handlers/ruby/decorator_handler_methods.rb#78 - def process_decorator_parameter(node, opts = T.unsafe(nil), &block); end -end - -# Handles 'raise' calls inside methods -# -# source://yard//lib/yard/handlers/ruby/exception_handler.rb#3 -class YARD::Handlers::Ruby::ExceptionHandler < ::YARD::Handlers::Ruby::Base; end - -# Handles 'extend' call to include modules into the class scope of another -# -# @see MixinHandler -# -# source://yard//lib/yard/handlers/ruby/extend_handler.rb#4 -class YARD::Handlers::Ruby::ExtendHandler < ::YARD::Handlers::Ruby::MixinHandler - # source://yard//lib/yard/handlers/ruby/extend_handler.rb#8 - def scope; end - - private - - # source://yard//lib/yard/handlers/ruby/extend_handler.rb#12 - def process_mixin(mixin); end -end - -# To implement a custom handler matcher, subclass this class and implement -# {#matches?} to return whether a node matches the handler. -# -# @example A Custom Handler Matcher Extension -# # Implements a handler that checks for a specific string -# # in the node's source. -# class MyExtension < HandlesExtension -# def matches?(node) node.source.include?(name) end -# end -# -# # This handler will handle any node where the source includes 'foo' -# class MyHandler < Handlers::Ruby::Base -# handles MyExtension.new('foo') -# end -# -# source://yard//lib/yard/handlers/ruby/base.rb#19 -class YARD::Handlers::Ruby::HandlesExtension - # Creates a new extension with a specific matcher value +name+ - # - # @param name [Object] the matcher value to check against {#matches?} - # @return [HandlesExtension] a new instance of HandlesExtension - # - # source://yard//lib/yard/handlers/ruby/base.rb#22 - def initialize(name); end - - # Tests if the node matches the handler - # - # @param node [Parser::Ruby::AstNode] a Ruby node - # @raise [NotImplementedError] - # @return [Boolean] whether the +node+ matches the handler - # - # source://yard//lib/yard/handlers/ruby/base.rb#27 - def matches?(node); end - - protected - - # @return [String] the extension matcher value - # - # source://yard//lib/yard/handlers/ruby/base.rb#34 - def name; end -end - -# Handlers for old Ruby 1.8 parser -# -# source://yard//lib/yard/autoload.rb#93 -module YARD::Handlers::Ruby::Legacy; end - -# Handles alias and alias_method calls -# -# source://yard//lib/yard/handlers/ruby/legacy/alias_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::AliasHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# Handles +attr_*+ statements in modules/classes -# -# source://yard//lib/yard/handlers/ruby/legacy/attribute_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::AttributeHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# This is the base handler for the legacy parser. To implement a legacy -# handler, subclass this class. -# -# @abstract See {Handlers::Base} for subclassing information. -# -# source://yard//lib/yard/handlers/ruby/legacy/base.rb#9 -class YARD::Handlers::Ruby::Legacy::Base < ::YARD::Handlers::Base - include ::YARD::Parser::Ruby::Legacy::RubyToken - - # source://yard//lib/yard/handlers/ruby/legacy/base.rb#44 - def call_params; end - - # source://yard//lib/yard/handlers/ruby/legacy/base.rb#53 - def caller_method; end - - # Parses a statement's block with a set of state values. If the - # statement has no block, nothing happens. A description of state - # values can be found at {Handlers::Base#push_state} - # - # @option opts - # @option opts - # @option opts - # @param opts [Hash] State options - # @see Handlers::Base#push_state #push_state - # - # source://yard//lib/yard/handlers/ruby/legacy/base.rb#35 - def parse_block(opts = T.unsafe(nil)); end - - private - - # Extracts method information for macro expansion only - # - # @return [Array<String,Array<Array<String>>>] the method name followed by method - # arguments (name and optional value) - # @todo This is a duplicate implementation of {MethodHandler}. Refactor. - # - # source://yard//lib/yard/handlers/ruby/legacy/base.rb#68 - def extract_method_details; end - - # The string value of a token. For example, the return value for the symbol :sym - # would be :sym. The return value for a string +"foo #{ bar}"+ would be the literal - # +"foo #{ bar}"+ without any interpolation. The return value of the identifier - # 'test' would be the same value: 'test'. Here is a list of common types and - # their return values: - # - # @example - # tokval(TokenList.new('"foo"').first) => "foo" - # tokval(TokenList.new(':foo').first) => :foo - # tokval(TokenList.new('CONSTANT').first, RubyToken::TkId) => "CONSTANT" - # tokval(TokenList.new('identifier').first, RubyToken::TkId) => "identifier" - # tokval(TokenList.new('3.25').first) => 3.25 - # tokval(TokenList.new('/xyz/i').first) => /xyz/i - # @param token [Token] The token of the class - # @param accepted_types [Array<Class<Token>>, Symbol] The allowed token types that this token can be. Defaults to [{TkVal}]. - # A list of types would be, for example, [+TkSTRING+, +TkSYMBOL+], to return - # the token's value if it is either of those types. If +TkVal+ is accepted, - # +TkNode+ is also accepted. - # - # Certain symbol keys are allowed to specify multiple types in one fell swoop. - # These symbols are: - # :string => +TkSTRING+, +TkDSTRING+, +TkDXSTRING+ and +TkXSTRING+ - # :attr => +TkSYMBOL+ and +TkSTRING+ - # :identifier => +TkIDENTIFIER, +TkFID+ and +TkGVAR+. - # :number => +TkFLOAT+, +TkINTEGER+ - # @return [Object] if the token is one of the accepted types, in its real value form. - # It should be noted that identifiers and constants are kept in String form. - # @return [nil] if the token is not any of the specified accepted types - # - # source://yard//lib/yard/handlers/ruby/legacy/base.rb#112 - def tokval(token, *accepted_types); end - - # Returns a list of symbols or string values from a statement. - # The list must be a valid comma delimited list, and values - # will only be returned to the end of the list only. - # - # Example: - # attr_accessor :a, 'b', :c, :d => ['a', 'b', 'c', 'd'] - # attr_accessor 'a', UNACCEPTED_TYPE, 'c' => ['a', 'c'] - # - # The tokval list of a {Parser::Ruby::Legacy::TokenList} of the above - # code would be the {#tokval} value of :a, 'b', - # :c and :d. - # - # It should also be noted that this function stops immediately at - # any ruby keyword encountered: - # "attr_accessor :a, :b, :c if x == 5" => ['a', 'b', 'c'] - # - # @param tokenlist [TokenList] The list of tokens to process. - # @param accepted_types [Array<Class<Token>>] passed to {#tokval} - # @return [Array<String>] the list of tokvalues in the list. - # @return [Array<EMPTY>] if there are no symbols or Strings in the list - # @see #tokval - # - # source://yard//lib/yard/handlers/ruby/legacy/base.rb#178 - def tokval_list(tokenlist, *accepted_types); end - - class << self - # @return [Boolean] whether or not a {Parser::Ruby::Legacy::Statement} object should be handled - # by this handler. - # - # source://yard//lib/yard/handlers/ruby/legacy/base.rb#15 - def handles?(stmt); end - end -end - -# Matches if/unless conditions inside classes and attempts to process only -# one branch (by evaluating the condition if possible). -# -# @example A simple class conditional -# class Foo -# if 0 -# # This method is ignored -# def xyz; end -# end -# end -# @since 0.5.4 -# -# source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#4 -class YARD::Handlers::Ruby::Legacy::ClassConditionHandler < ::YARD::Handlers::Ruby::Legacy::Base - protected - - # Parses the condition part of the if/unless statement - # - # @return [true, false, nil] true if the condition can be definitely - # parsed to true, false if not, and nil if the condition cannot be - # parsed with certainty (it's dynamic) - # @since 0.5.5 - # - # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#29 - def parse_condition; end - - # @since 0.5.5 - # - # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#73 - def parse_else_block; end - - # @since 0.5.5 - # - # source://yard//lib/yard/handlers/ruby/legacy/class_condition_handler.rb#68 - def parse_then_block; end -end - -# Handles class declarations -# -# source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::ClassHandler < ::YARD::Handlers::Ruby::Legacy::Base - include ::YARD::Handlers::Ruby::StructHandlerMethods - - private - - # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#74 - def create_struct_superclass(superclass, superclass_def); end - - # Extracts the parameter list from the Struct.new declaration and returns it - # formatted as a list of member names. Expects the user will have used symbols - # to define the struct member names - # - # @param superstring [String] the string declaring the superclass - # @return [Array<String>] a list of member names - # - # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#69 - def extract_parameters(superstring); end - - # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#95 - def parse_struct_subclass(klass, superclass_def); end - - # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#102 - def parse_superclass(superclass); end - - # source://yard//lib/yard/handlers/ruby/legacy/class_handler.rb#83 - def struct_superclass_name(superclass); end -end - -# Handles a class variable (@@variable) -# -# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::ClassVariableHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# source://yard//lib/yard/handlers/ruby/legacy/class_variable_handler.rb#4 -YARD::Handlers::Ruby::Legacy::ClassVariableHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) - -# Handles any lone comment statement in a Ruby file -# -# source://yard//lib/yard/handlers/ruby/legacy/comment_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::CommentHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# Handles any constant assignment -# -# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::ConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base - include ::YARD::Handlers::Ruby::StructHandlerMethods - - private - - # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#25 - def extract_parameters(parameters); end - - # source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#20 - def process_structclass(classname, parameters); end -end - -# source://yard//lib/yard/handlers/ruby/legacy/constant_handler.rb#5 -YARD::Handlers::Ruby::Legacy::ConstantHandler::HANDLER_MATCH = T.let(T.unsafe(nil), Regexp) - -# Handles automatic detection of dsl-style methods -# -# source://yard//lib/yard/handlers/ruby/legacy/dsl_handler.rb#7 -class YARD::Handlers::Ruby::Legacy::DSLHandler < ::YARD::Handlers::Ruby::Legacy::Base - include ::YARD::Handlers::Ruby::DSLHandlerMethods -end - -# Handles 'raise' calls inside methods -# -# source://yard//lib/yard/handlers/ruby/legacy/exception_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::ExceptionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# Handles 'extend' call to include modules into the class scope of another -# -# @see MixinHandler -# -# source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::ExtendHandler < ::YARD::Handlers::Ruby::Legacy::MixinHandler - # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#7 - def scope; end - - private - - # source://yard//lib/yard/handlers/ruby/legacy/extend_handler.rb#11 - def process_mixin(mixin); end -end - -# Handles a method definition -# -# source://yard//lib/yard/handlers/ruby/legacy/method_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::MethodHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# Handles the 'include' statement to mixin a module in the instance scope -# -# source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::MixinHandler < ::YARD::Handlers::Ruby::Legacy::Base - private - - # @raise [YARD::Parser::UndocumentableError] - # - # source://yard//lib/yard/handlers/ruby/legacy/mixin_handler.rb#26 - def process_mixin(mixin); end -end - -# Handles module_function calls to turn methods into public class methods. -# Also creates a private instance copy of the method. -# -# source://yard//lib/yard/handlers/ruby/legacy/module_function_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# Handles the declaration of a module -# -# source://yard//lib/yard/handlers/ruby/legacy/module_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::ModuleHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# Sets visibility of a class method to private. -# -# source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Legacy::Base - private - - # source://yard//lib/yard/handlers/ruby/legacy/private_class_method_handler.rb#15 - def privatize_class_method(name); end -end - -# Sets visibility of a constant (class, module, const) -# -# source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::PrivateConstantHandler < ::YARD::Handlers::Ruby::Legacy::Base - private - - # source://yard//lib/yard/handlers/ruby/legacy/private_constant_handler.rb#15 - def privatize_constant(name); end -end - -# Handles 'private', 'protected', and 'public' calls. -# -# source://yard//lib/yard/handlers/ruby/legacy/visibility_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::VisibilityHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# Handles 'yield' calls -# -# source://yard//lib/yard/handlers/ruby/legacy/yield_handler.rb#3 -class YARD::Handlers::Ruby::Legacy::YieldHandler < ::YARD::Handlers::Ruby::Legacy::Base; end - -# source://yard//lib/yard/handlers/ruby/base.rb#37 -class YARD::Handlers::Ruby::MethodCallWrapper < ::YARD::Handlers::Ruby::HandlesExtension - # @return [Boolean] - # - # source://yard//lib/yard/handlers/ruby/base.rb#38 - def matches?(node); end -end - -# Handles a conditional inside a method -# -# source://yard//lib/yard/handlers/ruby/method_condition_handler.rb#3 -class YARD::Handlers::Ruby::MethodConditionHandler < ::YARD::Handlers::Ruby::Base; end - -# Handles a method definition -# -# source://yard//lib/yard/handlers/ruby/method_handler.rb#3 -class YARD::Handlers::Ruby::MethodHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Common::MethodHandler - - # source://yard//lib/yard/handlers/ruby/method_handler.rb#69 - def format_args; end -end - -# Handles the 'include' statement to mixin a module in the instance scope -# -# source://yard//lib/yard/handlers/ruby/mixin_handler.rb#3 -class YARD::Handlers::Ruby::MixinHandler < ::YARD::Handlers::Ruby::Base - protected - - # @raise [YARD::Parser::UndocumentableError] - # - # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#25 - def process_mixin(mixin); end - - # source://yard//lib/yard/handlers/ruby/mixin_handler.rb#50 - def recipient(mixin); end -end - -# Handles module_function calls to turn methods into public class methods. -# Also creates a private instance copy of the method. -# -# source://yard//lib/yard/handlers/ruby/module_function_handler.rb#4 -class YARD::Handlers::Ruby::ModuleFunctionHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DecoratorHandlerMethods - - # source://yard//lib/yard/handlers/ruby/module_function_handler.rb#34 - def make_module_function(instance_method, namespace); end -end - -# Handles the declaration of a module -# -# source://yard//lib/yard/handlers/ruby/module_handler.rb#3 -class YARD::Handlers::Ruby::ModuleHandler < ::YARD::Handlers::Ruby::Base; end - -# Sets visibility of a class method to private. -# -# source://yard//lib/yard/handlers/ruby/private_class_method_handler.rb#3 -class YARD::Handlers::Ruby::PrivateClassMethodHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DecoratorHandlerMethods -end - -# Sets visibility of a constant (class, module, const) -# -# source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#6 -class YARD::Handlers::Ruby::PrivateConstantHandler < ::YARD::Handlers::Ruby::Base - private - - # source://yard//lib/yard/handlers/ruby/private_constant_handler.rb#28 - def privatize_constant(node); end -end - -# Sets visibility of a class method to public. -# -# source://yard//lib/yard/handlers/ruby/public_class_method_handler.rb#3 -class YARD::Handlers::Ruby::PublicClassMethodHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DecoratorHandlerMethods -end - -# Helper methods to parse @attr_* tags on a class. -# -# @deprecated The use of +@attr+ tags are deprecated since 0.8.0 in favour of -# the +@!attribute+ directive. This module should not be relied on. -# @since 0.5.6 -# -# source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#7 -module YARD::Handlers::Ruby::StructHandlerMethods - include ::YARD::CodeObjects - - # Creates the auto-generated docstring for the getter method of a struct's - # member. This is used so the generated documentation will look just like that - # of an attribute defined using attr_accessor. - # - # @param klass [ClassObject] the class whose members we're working with - # @param member [String] the name of the member we're generating documentation for - # @return [String] a docstring to be attached to the getter method for this member - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#62 - def add_reader_tags(klass, new_method, member); end - - # Creates the auto-generated docstring for the setter method of a struct's - # member. This is used so the generated documentation will look just like that - # of an attribute defined using attr_accessor. - # - # @param klass [ClassObject] the class whose members we're working with - # @param member [String] the name of the member we're generating documentation for - # @return [String] a docstring to be attached to the setter method for this member - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#77 - def add_writer_tags(klass, new_method, member); end - - # Creates the given member methods and attaches them to the given ClassObject. - # - # @param klass [ClassObject] the class to generate attributes for - # @param members [Array<String>] a list of member names - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#134 - def create_attributes(klass, members); end - - # Creates and registers a class object with the given name and superclass name. - # Returns it for further use. - # - # @param classname [String] the name of the class - # @param superclass [String] the name of the superclass - # @return [ClassObject] the class object for further processing/method attaching - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#92 - def create_class(classname, superclass); end - - # Determines whether to create an attribute method based on the class's - # tags. - # - # @param klass [ClassObject] the class whose tags we're searching - # @param member [String] the name of the struct member we need - # @param type [Symbol] (:read) reader method, or writer method? - # @return [Boolean] should the attribute be created? - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#38 - def create_member_method?(klass, member, type = T.unsafe(nil)); end - - # Creates the getter (reader) method and attaches it to the class as an attribute. - # Also sets up the docstring to prettify the documentation output. - # - # @param klass [ClassObject] the class to attach the method to - # @param member [String] the name of the member we're generating a method for - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#121 - def create_reader(klass, member); end - - # Creates the setter (writer) method and attaches it to the class as an attribute. - # Also sets up the docstring to prettify the documentation output. - # - # @param klass [ClassObject] the class to attach the method to - # @param member [String] the name of the member we're generating a method for - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#104 - def create_writer(klass, member); end - - # Extracts the user's defined @member tag for a given class and its member. Returns - # nil if the user did not define a @member tag for this struct entry. - # - # @param klass [ClassObject] the class whose tags we're searching - # @param member [String] the name of the struct member we need - # @param type [Symbol] reader method, or writer method? - # @return [Tags::Tag, nil] the tag matching the request, or nil if not found - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#17 - def member_tag_for_member(klass, member, type = T.unsafe(nil)); end - - # Retrieves all members defined in @attr* tags - # - # @param klass [ClassObject] the class with the attributes - # @return [Array<String>] the list of members defined as attributes on the class - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#26 - def members_from_tags(klass); end - - # Gets the return type for the member in a nicely formatted string. Used - # to be injected into auto-generated docstrings. - # - # @param member_tag [Tags::Tag] the tag object to check for types - # @return [String] the user-declared type of the struct member, or [Object] if - # the user did not define a type for this member. - # @since 0.5.6 - # - # source://yard//lib/yard/handlers/ruby/struct_handler_methods.rb#51 - def return_type_from_tag(member_tag); end -end - -# source://yard//lib/yard/handlers/ruby/base.rb#53 -class YARD::Handlers::Ruby::TestNodeWrapper < ::YARD::Handlers::Ruby::HandlesExtension - # @return [Boolean] - # - # source://yard//lib/yard/handlers/ruby/base.rb#54 - def matches?(node); end -end - -# Handles 'private', 'protected', and 'public' calls. -# -# source://yard//lib/yard/handlers/ruby/visibility_handler.rb#3 -class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base - include ::YARD::Handlers::Ruby::DecoratorHandlerMethods - - # @return [Boolean] - # - # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#31 - def is_attribute_method?(node); end -end - -# Handles 'yield' calls -# -# source://yard//lib/yard/handlers/ruby/yield_handler.rb#3 -class YARD::Handlers::Ruby::YieldHandler < ::YARD::Handlers::Ruby::Base; end - -# Namespace for internationalization (i18n) -# -# @since 0.8.0 -# -# source://yard//lib/yard/autoload.rb#151 -module YARD::I18n; end - -# +Locale+ is a unit of translation. It has {#name} and a set of -# messages. -# -# @since 0.8.2 -# -# source://yard//lib/yard/i18n/locale.rb#8 -class YARD::I18n::Locale - # Creates a locale for +name+ locale. - # - # @param name [String] the locale name. - # @return [Locale] a new instance of Locale - # @since 0.8.2 - # - # source://yard//lib/yard/i18n/locale.rb#34 - def initialize(name); end - - # Loads translation messages from +locale_directory+/{#name}.po. - # - # @param locale_directory [String] the directory path that has - # {#name}.po. - # @return [Boolean] +true+ if PO file exists, +false+ otherwise. - # @since 0.8.2 - # - # source://yard//lib/yard/i18n/locale.rb#44 - def load(locale_directory); end - - # @return [String] the name of the locale. It used IETF language - # tag format +[language[_territory][.codeset][@modifier]]+. - # @see http://tools.ietf.org/rfc/bcp/bcp47.txt BCP 47 - Tags for Identifying Languages - # @since 0.8.2 - # - # source://yard//lib/yard/i18n/locale.rb#29 - def name; end - - # @param message [String] the translation target message. - # @return [String] translated message. If translation isn't - # registered, the +message+ is returned. - # @since 0.8.2 - # - # source://yard//lib/yard/i18n/locale.rb#62 - def translate(message); end - - class << self - # @return [String, nil] the default locale name. - # @since 0.8.4 - # - # source://yard//lib/yard/i18n/locale.rb#15 - def default; end - - # @return [String, nil] the default locale name. - # @since 0.8.4 - # - # source://yard//lib/yard/i18n/locale.rb#20 - def default=(locale); end - end -end - -# +Message+ is a translation target message. It has message ID as -# {#id} and some properties {#locations} and {#comments}. -# -# @since 0.8.1 -# -# source://yard//lib/yard/i18n/message.rb#10 -class YARD::I18n::Message - # Creates a translate target message for message ID +id+. - # - # @param id [String] the message ID of the translate target message. - # @return [Message] a new instance of Message - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/message.rb#24 - def initialize(id); end - - # @param other [Message] the +Message+ to be compared. - # @return [Boolean] checks whether this message is equal to another. - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/message.rb#49 - def ==(other); end - - # Adds a comment for the message. - # - # @param comment [String] the comment for the message to be added. - # @return [void] - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/message.rb#43 - def add_comment(comment); end - - # Adds location information for the message. - # - # @param path [String] the path where the message appears. - # @param line [Integer] the line number where the message appears. - # @return [void] - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/message.rb#35 - def add_location(path, line); end - - # @return [Set] the set of comments for the messages. - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/message.rb#19 - def comments; end - - # @return [String] the message ID of the translation target message. - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/message.rb#12 - def id; end - - # path and line number where the message is appeared. - # - # @return [Set] the set of locations. Location is an array of - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/message.rb#16 - def locations; end -end - -# Acts as a container for {Message} objects. -# -# @since 0.8.1 -# -# source://yard//lib/yard/i18n/messages.rb#7 -class YARD::I18n::Messages - include ::Enumerable - - # Creates a new container. - # - # @return [Messages] a new instance of Messages - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/messages.rb#11 - def initialize; end - - # Checks if this messages list is equal to another messages list. - # - # @param other [Messages] the container to compare. - # @return [Boolean] whether +self+ and +other+ is equivalence or not. - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/messages.rb#45 - def ==(other); end - - # @param id [String] the message ID to perform a lookup on. - # @return [Message, nil] a registered message for the given +id+, - # or nil if no message for the ID is found. - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/messages.rb#27 - def [](id); end - - # Enumerates each {Message} in the container. - # - # @return [void] - # @since 0.8.1 - # @yieldparam message [Message] the next message object in - # the enumeration. - # - # source://yard//lib/yard/i18n/messages.rb#20 - def each(&block); end - - # Registers a {Message}, the message ID of which is +id+. If - # corresponding +Message+ is already registered, the previously - # registered object is returned. - # - # @param id [String] the ID of the message to be registered. - # @return [Message] the registered +Message+. - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/messages.rb#37 - def register(id); end - - protected - - # @return [Hash{String=>Message}] the set of message objects - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/messages.rb#53 - def messages; end -end - -# The +PotGenerator+ generates POT format string from -# {CodeObjects::Base} and {CodeObjects::ExtraFileObject}. -# -# == POT and PO -# -# POT is an acronym for "Portable Object Template". POT is a -# template file to create PO file. The extension for POT is -# ".pot". PO file is an acronym for "Portable Object". PO file has -# many parts of message ID (msgid) that is translation target -# message and message string (msgstr) that is translated message -# of message ID. If you want to translate "Hello" in English into -# "Bonjour" in French, "Hello" is the msgid ID and "Bonjour" is -# msgstr. The extension for PO is ".po". -# -# == How to extract msgids -# -# The +PotGenerator+ has two parse methods: -# -# * {#parse_objects} for {CodeObjects::Base} -# * {#parse_files} for {CodeObjects::ExtraFileObject} -# -# {#parse_objects} extracts msgids from docstring and tags of -# {CodeObjects::Base} objects. The docstring of -# {CodeObjects::Base} object is parsed and a paragraph is -# extracted as a msgid. Tag name and tag text are extracted as -# msgids from a tag. -# -# {#parse_files} extracts msgids from -# {CodeObjects::ExtraFileObject} objects. The file content of -# {CodeObjects::ExtraFileObject} object is parsed and a paragraph -# is extracted as a msgid. -# -# == Usage -# -# To create a .pot file by +PotGenerator+, instantiate a -# +PotGenerator+ with a relative working directory path from a -# directory path that has created .pot file, parse -# {CodeObjects::Base} objects and {CodeObjects::ExtraFileObject} -# objects, generate a POT and write the generated POT to a .pot -# file. The relative working directory path is ".." when the -# working directory path is "." and the POT is wrote into -# "po/yard.pot". -# -# @example Generate a .pot file -# po_file_path = "po/yard.pot" -# po_file_directory_pathname = Pathname.new(po_file_path).directory) -# working_directory_pathname = Pathname.new(".") -# relative_base_path = working_directory_pathname.relative_path_from(po_file_directory_pathname).to_s -# # relative_base_path -> ".." -# generator = YARD::I18n::PotGenerator.new(relative_base_path) -# generator.parse_objects(objects) -# generator.parse_files(files) -# pot = generator.generate -# po_file_directory_pathname.mkpath -# File.open(po_file_path, "w") do |pot_file| -# pot_file.print(pot) -# end -# @see http://www.gnu.org/software/gettext/manual/html_node/PO-Files.html GNU gettext manual about details of PO file -# @since 0.8.0 -# -# source://yard//lib/yard/i18n/pot_generator.rb#65 -class YARD::I18n::PotGenerator - # Creates a POT generator that uses +relative_base_path+ to - # generate locations for a msgid. +relative_base_path+ is - # prepended to all locations. - # - # @param relative_base_path [String] a relative working - # directory path from a directory path that has created .pot - # file. - # @return [PotGenerator] a new instance of PotGenerator - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#79 - def initialize(relative_base_path); end - - # Generates POT from +@messages+. - # - # One PO file entry is generated from a +Message+ in - # +@messages+. - # - # Locations of the +Message+ are used to generate the reference - # line that is started with "#: ". +relative_base_path+ passed - # when the generator is created is prepended to each path in location. - # - # Comments of the +Message+ are used to generate the - # translator-comment line that is started with "# ". - # - # @return [String] POT format string - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#122 - def generate; end - - # Extracted messages. - # - # @return [Messages] - # @since 0.8.1 - # - # source://yard//lib/yard/i18n/pot_generator.rb#70 - def messages; end - - # Parses {CodeObjects::ExtraFileObject} objects and stores - # extracted msgids into {#messages}. - # - # @param files [Array<CodeObjects::ExtraFileObject>] a list - # of {CodeObjects::ExtraFileObject} objects to be parsed. - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#103 - def parse_files(files); end - - # Parses {CodeObjects::Base} objects and stores extracted msgids - # into {#messages} - # - # @param objects [Array<CodeObjects::Base>] a list of - # {CodeObjects::Base} to be parsed. - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#91 - def parse_objects(objects); end - - private - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#160 - def current_time; end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#183 - def escape_message_id(message_id); end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#194 - def extract_documents(object); end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#268 - def extract_paragraphs(file); end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#235 - def extract_tag_documents(tag); end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#242 - def extract_tag_name(tag); end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#255 - def extract_tag_text(tag); end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#168 - def generate_message(pot, message); end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#164 - def generate_pot_creation_date_value; end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#136 - def header; end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/pot_generator.rb#190 - def register_message(id); end -end - -# Provides some convenient features for translating a text. -# -# @since 0.8.0 -# -# source://yard//lib/yard/i18n/text.rb#5 -class YARD::I18n::Text - # Creates a text object that has translation related features for - # the input text. - # - # @option options - # @param input [#each_line] a text to be translated. - # @param options [Hash] a customizable set of options - # @return [Text] a new instance of Text - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/text.rb#12 - def initialize(input, options = T.unsafe(nil)); end - - # Extracts translation target messages from +@input+. - # - # @return [void] - # @since 0.8.0 - # @yield [:attribute, name, value, line_no] the block that - # receives extracted an attribute in header. It may called many - # times. - # @yield [:paragraph, text, start_line_no] the block that - # receives extracted a paragraph in body. Paragraph is a text - # block separated by one or more empty lines. Empty line is a - # line that contains only zero or more whitespaces. It may - # called many times. - # @yieldparam text [String] the text of extracted paragraph. - # @yieldparam start_line_no [Integer] the start line number of - # extracted paragraph. - # @yieldparam name [String] the name of extracted attribute. - # @yieldparam value [String] the value of extracted attribute. - # @yieldparam line_no [Integer] the defined line number of extracted - # attribute. - # - # source://yard//lib/yard/i18n/text.rb#35 - def extract_messages; end - - # Translates into +locale+. - # - # @param locale [Locale] the translation target locale. - # @return [String] translated text. - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/text.rb#52 - def translate(locale); end - - private - - # @since 0.8.0 - # @yield [part] - # - # source://yard//lib/yard/i18n/text.rb#134 - def emit_attribute_event(match_data, line_no); end - - # @since 0.8.0 - # @yield [part] - # - # source://yard//lib/yard/i18n/text.rb#147 - def emit_empty_line_event(line, line_no); end - - # @since 0.8.0 - # @yield [part] - # - # source://yard//lib/yard/i18n/text.rb#125 - def emit_markup_event(line, line_no); end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/text.rb#156 - def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end - - # @since 0.8.0 - # - # source://yard//lib/yard/i18n/text.rb#76 - def parse(&block); end -end - -# Handles console logging for info, warnings and errors. -# Uses the stdlib Logger class in Ruby for all the backend logic. -# -# source://yard//lib/yard/logging.rb#8 -class YARD::Logger - include ::YARD::Logger::Severity - - # Creates a new logger - # - # @private - # @return [Logger] a new instance of Logger - # - # source://yard//lib/yard/logging.rb#82 - def initialize(pipe, *args); end - - # Displays an unformatted line to the logger output stream. - # - # @param msg [String] the message to display - # @return [void] - # @since 0.8.2 - # - # source://yard//lib/yard/logging.rb#205 - def <<(msg = T.unsafe(nil)); end - - # Prints the backtrace +exc+ to the logger as error data. - # - # @param exc [Array<String>] the backtrace list - # @param level_meth [Symbol] the level to log backtrace at - # @return [void] - # - # source://yard//lib/yard/logging.rb#216 - def backtrace(exc, level_meth = T.unsafe(nil)); end - - # Captures the duration of a block of code for benchmark analysis. Also - # calls {#progress} on the message to display it to the user. - # - # @param msg [String] the message to display - # @param nontty_log [Symbol, nil] the level to log as if the output - # stream is not a TTY. Use +nil+ for no alternate logging. - # @return [void] - # @todo Implement capture storage for reporting of benchmarks - # @yield a block of arbitrary code to benchmark - # - # source://yard//lib/yard/logging.rb#234 - def capture(msg, nontty_log = T.unsafe(nil)); end - - # Clears the progress indicator in the TTY display. - # - # @return [void] - # @since 0.8.2 - # - # source://yard//lib/yard/logging.rb#186 - def clear_progress; end - - # Changes the debug level to DEBUG if $DEBUG is set and writes a debugging message. - # Logs a message with the debug severity level. - # - # @param message [String] the message to log - # @return [void] - # @see #log - # - # source://yard//lib/yard/logging.rb#103 - def debug(message); end - - # Sets the logger level for the duration of the block - # - # @example - # log.enter_level(Logger::ERROR) do - # YARD.parse_string "def x; end" - # end - # @param new_level [Fixnum] the logger level for the duration of the block. - # values can be found in Ruby's Logger class. - # @yield the block with the logger temporarily set to +new_level+ - # - # source://yard//lib/yard/logging.rb#142 - def enter_level(new_level = T.unsafe(nil)); end - - # Logs a message with the error severity level. - # - # @param message [String] the message to log - # @return [void] - # @see #log - # - # source://yard//lib/yard/logging.rb#103 - def error(message); end - - # Logs a message with the fatal severity level. - # - # @param message [String] the message to log - # @return [void] - # @see #log - # - # source://yard//lib/yard/logging.rb#103 - def fatal(message); end - - # Logs a message with the info severity level. - # - # @param message [String] the message to log - # @return [void] - # @see #log - # - # source://yard//lib/yard/logging.rb#103 - def info(message); end - - # @return [IO] the IO object being logged to - # @since 0.8.2 - # - # source://yard//lib/yard/logging.rb#49 - def io; end - - # @return [IO] the IO object being logged to - # @since 0.8.2 - # - # source://yard//lib/yard/logging.rb#49 - def io=(_arg0); end - - # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level - # - # source://yard//lib/yard/logging.rb#57 - def level; end - - # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level - # - # source://yard//lib/yard/logging.rb#57 - def level=(_arg0); end - - # Logs a message with a given severity - # - # @param severity [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the severity level - # @param message [String] the message to log - # - # source://yard//lib/yard/logging.rb#122 - def log(severity, message); end - - # Displays an unformatted line to the logger output stream. - # - # @param msg [String] the message to display - # @return [void] - # @since 0.8.2 - # - # source://yard//lib/yard/logging.rb#205 - def print(msg = T.unsafe(nil)); end - - # Displays a progress indicator for a given message. This progress report - # is only displayed on TTY displays, otherwise the message is passed to - # the +nontty_log+ level. - # - # @param msg [String] the message to log - # @param nontty_log [Symbol, nil] the level to log as if the output - # stream is not a TTY. Use +nil+ for no alternate logging. - # @return [void] - # @since 0.8.2 - # - # source://yard//lib/yard/logging.rb#161 - def progress(msg, nontty_log = T.unsafe(nil)); end - - # Displays an unformatted line to the logger output stream, adding - # a newline. - # - # @param msg [String] the message to display - # @return [void] - # @since 0.8.2 - # - # source://yard//lib/yard/logging.rb#197 - def puts(msg = T.unsafe(nil)); end - - # @return [Boolean] whether backtraces should be shown (by default - # this is on). - # - # source://yard//lib/yard/logging.rb#53 - def show_backtraces; end - - # Sets the attribute show_backtraces - # - # @param value the value to set the attribute show_backtraces to. - # - # source://yard//lib/yard/logging.rb#54 - def show_backtraces=(_arg0); end - - # @return [Boolean] whether progress indicators should be shown when - # logging CLIs (by default this is off). - # - # source://yard//lib/yard/logging.rb#64 - def show_progress; end - - # Sets the attribute show_progress - # - # @param value the value to set the attribute show_progress to. - # - # source://yard//lib/yard/logging.rb#70 - def show_progress=(_arg0); end - - # Logs a message with the unknown severity level. - # - # @param message [String] the message to log - # @return [void] - # @see #log - # - # source://yard//lib/yard/logging.rb#103 - def unknown(message); end - - # Remembers when a warning occurs and writes a warning message. - # Logs a message with the warn severity level. - # - # @param message [String] the message to log - # @return [void] - # @see #log - # - # source://yard//lib/yard/logging.rb#103 - def warn(message); end - - # Warns that the Ruby environment does not support continuations. Applies - # to JRuby, Rubinius and MacRuby. This warning will only display once - # per Ruby process. - # - # @deprecated Continuations are no longer needed by YARD 0.8.0+. - # @private - # @return [void] - # - # source://yard//lib/yard/logging.rb#250 - def warn_no_continuations; end - - # @return [Boolean] whether a warn message has been emitted. Used for status tracking. - # - # source://yard//lib/yard/logging.rb#60 - def warned; end - - # @return [Boolean] whether a warn message has been emitted. Used for status tracking. - # - # source://yard//lib/yard/logging.rb#60 - def warned=(_arg0); end - - private - - # source://yard//lib/yard/logging.rb#255 - def clear_line; end - - class << self - # @private - # - # source://yard//lib/yard/logging.rb#101 - def create_log_method(name); end - - # The logger instance - # - # @return [Logger] the logger instance - # - # source://yard//lib/yard/logging.rb#76 - def instance(pipe = T.unsafe(nil)); end - end -end - -# The list of characters displayed beside the progress bar to indicate -# "movement". -# -# @since 0.8.2 -# -# source://yard//lib/yard/logging.rb#45 -YARD::Logger::PROGRESS_INDICATORS = T.let(T.unsafe(nil), Array) - -# Log severity levels -# -# source://yard//lib/yard/logging.rb#10 -module YARD::Logger::Severity; end - -# Debugging log level -# -# source://yard//lib/yard/logging.rb#12 -YARD::Logger::Severity::DEBUG = T.let(T.unsafe(nil), Integer) - -# Error log level -# -# source://yard//lib/yard/logging.rb#21 -YARD::Logger::Severity::ERROR = T.let(T.unsafe(nil), Integer) - -# Fatal log level -# -# source://yard//lib/yard/logging.rb#24 -YARD::Logger::Severity::FATAL = T.let(T.unsafe(nil), Integer) - -# Information log level -# -# source://yard//lib/yard/logging.rb#15 -YARD::Logger::Severity::INFO = T.let(T.unsafe(nil), Integer) - -# @private -# -# source://yard//lib/yard/logging.rb#30 -YARD::Logger::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) - -# Unknown log level -# -# source://yard//lib/yard/logging.rb#27 -YARD::Logger::Severity::UNKNOWN = T.let(T.unsafe(nil), Integer) - -# Warning log level -# -# source://yard//lib/yard/logging.rb#18 -YARD::Logger::Severity::WARN = T.let(T.unsafe(nil), Integer) - -# An OpenStruct compatible struct class that allows for basic access of attributes -# via +struct.attr_name+ and +struct.attr_name = value+. -# -# source://yard//lib/yard/open_struct.rb#4 -class YARD::OpenStruct - # @return [OpenStruct] a new instance of OpenStruct - # - # source://yard//lib/yard/open_struct.rb#5 - def initialize(hash = T.unsafe(nil)); end - - # source://yard//lib/yard/open_struct.rb#25 - def ==(other); end - - # source://yard//lib/yard/open_struct.rb#41 - def [](key); end - - # source://yard//lib/yard/open_struct.rb#37 - def []=(key, value); end - - # source://yard//lib/yard/open_struct.rb#33 - def dig(*keys); end - - # source://yard//lib/yard/open_struct.rb#45 - def each_pair(&block); end - - # source://yard//lib/yard/open_struct.rb#29 - def hash; end - - # source://yard//lib/yard/open_struct.rb#49 - def marshal_dump; end - - # source://yard//lib/yard/open_struct.rb#53 - def marshal_load(data); end - - # @private - # - # source://yard//lib/yard/open_struct.rb#10 - def method_missing(name, *args); end - - # source://yard//lib/yard/open_struct.rb#21 - def to_h; end - - private - - # source://yard//lib/yard/open_struct.rb#59 - def __cache_lookup__(name); end -end - -# Generalized options class for passing around large amounts of options between objects. -# -# The options class exists for better visibility and documentability of options being -# passed through to other objects. Because YARD has parser and template architectures -# that are heavily reliant on options, it is necessary to make these option keys easily -# visible and understood by developers. Since the options class is more than just a -# basic Hash, the subclass can provide aliasing and convenience methods to simplify -# option property access, and, if needed, support backward-compatibility for deprecated -# key names. -# -# == Hash and OpenStruct-like Access -# -# Although the options class allows for Hash-like access (<tt>opts[:key]</tt>), the recommended -# mechanism for accessing an option key will be via standard method calls on attributes -# -# The options class can also act as an open ended key value storage structure (like a -# Hash or OpenStruct), and allows for setting and getting of unregistered option keys. -# This methodology is not recommended, however, and is only supported for backward -# compatibility inside YARD. Whenever possible, developers should define all keys used -# by an options class. -# -# == Declaring Default Values -# -# Note that the options class can contain default value definitions for certain options, -# but to initialize these defaults, {#reset_defaults} must be called manually after -# initialization; the options object is always created empty until defaults are applied. -# -# @abstract Subclasses should define (and document) custom attributes that are expected -# to be made available as option keys. -# @example Defining an Options class with custom option keys -# class TemplateOptions < YARD::Options -# # @return [Symbol] the output format to generate templates in -# attr_accessor :format -# -# # @return [Symbol] the template to use when generating output -# attr_accessor :template -# end -# @example Initializing default option values -# class TemplateOptions < YARD::Options -# def reset_defaults -# super -# self.format = :html -# self.template = :default -# self.highlight = true -# # ... -# end -# end -# @example Using +default_attr+ to create default attributes -# class TemplateOptions < YARD::Options -# default_attr :format, :html -# default_attr :template, :default -# default_attr :highlight, true -# end -# @example Deprecating an option while still supporting it -# class TemplateOptions < YARD::Options -# # @return [Boolean] if syntax highlighting should be performed on code blocks. -# # Defaults to true. -# attr_accessor :highlight -# -# # @deprecated Use {#highlight} instead. -# # @return [Boolean] if no syntax highlighting should be performs on code blocks. -# # Defaults to false. -# attr_accessor :no_highlight -# def no_highlight=(value) @highlight = !value end -# def no_highlight; !highlight end -# end -# -# source://yard//lib/yard/options.rb#69 -class YARD::Options - # @return [Boolean] whether another Options object equals the - # keys and values of this options object - # - # source://yard//lib/yard/options.rb#157 - def ==(other); end - - # Delegates calls with Hash syntax to actual method with key name - # - # @example Calling on an option key with Hash syntax - # options[:format] # equivalent to: options.format - # @param key [Symbol, String] the option name to access - # @return the value of the option named +key+ - # - # source://yard//lib/yard/options.rb#91 - def [](key); end - - # Delegates setter calls with Hash syntax to the attribute setter with the key name - # - # @example Setting an option with Hash syntax - # options[:format] = :html # equivalent to: options.format = :html - # @param key [Symbol, String] the option to set - # @param value [Object] the value to set for the option - # @return [Object] the value being set - # - # source://yard//lib/yard/options.rb#100 - def []=(key, value); end - - # Deletes an option value for +key+ - # - # @param key [Symbol, String] the key to delete a value for - # @return [Object] the value that was deleted - # - # source://yard//lib/yard/options.rb#207 - def delete(key); end - - # Yields over every option key and value - # - # @return [void] - # @yield [key, value] every option key and value - # @yieldparam key [Symbol] the option key - # @yieldparam value [Object] the option value - # - # source://yard//lib/yard/options.rb#143 - def each; end - - # Inspects the object - # - # source://yard//lib/yard/options.rb#151 - def inspect; end - - # Creates a new options object and sets options hash or object value - # onto that object. - # - # @param opts [Options, Hash] - # @return [Options] the newly created options object - # @see #update - # - # source://yard//lib/yard/options.rb#123 - def merge(opts); end - - # Handles setting and accessing of unregistered keys similar - # to an OpenStruct object. - # - # @note It is not recommended to set and access unregistered keys on - # an Options object. Instead, register the attribute before using it. - # - # source://yard//lib/yard/options.rb#170 - def method_missing(meth, *args, &block); end - - # Resets all values to their defaults. - # - # @abstract Subclasses should override this method to perform custom - # value initialization if not using {default_attr}. Be sure to call - # +super+ so that default initialization can take place. - # @return [void] - # - # source://yard//lib/yard/options.rb#188 - def reset_defaults; end - - # @return [Hash] Converts options object to an options hash. All keys - # will be symbolized. - # - # source://yard//lib/yard/options.rb#129 - def to_hash; end - - # Updates values from an options hash or options object on this object. - # All keys passed should be key names defined by attributes on the class. - # - # @example Updating a set of options on an Options object - # opts.update(:template => :guide, :type => :fulldoc) - # @param opts [Hash, Options] - # @return [self] - # - # source://yard//lib/yard/options.rb#109 - def update(opts); end - - class << self - # Defines an attribute named +key+ and sets a default value for it - # - # @example Defining a default option key - # default_attr :name, 'Default Name' - # default_attr :time, lambda { Time.now } - # @param key [Symbol] the option key name - # @param default [Object, Proc] the default object value. If the default - # value is a proc, it is executed upon initialization. - # - # source://yard//lib/yard/options.rb#80 - def default_attr(key, default); end - end -end - -# The parser namespace holds all parsing engines used by YARD. -# Currently only Ruby and C (Ruby) parsers are implemented. -# -# source://yard//lib/yard/autoload.rb#161 -module YARD::Parser; end - -# Represents the abstract base parser class that parses source code in -# a specific way. A parser should implement {#parse}, {#tokenize} and -# {#enumerator}. -# -# == Registering a Custom Parser -# To register a parser, see {SourceParser.register_parser_type} -# -# @abstract -# @see #parse -# @see #tokenize -# @see #enumerator -# @since 0.5.6 -# -# source://yard//lib/yard/parser/base.rb#16 -class YARD::Parser::Base - # This default constructor does nothing. The subclass is responsible for - # storing the source contents and filename if they are required. - # - # @param source [String] the source contents - # @param filename [String] the name of the file if from disk - # @raise [NotImplementedError] - # @return [Base] a new instance of Base - # @since 0.5.6 - # - # source://yard//lib/yard/parser/base.rb#26 - def initialize(source, filename); end - - # This method should be implemented to return a list of semantic tokens - # representing the source code to be post-processed. Otherwise the method - # should return nil. - # - # @abstract - # @return [Array] a list of semantic tokens representing the source code - # to be post-processed - # @return [nil] if no post-processing should be done - # @since 0.5.6 - # - # source://yard//lib/yard/parser/base.rb#52 - def enumerator; end - - # This method should be implemented to parse the source and return itself. - # - # @abstract - # @raise [NotImplementedError] - # @return [Base] this method should return itself - # @since 0.5.6 - # - # source://yard//lib/yard/parser/base.rb#33 - def parse; end - - # This method should be implemented to tokenize given source - # - # @abstract - # @raise [NotImplementedError] - # @return [Array] a list/tree of lexical tokens - # @since 0.5.6 - # - # source://yard//lib/yard/parser/base.rb#40 - def tokenize; end - - class << self - # Convenience method to create a new parser and {#parse} - # - # @since 0.5.6 - # - # source://yard//lib/yard/parser/base.rb#18 - def parse(source, filename = T.unsafe(nil)); end - end -end - -# CRuby Parsing components -# -# source://yard//lib/yard/autoload.rb#162 -module YARD::Parser::C; end - -# source://yard//lib/yard/parser/c/statement.rb#41 -class YARD::Parser::C::BodyStatement < ::YARD::Parser::C::Statement - # Returns the value of attribute comments. - # - # source://yard//lib/yard/parser/c/statement.rb#42 - def comments; end - - # Sets the attribute comments - # - # @param value the value to set the attribute comments to. - # - # source://yard//lib/yard/parser/c/statement.rb#42 - def comments=(_arg0); end -end - -# source://yard//lib/yard/parser/c/c_parser.rb#5 -class YARD::Parser::C::CParser < ::YARD::Parser::Base - # @return [CParser] a new instance of CParser - # - # source://yard//lib/yard/parser/c/c_parser.rb#6 - def initialize(source, file = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/c_parser.rb#24 - def enumerator; end - - # source://yard//lib/yard/parser/c/c_parser.rb#19 - def parse; end - - # @raise [NotImplementedError] - # - # source://yard//lib/yard/parser/c/c_parser.rb#28 - def tokenize; end - - private - - # source://yard//lib/yard/parser/c/c_parser.rb#213 - def advance(num = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/c_parser.rb#216 - def advance_loop; end - - # source://yard//lib/yard/parser/c/c_parser.rb#195 - def attach_comment(statement); end - - # source://yard//lib/yard/parser/c/c_parser.rb#214 - def back(num = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/c_parser.rb#225 - def char(num = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/c_parser.rb#96 - def consume_body_statements; end - - # source://yard//lib/yard/parser/c/c_parser.rb#136 - def consume_comment(add_comment = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/c_parser.rb#59 - def consume_directive; end - - # source://yard//lib/yard/parser/c/c_parser.rb#47 - def consume_quote(type = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/c_parser.rb#73 - def consume_toplevel_statement; end - - # source://yard//lib/yard/parser/c/c_parser.rb#169 - def consume_until(end_char, bracket_level = T.unsafe(nil), brace_level = T.unsafe(nil), add_comment = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/c_parser.rb#132 - def consume_whitespace; end - - # source://yard//lib/yard/parser/c/c_parser.rb#227 - def nextchar(num = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/c_parser.rb#220 - def nextline; end - - # source://yard//lib/yard/parser/c/c_parser.rb#34 - def parse_toplevel; end - - # source://yard//lib/yard/parser/c/c_parser.rb#226 - def prevchar(num = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/c_parser.rb#118 - def strip_non_statement_data; end - - # source://yard//lib/yard/parser/c/c_parser.rb#229 - def struct; end -end - -# source://yard//lib/yard/parser/c/statement.rb#51 -class YARD::Parser::C::Comment < ::YARD::Parser::C::Statement - include ::YARD::Parser::C::CommentParser - - # @return [Comment] a new instance of Comment - # - # source://yard//lib/yard/parser/c/statement.rb#58 - def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/c/statement.rb#62 - def comments; end - - # Returns the value of attribute overrides. - # - # source://yard//lib/yard/parser/c/statement.rb#55 - def overrides; end - - # Sets the attribute overrides - # - # @param value the value to set the attribute overrides to. - # - # source://yard//lib/yard/parser/c/statement.rb#55 - def overrides=(_arg0); end - - # Returns the value of attribute statement. - # - # source://yard//lib/yard/parser/c/statement.rb#56 - def statement; end - - # Sets the attribute statement - # - # @param value the value to set the attribute statement to. - # - # source://yard//lib/yard/parser/c/statement.rb#56 - def statement=(_arg0); end - - # Returns the value of attribute type. - # - # source://yard//lib/yard/parser/c/statement.rb#54 - def type; end - - # Sets the attribute type - # - # @param value the value to set the attribute type to. - # - # source://yard//lib/yard/parser/c/statement.rb#54 - def type=(_arg0); end -end - -# source://yard//lib/yard/parser/c/comment_parser.rb#5 -module YARD::Parser::C::CommentParser - protected - - # source://yard//lib/yard/parser/c/comment_parser.rb#8 - def parse_comments(comments); end - - private - - # source://yard//lib/yard/parser/c/comment_parser.rb#42 - def parse_callseq(comments); end - - # source://yard//lib/yard/parser/c/comment_parser.rb#30 - def parse_overrides(comments); end - - # source://yard//lib/yard/parser/c/comment_parser.rb#87 - def parse_types(types); end - - # source://yard//lib/yard/parser/c/comment_parser.rb#126 - def remove_private_comments(comment); end -end - -# source://yard//lib/yard/parser/c/statement.rb#5 -class YARD::Parser::C::Statement - # @return [Statement] a new instance of Statement - # - # source://yard//lib/yard/parser/c/statement.rb#16 - def initialize(source, file = T.unsafe(nil), line = T.unsafe(nil)); end - - # Returns the value of attribute comments_hash_flag. - # - # source://yard//lib/yard/parser/c/statement.rb#14 - def comments_hash_flag; end - - # Sets the attribute comments_hash_flag - # - # @param value the value to set the attribute comments_hash_flag to. - # - # source://yard//lib/yard/parser/c/statement.rb#14 - def comments_hash_flag=(_arg0); end - - # source://yard//lib/yard/parser/c/statement.rb#26 - def comments_range; end - - # Returns the value of attribute file. - # - # source://yard//lib/yard/parser/c/statement.rb#8 - def file; end - - # Sets the attribute file - # - # @param value the value to set the attribute file to. - # - # source://yard//lib/yard/parser/c/statement.rb#8 - def file=(_arg0); end - - # source://yard//lib/yard/parser/c/statement.rb#30 - def first_line; end - - # @deprecated Groups are now defined by directives - # @see Tags::GroupDirective - # - # source://yard//lib/yard/parser/c/statement.rb#12 - def group; end - - # @deprecated Groups are now defined by directives - # @see Tags::GroupDirective - # - # source://yard//lib/yard/parser/c/statement.rb#12 - def group=(_arg0); end - - # Returns the value of attribute line. - # - # source://yard//lib/yard/parser/c/statement.rb#7 - def line; end - - # Sets the attribute line - # - # @param value the value to set the attribute line to. - # - # source://yard//lib/yard/parser/c/statement.rb#7 - def line=(_arg0); end - - # source://yard//lib/yard/parser/c/statement.rb#22 - def line_range; end - - # source://yard//lib/yard/parser/c/statement.rb#36 - def show; end - - # source://yard//lib/yard/parser/c/statement.rb#30 - def signature; end - - # Returns the value of attribute source. - # - # source://yard//lib/yard/parser/c/statement.rb#6 - def source; end - - # Sets the attribute source - # - # @param value the value to set the attribute source to. - # - # source://yard//lib/yard/parser/c/statement.rb#6 - def source=(_arg0); end -end - -# source://yard//lib/yard/parser/c/statement.rb#45 -class YARD::Parser::C::ToplevelStatement < ::YARD::Parser::C::Statement - # Returns the value of attribute block. - # - # source://yard//lib/yard/parser/c/statement.rb#46 - def block; end - - # Sets the attribute block - # - # @param value the value to set the attribute block to. - # - # source://yard//lib/yard/parser/c/statement.rb#46 - def block=(_arg0); end - - # Returns the value of attribute comments. - # - # source://yard//lib/yard/parser/c/statement.rb#48 - def comments; end - - # Sets the attribute comments - # - # @param value the value to set the attribute comments to. - # - # source://yard//lib/yard/parser/c/statement.rb#48 - def comments=(_arg0); end - - # Returns the value of attribute declaration. - # - # source://yard//lib/yard/parser/c/statement.rb#47 - def declaration; end - - # Sets the attribute declaration - # - # @param value the value to set the attribute declaration to. - # - # source://yard//lib/yard/parser/c/statement.rb#47 - def declaration=(_arg0); end -end - -# Responsible for parsing a list of files in order. The -# {#parse} method of this class can be called from the -# {SourceParser#globals} globals state list to re-enter -# parsing for the remainder of files in the list recursively. -# -# @see Processor#parse_remaining_files -# -# source://yard//lib/yard/parser/source_parser.rb#20 -class YARD::Parser::OrderedParser - # Creates a new OrderedParser with the global state and a list - # of files to parse. - # - # @note OrderedParser sets itself as the +ordered_parser+ key on - # global_state for later use in {Handlers::Processor}. - # @param global_state [OpenStruct] a structure containing all global - # state during parsing - # @param files [Array<String>] the list of files to parse - # @return [OrderedParser] a new instance of OrderedParser - # - # source://yard//lib/yard/parser/source_parser.rb#32 - def initialize(global_state, files); end - - # @return [Array<String>] the list of remaining files to parse - # - # source://yard//lib/yard/parser/source_parser.rb#22 - def files; end - - # @return [Array<String>] the list of remaining files to parse - # - # source://yard//lib/yard/parser/source_parser.rb#22 - def files=(_arg0); end - - # Parses the remainder of the {#files} list. - # - # @see Processor#parse_remaining_files - # - # source://yard//lib/yard/parser/source_parser.rb#41 - def parse; end -end - -# Raised when the parser sees a Ruby syntax error -# -# source://yard//lib/yard/parser/source_parser.rb#12 -class YARD::Parser::ParserSyntaxError < ::YARD::Parser::UndocumentableError; end - -# Ruby parsing components. -# -# source://yard//lib/yard/autoload.rb#171 -module YARD::Parser::Ruby - # Builds and s-expression by creating {AstNode} objects with - # the type provided by the first argument. - # - # @example An implicit list of keywords - # ast = s(s(:kw, "if"), s(:kw, "else")) - # ast.type # => :list - # @example A method call - # s(:command, s(:var_ref, "mymethod")) - # @overload s - # @overload s - # @see AstNode#initialize - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#25 - def s(*args); end -end - -# An AST node is characterized by a type and a list of children. It -# is most easily represented by the s-expression {#s} such as: -# # AST for "if true; 5 end": -# s(s(:if, s(:var_ref, s(:kw, "true")), s(s(:int, "5")), nil)) -# -# The node type is not considered part of the list, only its children. -# So +ast[0]+ does not refer to the type, but rather the first child -# (or object). Items that are not +AstNode+ objects can be part of the -# list, like Strings or Symbols representing names. To return only -# the AstNode children of the node, use {#children}. -# -# source://yard//lib/yard/parser/ruby/ast_node.rb#41 -class YARD::Parser::Ruby::AstNode < ::Array - # Creates a new AST node - # - # @option opts - # @option opts - # @option opts - # @option opts - # @option opts - # @param type [Symbol] the type of node being created - # @param arr [Array<AstNode>] the child nodes - # @param opts [Hash] any extra line options - # @return [AstNode] a new instance of AstNode - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#153 - def initialize(type, arr, opts = T.unsafe(nil)); end - - # @private - # @return [Boolean] whether the node is equal to another by checking - # the list and type - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#167 - def ==(other); end - - # @return [Boolean] whether the node has a block - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#261 - def block?; end - - # @return [Boolean] whether the node is a method call - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#241 - def call?; end - - # @return [Array<AstNode>] the {AstNode} children inside the node - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#199 - def children; end - - # Returns the value of attribute docstring. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#43 - def comments; end - - # Returns the value of attribute docstring_hash_flag. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#42 - def comments_hash_flag; end - - # Returns the value of attribute docstring_range. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#43 - def comments_range; end - - # @return [Boolean] whether the node is a if/elsif/else condition - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#251 - def condition?; end - - # @return [Boolean] whether the node is a method definition - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#246 - def def?; end - - # Returns the value of attribute docstring. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#43 - def docstring; end - - # Sets the attribute docstring - # - # @param value the value to set the attribute docstring to. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#43 - def docstring=(_arg0); end - - # Returns the value of attribute docstring_hash_flag. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#42 - def docstring_hash_flag; end - - # Sets the attribute docstring_hash_flag - # - # @param value the value to set the attribute docstring_hash_flag to. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#42 - def docstring_hash_flag=(_arg0); end - - # Returns the value of attribute docstring_range. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#43 - def docstring_range; end - - # Sets the attribute docstring_range - # - # @param value the value to set the attribute docstring_range to. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#43 - def docstring_range=(_arg0); end - - # @return [String] the filename the node was parsed from - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#76 - def file; end - - # Sets the attribute file - # - # @param value the value to set the attribute file to. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#49 - def file=(_arg0); end - - # @return [String] the first line of source represented by the node. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#278 - def first_line; end - - # @return [String] the full source that the node was parsed from - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#82 - def full_source; end - - # Sets the attribute full_source - # - # @param value the value to set the attribute full_source to. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#49 - def full_source=(_arg0); end - - # @deprecated Groups are now defined by directives - # @see Tags::GroupDirective - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#47 - def group; end - - # @deprecated Groups are now defined by directives - # @see Tags::GroupDirective - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#47 - def group=(_arg0); end - - # @return [Boolean] whether the node has a {#line_range} set - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#268 - def has_line?; end - - # @return [String] inspects the object - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#323 - def inspect; end - - # Searches through the node and all descendants and returns the - # first node with a type matching any of +node_types+, otherwise - # returns the original node (self). - # - # @example Returns the first method definition in a block of code - # ast = YARD.parse_string("if true; def x; end end").ast - # ast.jump(:def) - # # => s(:def, s(:ident, "x"), s(:params, nil, nil, nil, nil, - # # nil), s(s(:void_stmt, ))) - # @example Returns first 'def' or 'class' statement - # ast = YARD.parse_string("class X; def y; end end") - # ast.jump(:def, :class).first - # # => - # @example If the node types are not present in the AST - # ast = YARD.parse("def x; end") - # ast.jump(:def) - # @param node_types [Array<Symbol>] a set of node types to match - # @return [AstNode] the matching node, if one was found - # @return [self] if no node was found - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#193 - def jump(*node_types); end - - # @return [Boolean] whether the node is a keyword - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#236 - def kw?; end - - # @return [Fixnum] the starting line number of the node - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#273 - def line; end - - # @return [Range] the line range in {#full_source} represented - # by the node - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#70 - def line_range; end - - # Sets the attribute line_range - # - # @param value the value to set the attribute line_range to. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#49 - def line_range=(_arg0); end - - # @return [Boolean] whether the node is a literal value - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#231 - def literal?; end - - # @return [Boolean] whether the node is a loop - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#256 - def loop?; end - - # @return [AstNode, nil] the node's parent or nil if it is a root node. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#59 - def parent; end - - # @return [AstNode, nil] the node's parent or nil if it is a root node. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#59 - def parent=(_arg0); end - - # @return [nil] pretty prints the node - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#290 - def pretty_print(q); end - - # @return [Boolean] whether the node is a reference (variable, - # constant name) - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#226 - def ref?; end - - # @return [String] the first line of source the node represents - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#285 - def show; end - - # @return [String] the parse of {#full_source} that the node represents - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#89 - def source; end - - # Sets the attribute source - # - # @param value the value to set the attribute source to. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#43 - def source=(_arg0); end - - # @return [Range] the character range in {#full_source} represented - # by the node - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#63 - def source_range; end - - # Sets the attribute source_range - # - # @param value the value to set the attribute source_range to. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#49 - def source_range=(_arg0); end - - # Returns the value of attribute source. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#43 - def to_s; end - - # @return [Boolean] whether the node is a token - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#220 - def token?; end - - # Traverses the object and yields each node (including descendants) in order. - # - # @return [void] - # @yield each descendant node in order - # @yieldparam self, [AstNode] or a child/descendant node - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#208 - def traverse; end - - # @return [Symbol] the node's unique symbolic type - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#56 - def type; end - - # @return [Symbol] the node's unique symbolic type - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#56 - def type=(_arg0); end - - # Resets node state in tree - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#331 - def unfreeze; end - - private - - # Resets line information - # - # @return [void] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#341 - def reset_line_info; end - - class << self - # Finds the node subclass that should be instantiated for a specific - # node type - # - # @param type [Symbol] the node type to find a subclass for - # @return [Class] a subclass of AstNode to instantiate the node with. - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#111 - def node_class_for(type); end - end -end - -# List of all known keywords -# -# @return [Hash] -# -# source://yard//lib/yard/parser/ruby/ast_node.rb#96 -YARD::Parser::Ruby::AstNode::KEYWORDS = T.let(T.unsafe(nil), Hash) - -# source://yard//lib/yard/parser/ruby/ast_node.rb#530 -class YARD::Parser::Ruby::ClassNode < ::YARD::Parser::Ruby::KeywordNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#533 - def block; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#531 - def class_name; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#532 - def superclass; end -end - -# Represents a lone comment block in source -# -# source://yard//lib/yard/parser/ruby/ast_node.rb#548 -class YARD::Parser::Ruby::CommentNode < ::YARD::Parser::Ruby::AstNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#549 - def comments; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#549 - def docstring; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#550 - def docstring=(value); end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#554 - def first_line; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#553 - def source; end -end - -# source://yard//lib/yard/parser/ruby/ast_node.rb#515 -class YARD::Parser::Ruby::ConditionalNode < ::YARD::Parser::Ruby::KeywordNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#517 - def condition; end - - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#516 - def condition?; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#520 - def else_block; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#518 - def then_block; end - - private - - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#527 - def cmod?; end -end - -# source://yard//lib/yard/parser/ruby/ast_node.rb#376 -class YARD::Parser::Ruby::KeywordNode < ::YARD::Parser::Ruby::AstNode - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#377 - def kw?; end -end - -# Handles Ruby parsing in Ruby 1.8. -# -# source://yard//lib/yard/autoload.rb#172 -module YARD::Parser::Ruby::Legacy; end - -# Lexical analyzer for Ruby source -# -# @private -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#314 -class YARD::Parser::Ruby::Legacy::RubyLex - include ::YARD::Parser::Ruby::Legacy::RubyToken - include ::IRB - - # @return [RubyLex] a new instance of RubyLex - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#437 - def initialize(content); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#472 - def char_no; end - - # Returns the value of attribute continue. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#430 - def continue; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1116 - def dedent(str); end - - # Returns the value of attribute exception_on_syntax_error. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 - def exception_on_syntax_error; end - - # Sets the attribute exception_on_syntax_error - # - # @param value the value to set the attribute exception_on_syntax_error to. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 - def exception_on_syntax_error=(_arg0); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#476 - def get_read; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#480 - def getc; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#484 - def getc_of_rests; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#488 - def gets; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1272 - def identify_comment; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#945 - def identify_gvar; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1062 - def identify_here_document; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#980 - def identify_identifier; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1145 - def identify_number(start); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1126 - def identify_quotation(initial_char); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1207 - def identify_string(ltype, quoted = T.unsafe(nil), opener = T.unsafe(nil), initial_char = T.unsafe(nil)); end - - # Returns the value of attribute indent. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#465 - def indent; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#510 - def lex; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#586 - def lex_init; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#759 - def lex_int2; end - - # Returns the value of attribute lex_state. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#431 - def lex_state; end - - # io functions - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#468 - def line_no; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#506 - def peek(i = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#502 - def peek_equal?(str); end - - # Returns the value of attribute read_auto_clean_up. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 - def read_auto_clean_up; end - - # Sets the attribute read_auto_clean_up - # - # @param value the value to set the attribute read_auto_clean_up to. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 - def read_auto_clean_up=(_arg0); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1295 - def read_escape; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 - def skip_inner_expression; end - - # Returns the value of attribute skip_space. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461 - def skip_space; end - - # Sets the attribute skip_space - # - # @param value the value to set the attribute skip_space to. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#461 - def skip_space=(_arg0); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#526 - def token; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#498 - def ungetc(c = T.unsafe(nil)); end - - class << self - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#433 - def debug?; end - end -end - -# , "when" -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#552 -YARD::Parser::Ruby::Legacy::RubyLex::ACCEPTS_COLON = T.let(T.unsafe(nil), Array) - -# Read an input stream character by character. We allow for unlimited -# ungetting of characters just read. -# -# We simplify the implementation greatly by reading the entire input -# into a buffer initially, and then simply traversing it using -# pointers. -# -# We also have to allow for the <i>here document diversion</i>. This -# little gem comes about when the lexer encounters a here -# document. At this point we effectively need to split the input -# stream into two parts: one to read the body of the here document, -# the other to read the rest of the input line where the here -# document was initially encountered. For example, we might have -# -# do_something(<<-A, <<-B) -# stuff -# for -# A -# stuff -# for -# B -# -# When the lexer encounters the <<A, it reads until the end of the -# line, and keeps it around for later. It then reads the body of the -# here document. Once complete, it needs to read the rest of the -# original line, but then skip the here document body. -# -# @private -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#343 -class YARD::Parser::Ruby::Legacy::RubyLex::BufferedReader - # @return [BufferedReader] a new instance of BufferedReader - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#346 - def initialize(content); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#365 - def column; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#419 - def divert_read_from(reserve); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#400 - def get_read; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#369 - def getc; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#388 - def getc_already_read; end - - # Returns the value of attribute line_num. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#344 - def line_num; end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#406 - def peek(at); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#415 - def peek_equal(str); end - - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#392 - def ungetc(_ch); end -end - -# , "when" -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#553 -YARD::Parser::Ruby::Legacy::RubyLex::DEINDENT_CLAUSE = T.let(T.unsafe(nil), Array) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#580 -YARD::Parser::Ruby::Legacy::RubyLex::DLtype2Token = T.let(T.unsafe(nil), Hash) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#548 -YARD::Parser::Ruby::Legacy::RubyLex::ENINDENT_CLAUSE = T.let(T.unsafe(nil), Array) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#571 -YARD::Parser::Ruby::Legacy::RubyLex::Ltype2Token = T.let(T.unsafe(nil), Hash) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#555 -YARD::Parser::Ruby::Legacy::RubyLex::PERCENT_LTYPE = T.let(T.unsafe(nil), Hash) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#564 -YARD::Parser::Ruby::Legacy::RubyLex::PERCENT_PAREN = T.let(T.unsafe(nil), Hash) - -# Legacy Ruby parser -# -# @since 0.5.6 -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#8 -class YARD::Parser::Ruby::Legacy::RubyParser < ::YARD::Parser::Base - # @return [RubyParser] a new instance of RubyParser - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#9 - def initialize(source, _filename); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#26 - def encoding_line; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#22 - def enumerator; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#13 - def parse; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#27 - def shebang_line; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_parser.rb#18 - def tokenize; end -end - -# Legacy lexical tokenizer module. -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#6 -module YARD::Parser::Ruby::Legacy::RubyToken - # @private - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#125 - def Token(token, value = T.unsafe(nil)); end - - # @private - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#119 - def set_token_position(line, char); end - - class << self - # @private - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#275 - def def_token(token_n, super_token = T.unsafe(nil), reading = T.unsafe(nil), *opts); end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#10 -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_ARG = T.let(T.unsafe(nil), Symbol) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#7 -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_BEG = T.let(T.unsafe(nil), Symbol) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#13 -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_CLASS = T.let(T.unsafe(nil), Symbol) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#12 -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_DOT = T.let(T.unsafe(nil), Symbol) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#9 -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_END = T.let(T.unsafe(nil), Symbol) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#11 -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_FNAME = T.let(T.unsafe(nil), Symbol) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#8 -YARD::Parser::Ruby::Legacy::RubyToken::EXPR_MID = T.let(T.unsafe(nil), Symbol) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#308 -YARD::Parser::Ruby::Legacy::RubyToken::NEWLINE_TOKEN = T.let(T.unsafe(nil), YARD::Parser::Ruby::Legacy::RubyToken::TkNL) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::OPASGN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkALIAS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkAMPER < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkAND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkANDOP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkAREF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkASET < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkASSIGN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkASSOC < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkAT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBACKQUOTE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBACKSLASH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBACK_REF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBITAND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBITNOT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBITOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBITXOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBREAK < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# Represents a block -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#54 -class YARD::Parser::Ruby::Legacy::RubyToken::TkBlockContents < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#55 - def text; end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkCASE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkCLASS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkCMP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON2 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOLON3 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOMMA < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkCOMMENT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkCONSTANT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDEFINED < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDIV < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDO < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDOLLAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT2 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDOT3 < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDREGEXP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkDXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkNode; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkELSE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkELSIF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkEND_OF_SCRIPT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkENSURE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkEQQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#115 -class YARD::Parser::Ruby::Legacy::RubyToken::TkError < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkFALSE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkFID < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkFLOAT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkFOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkGEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkGT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkGVAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkIDENTIFIER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkIF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkIF_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkINTEGER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkIVAR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -# Represents a Ruby identifier -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#72 -class YARD::Parser::Ruby::Legacy::RubyToken::TkId < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - # @return [TkId] a new instance of TkId - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#73 - def initialize(line_no, char_no, name); end - - # Returns the value of attribute name. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#77 - def name; end -end - -# Represents a Ruby keyword -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#81 -class YARD::Parser::Ruby::Legacy::RubyToken::TkKW < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkLABEL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkLBRACE < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkLBRACK < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkLEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkLPAREN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkLSHFT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkLT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkMATCH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkMOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkMODULE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkMULT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkNEQ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkNEXT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkNIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkNL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkNMATCH < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkNOT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkNOTOP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkNTH_REF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#63 -class YARD::Parser::Ruby::Legacy::RubyToken::TkNode < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - # Returns the value of attribute node. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#64 - def node; end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#98 -class YARD::Parser::Ruby::Legacy::RubyToken::TkOPASGN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - # @return [TkOPASGN] a new instance of TkOPASGN - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#99 - def initialize(line_no, char_no, op); end - - # Returns the value of attribute op. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#104 - def op; end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkOR < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkOROP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#92 -class YARD::Parser::Ruby::Legacy::RubyToken::TkOp < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#93 - def name; end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkPOW < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkQUESTION < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkRBRACE < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkRBRACK < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkREDO < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkREGEXP < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkRESCUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkRETRY < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkRETURN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkRPAREN < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkRSHFT < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# { reading => token_class } -# { reading => [token_class, *opt] } -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#271 -YARD::Parser::Ruby::Legacy::RubyToken::TkReading2Token = T.let(T.unsafe(nil), Hash) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkSELF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkSEMICOLON < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkSPACE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkSTAR < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkSUPER < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBEG < ::YARD::Parser::Ruby::Legacy::RubyToken::TkId; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkSYMBOL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end - -# Represents an end statement -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#59 -class YARD::Parser::Ruby::Legacy::RubyToken::TkStatementEnd < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#60 - def text; end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#272 -YARD::Parser::Ruby::Legacy::RubyToken::TkSymbol2Token = T.let(T.unsafe(nil), Hash) - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkTHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkTRUE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkUMINUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNDEF < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNLESS_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkUNTIL_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkUPLUS < ::YARD::Parser::Ruby::Legacy::RubyToken::TkOp - class << self - def op_name; end - end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#107 -class YARD::Parser::Ruby::Legacy::RubyToken::TkUnknownChar < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - # @return [TkUnknownChar] a new instance of TkUnknownChar - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#108 - def initialize(line_no, char_no, _id); end - - # Returns the value of attribute name. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#112 - def name; end -end - -# Represents a Ruby value -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#85 -class YARD::Parser::Ruby::Legacy::RubyToken::TkVal < ::YARD::Parser::Ruby::Legacy::RubyToken::Token - # @return [TkVal] a new instance of TkVal - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#86 - def initialize(line_no, char_no, value = T.unsafe(nil)); end -end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkWHEN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkWHILE_MOD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# Represents whitespace -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#68 -class YARD::Parser::Ruby::Legacy::RubyToken::TkWhitespace < ::YARD::Parser::Ruby::Legacy::RubyToken::Token; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkXSTRING < ::YARD::Parser::Ruby::Legacy::RubyToken::TkVal; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TkYIELD < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::Tk__FILE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::Tk__LINE__ < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TklBEGIN < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#281 -class YARD::Parser::Ruby::Legacy::RubyToken::TklEND < ::YARD::Parser::Ruby::Legacy::RubyToken::TkKW; end - -# Represents a token in the Ruby lexer -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#16 -class YARD::Parser::Ruby::Legacy::RubyToken::Token - # Creates a new Token object - # - # @param line_no [Integer] the line number to initialize the token to - # @param char_no [Integer] the char number to initialize the token to - # @return [Token] a new instance of Token - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#37 - def initialize(line_no, char_no); end - - # @return [Integer] the character number in the file/stream the token - # is located. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#23 - def char_no; end - - # @return [Symbol] the lexical state at the token - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29 - def lex_state; end - - # @return [Symbol] the lexical state at the token - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#29 - def lex_state=(_arg0); end - - # @return [Integer] the line number in the file/stream the token is - # located. - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#19 - def line_no; end - - # Chainable way to sets the text attribute - # - # @param text [String] the new text - # @return [Token] this token object - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#47 - def set_text(text); end - - # @return [String] the token text value - # - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#26 - def text; end -end - -# @private -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#32 -YARD::Parser::Ruby::Legacy::RubyToken::Token::NO_TEXT = T.let(T.unsafe(nil), String) - -# @private -# -# source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#147 -YARD::Parser::Ruby::Legacy::RubyToken::TokenDefinitions = T.let(T.unsafe(nil), Array) - -# source://yard//lib/yard/parser/ruby/legacy/statement.rb#4 -class YARD::Parser::Ruby::Legacy::Statement - # @return [Statement] a new instance of Statement - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#14 - def initialize(tokens, block = T.unsafe(nil), comments = T.unsafe(nil)); end - - # Returns the value of attribute block. - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 - def block; end - - # Returns the value of attribute comments. - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 - def comments; end - - # Returns the value of attribute comments_hash_flag. - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12 - def comments_hash_flag; end - - # Sets the attribute comments_hash_flag - # - # @param value the value to set the attribute comments_hash_flag to. - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#12 - def comments_hash_flag=(_arg0); end - - # Returns the value of attribute comments_range. - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6 - def comments_range; end - - # Sets the attribute comments_range - # - # @param value the value to set the attribute comments_range to. - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#6 - def comments_range=(_arg0); end - - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#21 - def first_line; end - - # @deprecated Groups are now defined by directives - # @see Tags::GroupDirective - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10 - def group; end - - # @deprecated Groups are now defined by directives - # @see Tags::GroupDirective - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#10 - def group=(_arg0); end - - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#34 - def inspect; end - - # @return [Fixnum] the first line of Ruby source - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#46 - def line; end - - # @return [Range<Fixnum>] the first to last lines of Ruby source - # @since 0.5.4 - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#52 - def line_range; end - - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#41 - def show; end - - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#21 - def signature; end - - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#27 - def source(include_block = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#27 - def to_s(include_block = T.unsafe(nil)); end - - # Returns the value of attribute tokens. - # - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#5 - def tokens; end - - private - - # source://yard//lib/yard/parser/ruby/legacy/statement.rb#58 - def clean_tokens(tokens); end -end - -# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#4 -class YARD::Parser::Ruby::Legacy::StatementList < ::Array - include ::YARD::Parser::Ruby::Legacy::RubyToken - - # Creates a new statement list - # - # @param content [TokenList, String] the tokens to create the list from - # @return [StatementList] a new instance of StatementList - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#17 - def initialize(content); end - - # Returns the value of attribute encoding_line. - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 - def encoding_line; end - - # Sets the attribute encoding_line - # - # @param value the value to set the attribute encoding_line to. - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 - def encoding_line=(_arg0); end - - # Returns the value of attribute shebang_line. - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 - def shebang_line; end - - # Sets the attribute shebang_line - # - # @param value the value to set the attribute shebang_line to. - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#7 - def shebang_line=(_arg0); end - - private - - # Handles the balancing of parentheses and blocks - # - # @param tk [RubyToken::Token] the token to process - # @return [Boolean] whether or not the current statement's parentheses and blocks - # are balanced after +tk+ - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#362 - def balances?(tk); end - - # Returns the next statement in the token stream - # - # @return [Statement] the next statement - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#45 - def next_statement; end - - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#34 - def parse_statements; end - - # Returns the next token in the stream that's not a space - # - # @return [RubyToken::Token] the next non-space token - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#388 - def peek_no_space; end - - # Processes a token in a block - # - # @param tk [RubyToken::Token] the token to process - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#194 - def process_block_token(tk); end - - # Processes a complex block-opening token; - # that is, a block opener such as +while+ or +for+ - # that is followed by an expression - # - # @param tk [RubyToken::Token] the token to process - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#293 - def process_complex_block_opener(tk); end - - # Processes a comment token that comes before a statement - # - # @param tk [RubyToken::Token] the token to process - # @return [Boolean] whether or not +tk+ was processed as an initial comment - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#213 - def process_initial_comment(tk); end - - # Processes a simple block-opening token; - # that is, a block opener such as +begin+ or +do+ - # that isn't followed by an expression - # - # @param tk [RubyToken::Token] the token to process - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#268 - def process_simple_block_opener(tk); end - - # Processes a token that closes a statement - # - # @param tk [RubyToken::Token] the token to process - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#305 - def process_statement_end(tk); end - - # Processes a single token - # - # @param tk [RubyToken::Token] the token to process - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#130 - def process_token(tk); end - - # Adds a token to the current statement, - # unless it's a newline, semicolon, or comment - # - # @param tk [RubyToken::Token] the token to process - # - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#380 - def push_token(tk); end - - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#111 - def sanitize_block; end - - # source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#96 - def sanitize_statement_end; end -end - -# The following list of tokens will require a block to be opened -# if used at the beginning of a statement. -# -# source://yard//lib/yard/parser/ruby/legacy/statement_list.rb#11 -YARD::Parser::Ruby::Legacy::StatementList::OPEN_BLOCK_TOKENS = T.let(T.unsafe(nil), Array) - -# source://yard//lib/yard/parser/ruby/legacy/token_list.rb#4 -class YARD::Parser::Ruby::Legacy::TokenList < ::Array - include ::YARD::Parser::Ruby::Legacy::RubyToken - - # @return [TokenList] a new instance of TokenList - # - # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#7 - def initialize(content = T.unsafe(nil)); end - - # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it - # is parsed with {RubyLex}. - # - # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#21 - def <<(*tokens); end - - # @param tokens [TokenList, Token, String] A list of tokens. If the token is a string, it - # is parsed with {RubyLex}. - # - # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#21 - def push(*tokens); end - - # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#37 - def squeeze(type = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#11 - def to_s(full_statement = T.unsafe(nil), show_block = T.unsafe(nil)); end - - private - - # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#53 - def convert_token(lex, tk); end - - # source://yard//lib/yard/parser/ruby/legacy/token_list.rb#44 - def parse_content(content); end -end - -# source://yard//lib/yard/parser/ruby/ast_node.rb#372 -class YARD::Parser::Ruby::LiteralNode < ::YARD::Parser::Ruby::AstNode - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#373 - def literal?; end -end - -# source://yard//lib/yard/parser/ruby/ast_node.rb#541 -class YARD::Parser::Ruby::LoopNode < ::YARD::Parser::Ruby::KeywordNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#544 - def block; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#543 - def condition; end - - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#542 - def loop?; end -end - -# source://yard//lib/yard/parser/ruby/ast_node.rb#438 -class YARD::Parser::Ruby::MethodCallNode < ::YARD::Parser::Ruby::AstNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#464 - def block; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#462 - def block_param; end - - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#439 - def call?; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#442 - def method_name(name_only = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#440 - def namespace; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#453 - def parameters(include_block_param = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#474 - def call_has_paren?; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#470 - def index_adjust; end -end - -# source://yard//lib/yard/parser/ruby/ast_node.rb#479 -class YARD::Parser::Ruby::MethodDefinitionNode < ::YARD::Parser::Ruby::AstNode - def block(n = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#481 - def def?; end - - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#480 - def kw?; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#484 - def method_name(name_only = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#482 - def namespace; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#489 - def parameters(include_block_param = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#495 - def signature; end - - private - - # source://yard//lib/yard/parser/ruby/ast_node.rb#510 - def index_adjust; end -end - -# source://yard//lib/yard/parser/ruby/ast_node.rb#536 -class YARD::Parser::Ruby::ModuleNode < ::YARD::Parser::Ruby::KeywordNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#538 - def block; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#537 - def module_name; end -end - -# source://yard//lib/yard/parser/ruby/ast_node.rb#380 -class YARD::Parser::Ruby::ParameterNode < ::YARD::Parser::Ruby::AstNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#430 - def args_forward; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#426 - def block_param; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#414 - def double_splat_param; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#396 - def named_params; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#406 - def splat_param; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#410 - def unnamed_end_params; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#385 - def unnamed_optional_params; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#381 - def unnamed_required_params; end -end - -# source://yard//lib/yard/parser/ruby/ast_node.rb#360 -class YARD::Parser::Ruby::ReferenceNode < ::YARD::Parser::Ruby::AstNode - # source://yard//lib/yard/parser/ruby/ast_node.rb#367 - def namespace; end - - # source://yard//lib/yard/parser/ruby/ast_node.rb#363 - def path; end - - # @return [Boolean] - # - # source://yard//lib/yard/parser/ruby/ast_node.rb#361 - def ref?; end -end - -# Internal parser class -# -# @since 0.5.6 -# -# source://yard//lib/yard/parser/ruby/ruby_parser.rb#27 -class YARD::Parser::Ruby::RipperParser < ::Ripper - # @return [RipperParser] a new instance of RipperParser - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#32 - def initialize(source, filename, *args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 - def ast; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 - def charno; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 - def comments; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 - def encoding_line; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#64 - def enumerator; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 - def file; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#68 - def file_encoding; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 - def frozen_string_line; end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_BEGIN(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_CHAR(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_END(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on___end__(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_alias(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_alias_error(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_arg_ambiguous(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_arg_paren(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_args_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_args_add_block(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_args_add_star(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_args_forward(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 - def on_args_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_aryptn(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_assign(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_assign_error(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_assoc_splat(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_backref(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_backtick(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_begin(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_binary(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_block_var(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_blockarg(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_brace_block(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_break(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_call(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_case(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_class(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_class_name_error(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_comma(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_command(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_command_call(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_const(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_const_path_field(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_const_ref(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_cvar(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_def(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_defined(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_defs(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_do_block(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_dot2(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_dot3(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_else(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_elsif(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_embexpr_beg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_embexpr_end(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_embvar(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_ensure(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_excessed_comma(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_fcall(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_field(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_float(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_fndptn(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_for(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_gvar(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_heredoc_beg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_heredoc_dedent(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_heredoc_end(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_hshptn(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_ident(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_if(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 - def on_if_mod(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_ifop(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 - def on_ignored_nl(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_ignored_sp(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_imaginary(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_in(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_int(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_ivar(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 - def on_kw(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_kwrest_param(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_label_end(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_lbrace(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_lparen(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_magic_comment(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_massign(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_method_add_arg(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_method_add_block(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_mlhs_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_mlhs_add_post(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_mlhs_add_star(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 - def on_mlhs_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_mlhs_paren(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_module(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_mrhs_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_mrhs_add_star(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 - def on_mrhs_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_mrhs_new_from_args(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_next(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#222 - def on_nl(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_nokw_param(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#209 - def on_op(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_opassign(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_operator_ambiguous(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_param_error(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_paren(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_period(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 - def on_qsymbols_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_qsymbols_beg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 - def on_qsymbols_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 - def on_qwords_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_qwords_beg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 - def on_qwords_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_rational(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_rbrace(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_redo(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_regexp_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_regexp_beg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_regexp_end(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_regexp_literal(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 - def on_regexp_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_rescue_mod(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_rest_param(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_retry(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_return(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_return0(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_rparen(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_sclass(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_semicolon(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_stmts_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 - def on_stmts_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_string_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_string_concat(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_string_dvar(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_string_embexpr(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_super(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_symbeg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_symbol(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_symbol_literal(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 - def on_symbols_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_symbols_beg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 - def on_symbols_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_tlambda(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_tlambeg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_top_const_field(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_tstring_beg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_tstring_content(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_tstring_end(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_undef(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_unless(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 - def on_unless_mod(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_until(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 - def on_until_mod(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_var_alias(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_var_field(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_var_ref(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#177 - def on_vcall(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_when(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_while(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#449 - def on_while_mod(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_word_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 - def on_word_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#474 - def on_words_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#199 - def on_words_beg(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#462 - def on_words_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#188 - def on_words_sep(tok); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#162 - def on_xstring_add(list, item); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_xstring_literal(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#155 - def on_xstring_new(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_yield(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_yield0(*args); end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#170 - def on_zsuper(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#55 - def parse; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 - def root; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#29 - def shebang_line; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#28 - def tokens; end - - private - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#667 - def add_comment(line, node = T.unsafe(nil), before_node = T.unsafe(nil), into = T.unsafe(nil)); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#271 - def add_token(token, data); end - - # @return [Boolean] - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#611 - def comment_starts_line?(charno); end - - # @raise [ParserSyntaxError] - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 - def compile_error(msg); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#693 - def freeze_tree(node = T.unsafe(nil)); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#620 - def insert_comments; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#377 - def on_aref(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#385 - def on_aref_field(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#391 - def on_array(other); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#352 - def on_assoc_new(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#364 - def on_assoclist_from_args(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#360 - def on_bare_assoc_hash(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 - def on_body_stmt(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#347 - def on_bodystmt(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#542 - def on_comment(comment); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#441 - def on_const_path_ref(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#419 - def on_dyna_symbol(sym); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#592 - def on_embdoc(text); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#586 - def on_embdoc_beg(text); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#597 - def on_embdoc_end(text); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#356 - def on_hash(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#534 - def on_label(data); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#497 - def on_lambda(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#409 - def on_lbracket(tok); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#515 - def on_params(*args); end - - # @raise [ParserSyntaxError] - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#606 - def on_parse_error(msg); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#343 - def on_program(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#414 - def on_rbracket(tok); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#506 - def on_rescue(exc, *args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#232 - def on_sp(tok); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#501 - def on_string_content(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#484 - def on_string_literal(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#429 - def on_top_const_ref(*args); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#368 - def on_unary(op, val); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#511 - def on_void_stmt; end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#237 - def visit_event(node); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#251 - def visit_event_arr(node); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#259 - def visit_ns_token(token, data, ast_token = T.unsafe(nil)); end -end - -# @since 0.5.6 -# -# source://yard//lib/yard/parser/ruby/ruby_parser.rb#133 -YARD::Parser::Ruby::RipperParser::AST_TOKENS = T.let(T.unsafe(nil), Array) - -# @since 0.5.6 -# -# source://yard//lib/yard/parser/ruby/ruby_parser.rb#136 -YARD::Parser::Ruby::RipperParser::COMMENT_SKIP_NODE_TYPES = T.let(T.unsafe(nil), Array) - -# @since 0.5.6 -# -# source://yard//lib/yard/parser/ruby/ruby_parser.rb#78 -YARD::Parser::Ruby::RipperParser::MAPPINGS = T.let(T.unsafe(nil), Hash) - -# @since 0.5.6 -# -# source://yard//lib/yard/parser/ruby/ruby_parser.rb#131 -YARD::Parser::Ruby::RipperParser::REV_MAPPINGS = T.let(T.unsafe(nil), Hash) - -# Ruby 1.9 parser -# -# source://yard//lib/yard/parser/ruby/ruby_parser.rb#12 -class YARD::Parser::Ruby::RubyParser < ::YARD::Parser::Base - # @return [RubyParser] a new instance of RubyParser - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#13 - def initialize(source, filename); end - - # Ruby 1.9 parser - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#21 - def encoding_line; end - - # Ruby 1.9 parser - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#19 - def enumerator; end - - # Ruby 1.9 parser - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#22 - def frozen_string_line; end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#17 - def parse; end - - # Ruby 1.9 parser - # - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#20 - def shebang_line; end - - # source://yard//lib/yard/parser/ruby/ruby_parser.rb#18 - def tokenize; end -end - -# Supports {#each} enumeration over a source's tokens, yielding -# the token and a possible {CodeObjects::Base} associated with the -# constant or identifier token. -# -# source://yard//lib/yard/parser/ruby/token_resolver.rb#8 -class YARD::Parser::Ruby::TokenResolver - include ::Enumerable - include ::YARD::CodeObjects::NamespaceMapper - - # Creates a token resolver for given source. - # - # @param source [String] the source code to tokenize - # @param namespace [CodeObjects::Base] the object/namespace to resolve from - # @raise [ParserSyntaxError] - # @return [TokenResolver] a new instance of TokenResolver - # - # source://yard//lib/yard/parser/ruby/token_resolver.rb#16 - def initialize(source, namespace = T.unsafe(nil)); end - - # Iterates over each token, yielding the token and a possible code - # object that is associated with the token. - # - # @example Yielding code objects - # r = TokenResolver.new("A::B::C") - # r.each do |tok, obj| - # if obj - # puts "#{tok[0]} -> #{obj.path.inspect}" - # else - # puts "No object: #{tok.inspect}" - # end - # end - # - # # Prints: - # # :const -> "A" - # # No object: [:op, "::"] - # # :const -> "A::B" - # # No object: [:op, "::"] - # # :const -> "A::B::C" - # @yieldparam token [Array(Symbol,String,Array(Integer,Integer))] the - # current token object being iterated - # @yieldparam object [CodeObjects::Base, nil] the fully qualified code - # object associated with the current token, or nil if there is no object - # for the yielded token. - # - # source://yard//lib/yard/parser/ruby/token_resolver.rb#46 - def each; end - - protected - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 - def last_sep; end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 - def last_sep=(v); end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 - def next_object; end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 - def next_object=(v); end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 - def object; end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 - def object=(v); end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#94 - def skip_group; end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#95 - def skip_group=(v); end - - private - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#112 - def lookup(toktype, name); end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#134 - def object_resolved_types(obj = T.unsafe(nil)); end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#106 - def pop_state; end - - # source://yard//lib/yard/parser/ruby/token_resolver.rb#102 - def push_state; end - - class << self - # source://yard//lib/yard/parser/ruby/token_resolver.rb#92 - def state_attr(*attrs); end - end -end - -# Responsible for parsing a source file into the namespace. Parsing -# also invokes handlers to process the parsed statements and generate -# any code objects that may be recognized. -# -# == Custom Parsers -# SourceParser allows custom parsers to be registered and called when -# a certain filetype is recognized. To register a parser and hook it -# up to a set of file extensions, call {register_parser_type} -# -# @see register_parser_type -# @see Handlers::Base -# @see CodeObjects::Base -# -# source://yard//lib/yard/parser/source_parser.rb#63 -class YARD::Parser::SourceParser - # @overload initialize - # @return [SourceParser] a new instance of SourceParser - # - # source://yard//lib/yard/parser/source_parser.rb#406 - def initialize(parser_type = T.unsafe(nil), globals1 = T.unsafe(nil), globals2 = T.unsafe(nil)); end - - # @return [String] the contents of the file to be parsed - # @since 0.7.0 - # - # source://yard//lib/yard/parser/source_parser.rb#399 - def contents; end - - # @return [String] the filename being parsed by the parser. - # - # source://yard//lib/yard/parser/source_parser.rb#386 - def file; end - - # @return [String] the filename being parsed by the parser. - # - # source://yard//lib/yard/parser/source_parser.rb#386 - def file=(_arg0); end - - # @return [OpenStruct] an open struct containing arbitrary global state - # shared between files and handlers. - # @since 0.7.0 - # - # source://yard//lib/yard/parser/source_parser.rb#395 - def globals; end - - # The main parser method. This should not be called directly. Instead, - # use the class methods {parse} and {parse_string}. - # - # @param content [String, #read, Object] the source file to parse - # @return [Object, nil] the parser object used to parse the source - # - # source://yard//lib/yard/parser/source_parser.rb#418 - def parse(content = T.unsafe(nil)); end - - # @return [Symbol] the parser type associated with the parser instance. - # This should be set by the {#initialize constructor}. - # - # source://yard//lib/yard/parser/source_parser.rb#390 - def parser_type; end - - # Tokenizes but does not parse the block of code using the current {#parser_type} - # - # @param content [String] the block of code to tokenize - # @return [Array] a list of tokens - # - # source://yard//lib/yard/parser/source_parser.rb#462 - def tokenize(content); end - - private - - # Searches for encoding line and forces encoding - # - # @since 0.5.3 - # - # source://yard//lib/yard/parser/source_parser.rb#471 - def convert_encoding(content); end - - # @since 0.5.6 - # - # source://yard//lib/yard/parser/source_parser.rb#515 - def parser_class; end - - # source://yard//lib/yard/parser/source_parser.rb#500 - def parser_type=(value); end - - # Guesses the parser type to use depending on the file extension. - # - # @param filename [String] the filename to use to guess the parser type - # @return [Symbol] a parser type that matches the filename - # - # source://yard//lib/yard/parser/source_parser.rb#508 - def parser_type_for_filename(filename); end - - # Runs a {Handlers::Processor} object to post process the parsed statements. - # - # @return [void] - # - # source://yard//lib/yard/parser/source_parser.rb#490 - def post_process; end - - class << self - # Registers a callback to be called after an individual file is parsed. - # The block passed to this method will be called on subsequent parse - # calls. - # - # To register a callback that is called after the entire list of files - # is processed, see {after_parse_list}. - # - # @example Printing the length of each file after it is parsed - # SourceParser.after_parse_file do |parser| - # puts "#{parser.file} is #{parser.contents.size} characters" - # end - # YARD.parse('lib/**/*.rb') - # # prints: - # "lib/foo.rb is 1240 characters" - # "lib/foo_bar.rb is 248 characters" - # @return [Proc] the yielded block - # @see before_parse_file - # @see after_parse_list - # @since 0.7.0 - # @yield [parser] the yielded block is called once after each file - # that is parsed. This might happen many times for a single codebase. - # @yieldparam parser [SourceParser] the parser object that parsed - # the file. - # @yieldreturn [void] the return value for the block is ignored. - # - # source://yard//lib/yard/parser/source_parser.rb#324 - def after_parse_file(&block); end - - # @return [Array<Proc>] the list of callbacks to be called after - # parsing a file. Should only be used for testing. - # @since 0.7.0 - # - # source://yard//lib/yard/parser/source_parser.rb#352 - def after_parse_file_callbacks; end - - # Registers a callback to be called after a list of files is parsed - # via {parse}. The block passed to this method will be called on - # subsequent parse calls. - # - # @example Printing results after parsing occurs - # SourceParser.after_parse_list do - # puts "Finished parsing!" - # end - # YARD.parse - # # Prints "Finished parsing!" after parsing files - # @return [Proc] the yielded block - # @see before_parse_list - # @see before_parse_file - # @since 0.7.0 - # @yield [files, globals] the yielded block is called once before - # parsing all files - # @yieldparam files [Array<String>] the list of files that will be parsed. - # @yieldparam globals [OpenStruct] a global structure to store arbitrary - # state for post processing (see {Handlers::Processor#globals}) - # @yieldreturn [void] the return value for the block is ignored. - # - # source://yard//lib/yard/parser/source_parser.rb#258 - def after_parse_list(&block); end - - # @return [Array<Proc>] the list of callbacks to be called after - # parsing a list of files. Should only be used for testing. - # @since 0.7.0 - # - # source://yard//lib/yard/parser/source_parser.rb#338 - def after_parse_list_callbacks; end - - # Registers a callback to be called before an individual file is parsed. - # The block passed to this method will be called on subsequent parse - # calls. - # - # To register a callback that is called before the entire list of files - # is processed, see {before_parse_list}. - # - # @example Cancel parsing of any test_*.rb files - # SourceParser.before_parse_file do |parser| - # return false if parser.file =~ /^test_.+\.rb$/ - # end - # @example Installing a simple callback - # SourceParser.before_parse_file do |parser| - # puts "I'm parsing #{parser.file}" - # end - # YARD.parse('lib/**/*.rb') - # # prints: - # "I'm parsing lib/foo.rb" - # "I'm parsing lib/foo_bar.rb" - # "I'm parsing lib/last_file.rb" - # @return [Proc] the yielded block - # @see before_parse_list - # @see after_parse_file - # @since 0.7.0 - # @yield [parser] the yielded block is called once before each - # file that is parsed. This might happen many times for a single - # codebase. - # @yieldparam parser [SourceParser] the parser object that will {#parse} - # the file. - # @yieldreturn [Boolean] if the block returns +false+, parsing for - # the file is cancelled. - # - # source://yard//lib/yard/parser/source_parser.rb#295 - def before_parse_file(&block); end - - # @return [Array<Proc>] the list of callbacks to be called before - # parsing a file. Should only be used for testing. - # @since 0.7.0 - # - # source://yard//lib/yard/parser/source_parser.rb#345 - def before_parse_file_callbacks; end - - # Registers a callback to be called before a list of files is parsed - # via {parse}. The block passed to this method will be called on - # subsequent parse calls. - # - # @example Setting global state - # SourceParser.before_parse_list do |files, globals| - # globals.method_count = 0 - # end - # SourceParser.after_parse_list do |files, globals| - # puts "Found #{globals.method_count} methods" - # end - # class MyCountHandler < Handlers::Ruby::Base - # handles :def, :defs - # process { globals.method_count += 1 } - # end - # YARD.parse - # # Prints: "Found 37 methods" - # @example Installing a simple callback - # SourceParser.before_parse_list do |files, globals| - # puts "Starting to parse..." - # end - # YARD.parse('lib/**/*.rb') - # # prints "Starting to parse..." - # @example Using a global callback to cancel parsing - # SourceParser.before_parse_list do |files, globals| - # return false if files.include?('foo.rb') - # end - # - # YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method - # YARD.parse('bar.rb') # parses normally - # @return [Proc] the yielded block - # @see before_parse_file - # @see after_parse_list - # @since 0.7.0 - # @yield [files, globals] the yielded block is called once before - # parsing all files - # @yieldparam files [Array<String>] the list of files that will be parsed. - # @yieldparam globals [OpenStruct] a global structure to store arbitrary - # state for post processing (see {Handlers::Processor#globals}) - # @yieldreturn [Boolean] if the block returns +false+, parsing is - # cancelled. - # - # source://yard//lib/yard/parser/source_parser.rb#234 - def before_parse_list(&block); end - - # @return [Array<Proc>] the list of callbacks to be called before - # parsing a list of files. Should only be used for testing. - # @since 0.7.0 - # - # source://yard//lib/yard/parser/source_parser.rb#331 - def before_parse_list_callbacks; end - - # Parses a path or set of paths - # - # @param paths [String, Array<String>] a path, glob, or list of paths to - # parse - # @param excluded [Array<String, Regexp>] a list of excluded path matchers - # @param level [Fixnum] the logger level to use during parsing. See - # {YARD::Logger} - # @return [void] - # - # source://yard//lib/yard/parser/source_parser.rb#99 - def parse(paths = T.unsafe(nil), excluded = T.unsafe(nil), level = T.unsafe(nil)); end - - # Parses a string +content+ - # - # @param content [String] the block of code to parse - # @param ptype [Symbol] the parser type to use. See {parser_type}. - # @return the parser object that was used to parse +content+ - # - # source://yard//lib/yard/parser/source_parser.rb#123 - def parse_string(content, ptype = T.unsafe(nil)); end - - # @return [Symbol] the default parser type (defaults to :ruby) - # - # source://yard//lib/yard/parser/source_parser.rb#85 - def parser_type; end - - # source://yard//lib/yard/parser/source_parser.rb#87 - def parser_type=(value); end - - # @private - # @return [Hash] a list of registered parser type extensions - # @since 0.5.6 - # - # source://yard//lib/yard/parser/source_parser.rb#163 - def parser_type_extensions; end - - # source://yard//lib/yard/parser/source_parser.rb#164 - def parser_type_extensions=(value); end - - # Finds a parser type that is registered for the extension. If no - # type is found, the default Ruby type is returned. - # - # @return [Symbol] the parser type to be used for the extension - # @since 0.5.6 - # - # source://yard//lib/yard/parser/source_parser.rb#171 - def parser_type_for_extension(extension); end - - # @private - # @return [Hash{Symbol=>Object}] a list of registered parser types - # @since 0.5.6 - # - # source://yard//lib/yard/parser/source_parser.rb#157 - def parser_types; end - - # source://yard//lib/yard/parser/source_parser.rb#158 - def parser_types=(value); end - - # Registers a new parser type. - # - # @example Registering a parser for "java" files - # SourceParser.register_parser_type :java, JavaParser, 'java' - # @param type [Symbol] a symbolic name for the parser type - # @param parser_klass [Base] a class that implements parsing and tokenization - # @param extensions [Array<String>, String, Regexp] a list of extensions or a - # regex to match against the file extension - # @return [void] - # @see Parser::Base - # - # source://yard//lib/yard/parser/source_parser.rb#146 - def register_parser_type(type, parser_klass, extensions = T.unsafe(nil)); end - - # Tokenizes but does not parse the block of code - # - # @param content [String] the block of code to tokenize - # @param ptype [Symbol] the parser type to use. See {parser_type}. - # @return [Array] a list of tokens - # - # source://yard//lib/yard/parser/source_parser.rb#132 - def tokenize(content, ptype = T.unsafe(nil)); end - - # Returns the validated parser type. Basically, enforces that :ruby - # type is never set if the Ripper library is not available - # - # @param type [Symbol] the parser type to set - # @private - # @return [Symbol] the validated parser type - # - # source://yard//lib/yard/parser/source_parser.rb#184 - def validated_parser_type(type); end - - private - - # Parses a list of files in a queue. - # - # @param files [Array<String>] a list of files to queue for parsing - # @return [void] - # - # source://yard//lib/yard/parser/source_parser.rb#364 - def parse_in_order(*files); end - end -end - -# The default glob of files to be parsed. -# -# @since 0.9.0 -# -# source://yard//lib/yard/parser/source_parser.rb#70 -YARD::Parser::SourceParser::DEFAULT_PATH_GLOB = T.let(T.unsafe(nil), Array) - -# Byte order marks for various encodings -# -# @since 0.7.0 -# -# source://yard//lib/yard/parser/source_parser.rb#74 -YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS = T.let(T.unsafe(nil), Hash) - -# source://yard//lib/yard/parser/source_parser.rb#65 -YARD::Parser::SourceParser::ENCODING_LINE = T.let(T.unsafe(nil), Regexp) - -# source://yard//lib/yard/parser/source_parser.rb#66 -YARD::Parser::SourceParser::FROZEN_STRING_LINE = T.let(T.unsafe(nil), Regexp) - -# source://yard//lib/yard/parser/source_parser.rb#64 -YARD::Parser::SourceParser::SHEBANG_LINE = T.let(T.unsafe(nil), Regexp) - -# Raised when an object is recognized but cannot be documented. This -# generally occurs when the Ruby syntax used to declare an object is -# too dynamic in nature. -# -# source://yard//lib/yard/parser/source_parser.rb#9 -class YARD::Parser::UndocumentableError < ::RuntimeError; end - -# The root path for YARD source libraries -# -# source://yard//lib/yard.rb#4 -YARD::ROOT = T.let(T.unsafe(nil), String) - -# Holds Rake tasks used by YARD -# -# source://yard//lib/yard/autoload.rb#192 -module YARD::Rake; end - -# The +Registry+ is the centralized data store for all {CodeObjects} created -# during parsing. The storage is a key value store with the object's path -# (see {CodeObjects::Base#path}) as the key and the object itself as the value. -# Object paths must be unique to be stored in the Registry. All lookups for -# objects are done on the singleton Registry instance using the {Registry.at} -# or {Registry.resolve} methods. -# -# == Saving / Loading a Registry -# The registry is saved to a "yardoc file" (actually a directory), which can -# be loaded back to perform any lookups. See {Registry.load!} and -# {Registry.save} for information on saving and loading of a yardoc file. -# -# == Threading Notes -# The registry class is a singleton class that is accessed directly in many -# places across YARD. To mitigate threading issues, YARD (0.6.5+) makes -# the Registry thread local. This means all access to a registry for a specific -# object set must occur in the originating thread. -# -# @example Loading the Registry -# Registry.load!('/path/to/yardocfile') # loads all objects into memory -# Registry.at('YARD::CodeObjects::Base').docstring -# # => "+Base+ is the superclass of all code objects ..." -# @example Getting an object by a specific path -# Registry.at('YARD::CodeObjects::Base#docstring') -# @example Performing a lookup on a method anywhere in the inheritance tree -# Registry.resolve(P('YARD::CodeObjects::Base'), '#docstring', true) -# -# source://yard//lib/yard/registry.rb#32 -module YARD::Registry - extend ::Enumerable - - class << self - # Returns the object at a specific path. - # - # @param path [String, :root] the pathname to look for. If +path+ is +root+, - # returns the {root} object. - # @return [CodeObjects::Base] the object at path - # @return [nil] if no object is found - # - # source://yard//lib/yard/registry.rb#261 - def [](path); end - - # Returns all objects in the registry that match one of the types provided - # in the +types+ list (if +types+ is provided). - # - # @example Returns all objects - # Registry.all - # @example Returns all classes and modules - # Registry.all(:class, :module) - # @param types [Array<Symbol>] an optional list of types to narrow the - # objects down by. Equivalent to performing a select: - # +Registry.all.select {|o| types.include(o.type) }+ - # @return [Array<CodeObjects::Base>] the list of objects found - # @see CodeObjects::Base#type - # - # source://yard//lib/yard/registry.rb#237 - def all(*types); end - - # Returns the object at a specific path. - # - # @param path [String, :root] the pathname to look for. If +path+ is +root+, - # returns the {root} object. - # @return [CodeObjects::Base] the object at path - # @return [nil] if no object is found - # - # source://yard//lib/yard/registry.rb#261 - def at(path); end - - # @param data [String] data to checksum - # @return [String] the SHA1 checksum for data - # - # source://yard//lib/yard/registry.rb#318 - def checksum_for(data); end - - # @return [Hash{String => String}] a set of checksums for files - # - # source://yard//lib/yard/registry.rb#312 - def checksums; end - - # Clears the registry - # - # @return [void] - # - # source://yard//lib/yard/registry.rb#200 - def clear; end - - # Deletes an object from the registry - # - # @param object [CodeObjects::Base] the object to remove - # @return [void] - # - # source://yard//lib/yard/registry.rb#194 - def delete(object); end - - # Deletes the yardoc file from disk - # - # @return [void] - # - # source://yard//lib/yard/registry.rb#176 - def delete_from_disk; end - - # Iterates over {all} with no arguments - # - # source://yard//lib/yard/registry.rb#221 - def each(&block); end - - # The registry singleton instance. - # - # @deprecated use Registry.methodname directly. - # @return [Registry] returns the registry instance - # - # source://yard//lib/yard/registry.rb#363 - def instance; end - - # Loads the registry and/or parses a list of files - # - # @example Loads the yardoc file or parses files 'a', 'b' and 'c' (but not both) - # Registry.load(['a', 'b', 'c']) - # @example Reparses files 'a' and 'b' regardless of whether yardoc file exists - # Registry.load(['a', 'b'], true) - # @param files [String, Array] if +files+ is an Array, it should represent - # a list of files that YARD should parse into the registry. If reload is - # set to false and the yardoc file already exists, these files are skipped. - # If files is a String, it should represent the yardoc file to load - # into the registry. - # @param reparse [Boolean] if reparse is false and a yardoc file already - # exists, any files passed in will be ignored. - # @raise [ArgumentError] if files is not a String or Array - # @return [Registry] the registry object (for chaining) - # - # source://yard//lib/yard/registry.rb#109 - def load(files = T.unsafe(nil), reparse = T.unsafe(nil)); end - - # Loads a yardoc file and forces all objects cached on disk into - # memory. Equivalent to calling {load_yardoc} followed by {load_all} - # - # @param file [String] the yardoc file to load - # @return [Registry] the registry object (for chaining) - # @see #load_yardoc - # @see #load_all - # @since 0.5.1 - # - # source://yard//lib/yard/registry.rb#144 - def load!(file = T.unsafe(nil)); end - - # Forces all objects cached on disk into memory - # - # @example Loads all objects from disk - # Registry.load - # Registry.all.count #=> 0 - # Registry.load_all - # Registry.all.count #=> 17 - # @return [Registry] the registry object (for chaining) - # @since 0.5.1 - # - # source://yard//lib/yard/registry.rb#159 - def load_all; end - - # Loads a yardoc file directly - # - # @param file [String] the yardoc file to load. - # @return [Registry] the registry object (for chaining) - # - # source://yard//lib/yard/registry.rb#130 - def load_yardoc(file = T.unsafe(nil)); end - - # @param name [String] the locale name. - # @return [I18n::Locale] the locale object for +name+. - # @since 0.8.3 - # - # source://yard//lib/yard/registry.rb#271 - def locale(name); end - - # Creates a pessmistic transactional lock on the database for writing. - # Use with {YARD.parse} to ensure the database is not written multiple - # times. - # - # @see locked_for_writing? - # - # source://yard//lib/yard/registry.rb#209 - def lock_for_writing(file = T.unsafe(nil), &block); end - - # @return [Boolean] whether the database is currently locked for writing - # - # source://yard//lib/yard/registry.rb#214 - def locked_for_writing?(file = T.unsafe(nil)); end - - # Returns the paths of all of the objects in the registry. - # - # @param reload [Boolean] whether to load entire database - # @return [Array<String>] all of the paths in the registry. - # - # source://yard//lib/yard/registry.rb#252 - def paths(reload = T.unsafe(nil)); end - - # Gets/sets the directory that has LANG.po files - # - # @return [String] the directory that has .po files - # - # source://yard//lib/yard/registry.rb#353 - def po_dir; end - - # Gets/sets the directory that has LANG.po files - # - # @return [String] the directory that has .po files - # - # source://yard//lib/yard/registry.rb#351 - def po_dir=(dir); end - - # The assumed types of a list of paths. This method is used by CodeObjects::Base - # - # @deprecated The registry no longer globally tracks proxy types. - # @private - # @return [{String => Symbol}] a set of unresolved paths and their assumed type - # - # source://yard//lib/yard/registry.rb#341 - def proxy_types; end - - # Registers a new object with the registry - # - # @param object [CodeObjects::Base] the object to register - # @return [CodeObjects::Base] the registered object - # - # source://yard//lib/yard/registry.rb#186 - def register(object); end - - # Attempts to find an object by name starting at +namespace+, performing - # a lookup similar to Ruby's method of resolving a constant in a namespace. - # - # @example Looks for a constant in the root namespace - # Registry.resolve(nil, 'CONSTANT') - # @example Looks for a class method respecting the inheritance tree - # Registry.resolve(myclass, 'mymethod', true) - # @example Looks for instance method #reverse starting from A::B::C - # Registry.resolve(P("A::B::C"), "#reverse") - # @example Looks for a constant but returns a proxy if not found - # Registry.resolve(P('A::B::C'), 'D', false, true) # => #<yardoc proxy A::B::C::D> - # @example Looks for a complex path from a namespace - # Registry.resolve(P('A::B'), 'B::D') # => #<yardoc class A::B::D> - # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass) - # when performing name resolution if set to +true+. - # @param namespace [CodeObjects::NamespaceObject, nil] the starting namespace - # (module or class). If +nil+ or +:root+, starts from the {root} object. - # @param name [String, Symbol] the name (or complex path) to look for from - # +namespace+. - # @param proxy_fallback [Boolean] If +true+, returns a proxy representing - # the unresolved path (namespace + name) if no object is found. - # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved - # object must be equal to. No type checking if nil. - # @return [CodeObjects::Base] the object if it is found - # @return [CodeObjects::Proxy] a Proxy representing the object if - # +proxy_fallback+ is +true+. - # @return [nil] if +proxy_fallback+ is +false+ and no object was found. - # @see P - # - # source://yard//lib/yard/registry.rb#303 - def resolve(namespace, name, inheritance = T.unsafe(nil), proxy_fallback = T.unsafe(nil), type = T.unsafe(nil)); end - - # The root namespace object. - # - # @return [CodeObjects::RootObject] the root object in the namespace - # - # source://yard//lib/yard/registry.rb#266 - def root; end - - # Saves the registry to +file+ - # - # @param file [String] the yardoc file to save to - # @return [Boolean] true if the file was saved - # - # source://yard//lib/yard/registry.rb#170 - def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end - - # Whether or not the Registry storage should load everything into a - # single object database (for disk efficiency), or spread them out - # (for load time efficiency). - # - # @note Setting this attribute to nil will offload the decision to - # the {RegistryStore storage adapter}. - # @return [Boolean, nil] if this value is set to nil, the storage - # adapter will decide how to store the data. - # - # source://yard//lib/yard/registry.rb#335 - def single_object_db; end - - # Whether or not the Registry storage should load everything into a - # single object database (for disk efficiency), or spread them out - # (for load time efficiency). - # - # @note Setting this attribute to nil will offload the decision to - # the {RegistryStore storage adapter}. - # @return [Boolean, nil] if this value is set to nil, the storage - # adapter will decide how to store the data. - # - # source://yard//lib/yard/registry.rb#334 - def single_object_db=(v); end - - # Gets/sets the yardoc filename - # - # @return [String] the yardoc filename - # @see DEFAULT_YARDOC_FILE - # - # source://yard//lib/yard/registry.rb#88 - def yardoc_file; end - - # Gets/sets the yardoc filename - # - # @return [String] the yardoc filename - # @see DEFAULT_YARDOC_FILE - # - # source://yard//lib/yard/registry.rb#86 - def yardoc_file=(v); end - - # Returns the .yardoc file associated with a gem. - # - # @param gem [String] the name of the gem to search for - # @param ver_require [String] an optional Gem version requirement - # @param for_writing [Boolean] whether or not the method should search - # for writable locations - # @return [String] if +for_writing+ is set to +true+, returns the best - # location suitable to write the .yardoc file. Otherwise, the first - # existing location associated with the gem's .yardoc file. - # @return [nil] if +for_writing+ is set to false and no yardoc file - # is found, returns nil. - # - # source://yard//lib/yard/registry.rb#53 - def yardoc_file_for_gem(gem, ver_require = T.unsafe(nil), for_writing = T.unsafe(nil)); end - - private - - # source://yard//lib/yard/registry.rb#390 - def global_yardoc_file(spec, for_writing = T.unsafe(nil)); end - - # source://yard//lib/yard/registry.rb#410 - def local_yardoc_file(spec, for_writing = T.unsafe(nil)); end - - # source://yard//lib/yard/registry.rb#403 - def old_global_yardoc_file(spec, for_writing = T.unsafe(nil)); end - - # Attempts to resolve a name in a namespace - # - # @param namespace [CodeObjects::NamespaceObject] the starting namespace - # @param name [String] the name to look for - # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved - # object must be equal to - # - # source://yard//lib/yard/registry.rb#375 - def partial_resolve(namespace, name, type = T.unsafe(nil)); end - - # @since 0.9.1 - # - # source://yard//lib/yard/registry.rb#434 - def thread_local_resolver; end - - # @since 0.6.5 - # - # source://yard//lib/yard/registry.rb#424 - def thread_local_store; end - - # @since 0.6.5 - # - # source://yard//lib/yard/registry.rb#429 - def thread_local_store=(value); end - end -end - -# source://yard//lib/yard/registry.rb#35 -YARD::Registry::DEFAULT_PO_DIR = T.let(T.unsafe(nil), String) - -# source://yard//lib/yard/registry.rb#33 -YARD::Registry::DEFAULT_YARDOC_FILE = T.let(T.unsafe(nil), String) - -# source://yard//lib/yard/registry.rb#34 -YARD::Registry::LOCAL_YARDOC_INDEX = T.let(T.unsafe(nil), String) - -# Handles all logic for complex lexical and inherited object resolution. -# Used by {Registry.resolve}, so there is no need to use this class -# directly. -# -# @see Registry.resolve -# @since 0.9.1 -# -# source://yard//lib/yard/registry_resolver.rb#9 -class YARD::RegistryResolver - include ::YARD::CodeObjects::NamespaceMapper - - # Creates a new resolver object for a registry. - # - # @param registry [Registry] only set this if customizing the registry - # object - # @return [RegistryResolver] a new instance of RegistryResolver - # @since 0.9.1 - # - # source://yard//lib/yard/registry_resolver.rb#16 - def initialize(registry = T.unsafe(nil)); end - - # Performs a lookup on a given path in the registry. Resolution will occur - # in a similar way to standard Ruby identifier resolution, doing lexical - # lookup, as well as (optionally) through the inheritance chain. A proxy - # object can be returned if the lookup fails for future resolution. The - # proxy will be type hinted with the +type+ used in the original lookup. - # - # @example A lookup on a method through the inheritance tree - # resolver.lookup_by_math("A::B#foo", inheritance: true) - # @example A lookup from root - # resolver.lookup_by_path("A::B::C") - # @example A lookup from the A::B namespace - # resolver.lookup_by_path("C", namespace: P("A::B")) - # @option opts - # @option opts - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @return [CodeObjects::Base, CodeObjects::Proxy, nil] the first object - # that matches the path lookup. If proxy_fallback is provided, a proxy - # object will be returned in the event of no match, otherwise nil will - # be returned. - # @since 0.9.1 - # - # source://yard//lib/yard/registry_resolver.rb#50 - def lookup_by_path(path, opts = T.unsafe(nil)); end - - private - - # Collects and returns all inherited namespaces for a given object - # - # @since 0.9.1 - # - # source://yard//lib/yard/registry_resolver.rb#181 - def collect_namespaces(object); end - - # Performs a lexical lookup from a namespace for a path and a type hint. - # - # @since 0.9.1 - # - # source://yard//lib/yard/registry_resolver.rb#104 - def lookup_path_direct(namespace, path, type); end - - # Performs a lookup through the inheritance chain on a path with a type hint. - # - # @since 0.9.1 - # - # source://yard//lib/yard/registry_resolver.rb#121 - def lookup_path_inherited(namespace, path, type); end - - # @return [Regexp] the regexp that can be used to split a string on all - # occurrences of separator tokens - # @since 0.9.1 - # - # source://yard//lib/yard/registry_resolver.rb#206 - def split_on_separators_match; end - - # @return [Regexp] the regexp match of the default separator - # @since 0.9.1 - # - # source://yard//lib/yard/registry_resolver.rb#194 - def starts_with_default_separator_match; end - - # @return [Regexp] the regexp that matches strings starting with - # a separator - # @since 0.9.1 - # - # source://yard//lib/yard/registry_resolver.rb#200 - def starts_with_separator_match; end - - # return [Boolean] if the obj's type matches the provided type. - # - # @since 0.9.1 - # - # source://yard//lib/yard/registry_resolver.rb#99 - def validate(obj, type); end -end - -# The data store for the {Registry}. -# -# @see Registry -# @see Serializers::YardocSerializer -# -# source://yard//lib/yard/registry_store.rb#9 -class YARD::RegistryStore - # @return [RegistryStore] a new instance of RegistryStore - # - # source://yard//lib/yard/registry_store.rb#14 - def initialize; end - - # Gets a {CodeObjects::Base} from the store - # - # @param key [String, Symbol] the path name of the object to look for. - # If it is empty or :root, returns the {#root} object. - # @return [CodeObjects::Base, nil] a code object or nil if none is found - # - # source://yard//lib/yard/registry_store.rb#33 - def [](key); end - - # Associates an object with a path - # - # @param key [String, Symbol] the path name (:root or '' for root object) - # @param value [CodeObjects::Base] the object to store - # @return [CodeObjects::Base] returns +value+ - # - # source://yard//lib/yard/registry_store.rb#55 - def []=(key, value); end - - # Returns the value of attribute checksums. - # - # source://yard//lib/yard/registry_store.rb#12 - def checksums; end - - # Deletes an object at a given path - # - # @param key [#to_sym] the key to delete - # @return [void] - # - # source://yard//lib/yard/registry_store.rb#75 - def delete(key); end - - # Deletes the .yardoc database on disk - # - # @param force [Boolean] if force is not set to true, the file/directory - # will only be removed if it ends with .yardoc. This helps with - # cases where the directory might have been named incorrectly. - # @return [Boolean] true if the .yardoc database was deleted, false - # otherwise. - # - # source://yard//lib/yard/registry_store.rb#218 - def destroy(force = T.unsafe(nil)); end - - # Returns the value of attribute file. - # - # source://yard//lib/yard/registry_store.rb#12 - def file; end - - # Gets a {CodeObjects::Base} from the store - # - # @param key [String, Symbol] the path name of the object to look for. - # If it is empty or :root, returns the {#root} object. - # @return [CodeObjects::Base, nil] a code object or nil if none is found - # - # source://yard//lib/yard/registry_store.rb#33 - def get(key); end - - # Gets all path names from the store. Loads the entire database - # if +reload+ is +true+ - # - # @param reload [Boolean] if false, does not load the entire database - # before a lookup. - # @return [Array<Symbol>] the path names of all the code objects - # - # source://yard//lib/yard/registry_store.rb#88 - def keys(reload = T.unsafe(nil)); end - - # @param file [String, nil] the name of the yardoc db to load - # @return [Boolean] whether the database was loaded - # - # source://yard//lib/yard/registry_store.rb#128 - def load(file = T.unsafe(nil)); end - - # Loads the .yardoc file and loads all cached objects into memory - # automatically. - # - # @param file [String, nil] the name of the yardoc db to load - # @return [Boolean] whether the database was loaded - # @see #load_all - # @since 0.5.1 - # - # source://yard//lib/yard/registry_store.rb#142 - def load!(file = T.unsafe(nil)); end - - # Loads all cached objects into memory - # - # @return [void] - # - # source://yard//lib/yard/registry_store.rb#153 - def load_all; end - - # @param name [String] the locale name. - # @return [I18n::Locale] the locale object for +name+. - # @since 0.8.3 - # - # source://yard//lib/yard/registry_store.rb#122 - def locale(name); end - - # Creates a pessmistic transactional lock on the database for writing. - # Use with {YARD.parse} to ensure the database is not written multiple - # times. - # - # @param file [String] if supplied, the path to the database - # @see #locked_for_writing? - # - # source://yard//lib/yard/registry_store.rb#201 - def lock_for_writing(file = T.unsafe(nil), &block); end - - # @param file [String] if supplied, the path to the database - # @return [Boolean] whether the database is currently locked for writing - # - # source://yard//lib/yard/registry_store.rb#207 - def locked_for_writing?(file = T.unsafe(nil)); end - - # @param type [Symbol] the type to look for - # @return [Array<String>] a list of object paths with a given - # {CodeObjects::Base#type} - # @since 0.8.0 - # - # source://yard//lib/yard/registry_store.rb#102 - def paths_for_type(type, reload = T.unsafe(nil)); end - - # @deprecated The registry no longer tracks proxy types - # - # source://yard//lib/yard/registry_store.rb#11 - def proxy_types; end - - # Associates an object with a path - # - # @param key [String, Symbol] the path name (:root or '' for root object) - # @param value [CodeObjects::Base] the object to store - # @return [CodeObjects::Base] returns +value+ - # - # source://yard//lib/yard/registry_store.rb#55 - def put(key, value); end - - # @return [CodeObjects::RootObject] the root object - # - # source://yard//lib/yard/registry_store.rb#117 - def root; end - - # Saves the database to disk - # - # @param merge [Boolean] if true, merges the data in memory with the - # data on disk, otherwise the data on disk is deleted. - # @param file [String, nil] if supplied, the name of the file to save to - # @return [Boolean] whether the database was saved - # - # source://yard//lib/yard/registry_store.rb#177 - def save(merge = T.unsafe(nil), file = T.unsafe(nil)); end - - # Gets all code objects from the store. Loads the entire database - # if +reload+ is +true+ - # - # @param reload [Boolean] if false, does not load the entire database - # before a lookup. - # @return [Array<CodeObjects::Base>] all the code objects - # - # source://yard//lib/yard/registry_store.rb#96 - def values(reload = T.unsafe(nil)); end - - # @param type [Symbol] the type to look for - # @return [Array<CodeObjects::Base>] a list of objects with a given - # {CodeObjects::Base#type} - # @since 0.8.0 - # - # source://yard//lib/yard/registry_store.rb#111 - def values_for_type(type, reload = T.unsafe(nil)); end - - protected - - # source://yard//lib/yard/registry_store.rb#243 - def checksums_path; end - - # source://yard//lib/yard/registry_store.rb#251 - def load_yardoc; end - - # source://yard//lib/yard/registry_store.rb#247 - def object_types_path; end - - # source://yard//lib/yard/registry_store.rb#234 - def objects_path; end - - # @deprecated The registry no longer tracks proxy types - # - # source://yard//lib/yard/registry_store.rb#239 - def proxy_types_path; end - - private - - # source://yard//lib/yard/registry_store.rb#319 - def all_disk_objects; end - - # source://yard//lib/yard/registry_store.rb#291 - def load_checksums; end - - # source://yard//lib/yard/registry_store.rb#313 - def load_locale(name); end - - # source://yard//lib/yard/registry_store.rb#281 - def load_object_types; end - - # @deprecated The registry no longer tracks proxy types - # - # source://yard//lib/yard/registry_store.rb#276 - def load_proxy_types; end - - # source://yard//lib/yard/registry_store.rb#299 - def load_root; end - - # source://yard//lib/yard/registry_store.rb#271 - def load_yardoc_old; end - - # source://yard//lib/yard/registry_store.rb#332 - def write_checksums; end - - # source://yard//lib/yard/registry_store.rb#338 - def write_complete_lock; end - - # source://yard//lib/yard/registry_store.rb#328 - def write_object_types; end - - # @deprecated The registry no longer tracks proxy types - # - # source://yard//lib/yard/registry_store.rb#324 - def write_proxy_types; end -end - -# Namespace for components that serialize to various endpoints -# -# source://yard//lib/yard/autoload.rb#196 -module YARD::Serializers; end - -# The abstract base serializer. Serializers allow templates to be -# rendered to various endpoints. For instance, a {FileSystemSerializer} -# would allow template contents to be written to the filesystem -# -# To implement a custom serializer, override the following methods: -# * {#serialize} -# * {#serialized_path} -# -# Optionally, a serializer can implement before and after filters: -# * {#before_serialize} -# * {#after_serialize} -# -# @abstract Override this class to implement a custom serializer. -# -# source://yard//lib/yard/serializers/base.rb#17 -class YARD::Serializers::Base - # Creates a new serializer with options - # - # @param opts [Hash] the options to assign to {#options} - # @return [Base] a new instance of Base - # - # source://yard//lib/yard/serializers/base.rb#28 - def initialize(opts = T.unsafe(nil)); end - - # Called after serialization. - # - # @abstract Should run code after serialization. - # @param data [String] the data that was serialized. - # @return [void] - # - # source://yard//lib/yard/serializers/base.rb#80 - def after_serialize(data); end - - # Called before serialization. - # - # @abstract Should run code before serialization. Should return false - # if serialization should not occur. - # @return [Boolean] whether or not serialization should occur - # - # source://yard//lib/yard/serializers/base.rb#73 - def before_serialize; end - - # Returns whether an object has been serialized - # - # @abstract This method should return whether the endpoint already exists. - # For instance, a file system serializer would check if the file exists - # on disk. You will most likely use +#basepath+ and {#serialized_path} to - # get the endpoint's location. - # @param object [CodeObjects::Base] the object to check existence of - # @return [Boolean] whether the endpoint exists. - # @since 0.6.0 - # - # source://yard//lib/yard/serializers/base.rb#62 - def exists?(object); end - - # All serializer options are saved so they can be passed to other serializers. - # - # @return [SymbolHash] the serializer options - # - # source://yard//lib/yard/serializers/base.rb#21 - def options; end - - # Serializes an object. - # - # @abstract This method should implement the logic that serializes - # +data+ to the respective endpoint. This method should also call - # the before and after callbacks {#before_serialize} and {#after_serialize} - # @param object [CodeObjects::Base, String] the object to serialize the - # data for. The object can also be a string (for non-object serialization) - # @param data [String] the contents that should be serialized - # - # source://yard//lib/yard/serializers/base.rb#42 - def serialize(object, data); end - - # The serialized path of an object - # - # @abstract This method should return the path of the object on the - # endpoint. For instance, for a file serializer, this should return - # the filename that represents the object on disk. - # @param object [CodeObjects::Base] the object to return a path for - # @return [String] the serialized path of an object - # - # source://yard//lib/yard/serializers/base.rb#51 - def serialized_path(object); end -end - -# Implements a serializer that reads from and writes to the filesystem. -# -# source://yard//lib/yard/serializers/file_system_serializer.rb#5 -class YARD::Serializers::FileSystemSerializer < ::YARD::Serializers::Base - # Creates a new FileSystemSerializer with options - # - # @option opts - # @option opts - # @param opts [Hash] a customizable set of options - # @return [FileSystemSerializer] a new instance of FileSystemSerializer - # - # source://yard//lib/yard/serializers/file_system_serializer.rb#28 - def initialize(opts = T.unsafe(nil)); end - - # The base path to write data to. - # - # @return [String] a base path - # - # source://yard//lib/yard/serializers/file_system_serializer.rb#8 - def basepath; end - - # source://yard//lib/yard/serializers/file_system_serializer.rb#10 - def basepath=(value); end - - # Checks the disk for an object and returns whether it was serialized. - # - # @param object [CodeObjects::Base] the object to check - # @return [Boolean] whether an object has been serialized to disk - # - # source://yard//lib/yard/serializers/file_system_serializer.rb#71 - def exists?(object); end - - # The extension of the filename (defaults to +html+) - # - # @return [String] the extension of the file. Empty string for no extension. - # - # source://yard//lib/yard/serializers/file_system_serializer.rb#17 - def extension; end - - # source://yard//lib/yard/serializers/file_system_serializer.rb#19 - def extension=(value); end - - # Serializes object with data to its serialized path (prefixed by the +#basepath+). - # - # @return [String] the written data (for chaining) - # - # source://yard//lib/yard/serializers/file_system_serializer.rb#38 - def serialize(object, data); end - - # Implements the serialized path of a code object. - # - # @param object [CodeObjects::Base, CodeObjects::ExtraFileObject, String] the object to get a path for. The path of a string is the string itself. - # @return [String] if object is a String, returns - # object, otherwise the path on disk (without the basepath). - # - # source://yard//lib/yard/serializers/file_system_serializer.rb#50 - def serialized_path(object); end - - private - - # Builds a filename mapping from object paths to filesystem path names. - # Needed to handle case sensitive YARD objects mapped into a case - # insensitive filesystem. Uses with {#mapped_name} to determine the - # mapping name for a given object. - # - # @note In order to use filesystem name mapping, you must initialize - # the serializer object after preparing the {YARD::Registry}. - # - # source://yard//lib/yard/serializers/file_system_serializer.rb#84 - def build_filename_map; end - - # Remove special chars from filenames. - # Windows disallows \ / : * ? " < > | but we will just remove any - # non alphanumeric (plus period, underscore and dash). - # - # source://yard//lib/yard/serializers/file_system_serializer.rb#111 - def encode_path_components(*components); end - - # @return [String] the filesystem mapped name of a given object. - # - # source://yard//lib/yard/serializers/file_system_serializer.rb#102 - def mapped_name(object); end -end - -# Serializes an object to a process (like less) -# -# @example Serializing to a pager (less) -# serializer = ProcessSerializer.new('less') -# serializer.serialize(object, "data!") -# -# source://yard//lib/yard/serializers/process_serializer.rb#9 -class YARD::Serializers::ProcessSerializer < ::YARD::Serializers::Base - # Creates a new ProcessSerializer for the shell command +cmd+ - # - # @param cmd [String] the command that will accept data on stdin - # @return [ProcessSerializer] a new instance of ProcessSerializer - # - # source://yard//lib/yard/serializers/process_serializer.rb#13 - def initialize(cmd); end - - # Overrides serialize behaviour and writes data to standard input - # of the associated command - # - # source://yard//lib/yard/serializers/process_serializer.rb#19 - def serialize(_object, data); end -end - -# A serializer that writes data to standard output. -# -# source://yard//lib/yard/serializers/stdout_serializer.rb#5 -class YARD::Serializers::StdoutSerializer < ::YARD::Serializers::Base - # Creates a serializer to print text to stdout - # - # @param wrap [Fixnum, nil] if wrap is a number, wraps text to +wrap+ - # columns, otherwise no wrapping is done. - # @return [StdoutSerializer] a new instance of StdoutSerializer - # - # source://yard//lib/yard/serializers/stdout_serializer.rb#10 - def initialize(wrap = T.unsafe(nil)); end - - # Overrides serialize behaviour to write data to standard output - # - # source://yard//lib/yard/serializers/stdout_serializer.rb#15 - def serialize(_object, data); end - - private - - # Wraps text to a specific column length - # - # @param text [String] the text to wrap - # @param _length [Fixnum] the column length to wrap to - # @return [String] the wrapped text - # - # source://yard//lib/yard/serializers/stdout_serializer.rb#26 - def word_wrap(text, _length = T.unsafe(nil)); end -end - -# source://yard//lib/yard/serializers/yardoc_serializer.rb#32 -class YARD::Serializers::YardocSerializer < ::YARD::Serializers::FileSystemSerializer - # @return [YardocSerializer] a new instance of YardocSerializer - # - # source://yard//lib/yard/serializers/yardoc_serializer.rb#33 - def initialize(yfile); end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#40 - def checksums_path; end - - # @return [Boolean] - # - # source://yard//lib/yard/serializers/yardoc_serializer.rb#45 - def complete?; end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#42 - def complete_lock_path; end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#101 - def deserialize(path, is_path = T.unsafe(nil)); end - - # Creates a pessmistic transactional lock on the database for writing. - # Use with {YARD.parse} to ensure the database is not written multiple - # times. - # - # @see #locked_for_writing? - # - # source://yard//lib/yard/serializers/yardoc_serializer.rb#54 - def lock_for_writing; end - - # @return [Boolean] whether the database is currently locked for writing - # - # source://yard//lib/yard/serializers/yardoc_serializer.rb#62 - def locked_for_writing?; end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#41 - def object_types_path; end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#37 - def objects_path; end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#43 - def processing_path; end - - # @deprecated The registry no longer tracks proxy types - # - # source://yard//lib/yard/serializers/yardoc_serializer.rb#39 - def proxy_types_path; end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#93 - def serialize(object); end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#66 - def serialized_path(object); end - - private - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#114 - def dump(object); end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#119 - def internal_dump(object, first_object = T.unsafe(nil)); end -end - -# Namespace for classes and modules that handle serving documentation over HTTP -# -# == Implementing a Custom Server -# To customize the YARD server, see the {Adapter} and {Router} classes. -# -# == Rack Middleware -# If you want to use the YARD server as a Rack middleware, see the documentation -# in {RackMiddleware}. -# -# @since 0.6.0 -# -# source://yard//lib/yard/autoload.rb#214 -module YARD::Server - class << self - # Registers a static path to be used in static asset lookup. - # - # @param path [String] the pathname to register - # @return [void] - # @since 0.6.2 - # - # source://yard//lib/yard/server.rb#8 - def register_static_path(path); end - end -end - -# This class implements the bridge between the {Router} and the server -# backend for a specific server type. YARD implements concrete adapters -# for WEBrick and Rack respectively, though other adapters can be made -# for other server architectures. -# -# == Subclassing Notes -# To create a concrete adapter class, implement the {#start} method to -# initiate the server backend. -# -# @abstract -# @since 0.6.0 -# -# source://yard//lib/yard/server/adapter.rb#23 -class YARD::Server::Adapter - # Creates a new adapter object - # - # @option opts - # @option opts - # @option opts - # @param libs [Hash{String=>Array<LibraryVersion>}] a list of libraries, - # see {#libraries} for formulating this list. - # @param opts [Hash] extra options to pass to the adapter - # @return [Adapter] a new instance of Adapter - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#71 - def initialize(libs, opts = T.unsafe(nil), server_opts = T.unsafe(nil)); end - - # Adds a library to the {#libraries} mapping for a given library object. - # - # @example Adding a new library to an adapter - # adapter.add_library LibraryVersion.new('mylib', '1.0', '/path/to/.yardoc') - # @param library [LibraryVersion] a library to add - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#88 - def add_library(library); end - - # @return [String] the location where static files are located, if any. - # To set this field on initialization, pass +:DocumentRoot+ to the - # +server_opts+ argument in {#initialize} - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#27 - def document_root; end - - # @return [String] the location where static files are located, if any. - # To set this field on initialization, pass +:DocumentRoot+ to the - # +server_opts+ argument in {#initialize} - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#27 - def document_root=(_arg0); end - - # @return [Hash{String=>Array<LibraryVersion>}] a map of libraries. - # @see LibraryVersion LibraryVersion for information on building a list of libraries - # @see #add_library - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#32 - def libraries; end - - # @return [Hash{String=>Array<LibraryVersion>}] a map of libraries. - # @see LibraryVersion LibraryVersion for information on building a list of libraries - # @see #add_library - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#32 - def libraries=(_arg0); end - - # @return [Hash] options passed and processed by adapters. The actual - # options mostly depend on the adapters themselves. - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#36 - def options; end - - # @return [Hash] options passed and processed by adapters. The actual - # options mostly depend on the adapters themselves. - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#36 - def options=(_arg0); end - - # @return [Router] the router object used to route URLs to commands - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#43 - def router; end - - # @return [Router] the router object used to route URLs to commands - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#43 - def router=(_arg0); end - - # @return [Hash] a set of options to pass to the server backend. Note - # that +:DocumentRoot+ also sets the {#document_root}. - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#40 - def server_options; end - - # @return [Hash] a set of options to pass to the server backend. Note - # that +:DocumentRoot+ also sets the {#document_root}. - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#40 - def server_options=(_arg0); end - - # Implement this method to connect your adapter to your server. - # - # @abstract - # @raise [NotImplementedError] - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#95 - def start; end - - class << self - # Performs any global initialization for the adapter. - # - # @note If you subclass this method, make sure to call +super+. - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#48 - def setup; end - - # Performs any global shutdown procedures for the adapter. - # - # @note If you subclass this method, make sure to call +super+. - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/server/adapter.rb#56 - def shutdown; end - end -end - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#16 -YARD::Server::CR = T.let(T.unsafe(nil), String) - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#18 -YARD::Server::CRLF = T.let(T.unsafe(nil), String) - -# Commands implement specific kinds of server responses which are routed -# to by the {Router} class. To implement a custom command, subclass {Commands::Base}. -# -# @since 0.6.0 -# -# source://yard//lib/yard/autoload.rb#219 -module YARD::Server::Commands; end - -# This is the base command class used to implement custom commands for -# a server. A command will be routed to by the {Router} class and return -# a Rack-style response. -# -# == Attribute Initializers -# All attributes can be initialized via options passed into the {#initialize} -# method. When creating a custom command, the {Adapter#options} will -# automatically be mapped to attributes by the same name on your class. -# -# class MyCommand < Base -# attr_accessor :myattr -# end -# -# Adapter.new(libs, {:myattr => 'foo'}).start -# -# # when a request comes in, cmd.myattr == 'foo' -# -# == Subclassing Notes -# To implement a custom command, override the {#run} method, not {#call}. -# In your implementation, you should set the body and status for requests. -# See details in the +#run+ method documentation. -# -# Note that if your command deals directly with libraries, you should -# consider subclassing the more specific {LibraryCommand} class instead. -# -# @abstract -# @see #run -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/base.rb#34 -class YARD::Server::Commands::Base - # Creates a new command object, setting attributes named by keys - # in the options hash. After initialization, the options hash - # is saved in {#command_options} for further inspection. - # - # @example Creating a Command - # cmd = DisplayObjectCommand.new(:caching => true, :library => mylib) - # cmd.library # => mylib - # cmd.command_options # => {:caching => true, :library => mylib} - # @param opts [Hash] the options hash, saved to {#command_options} - # after initialization. - # @return [Base] a new instance of Base - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#75 - def initialize(opts = T.unsafe(nil)); end - - # @return [Adapter] the server adapter - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#41 - def adapter; end - - # @return [Adapter] the server adapter - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#41 - def adapter=(_arg0); end - - # @return [String] the response body. Defaults to empty string. - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#61 - def body; end - - # @return [String] the response body. Defaults to empty string. - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#61 - def body=(_arg0); end - - # @return [Boolean] whether to cache - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#44 - def caching; end - - # @return [Boolean] whether to cache - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#44 - def caching=(_arg0); end - - # The main method called by a router with a request object. - # - # @note This command should not be overridden by subclasses. Implement - # the callback method {#run} instead. - # @param request [Adapter Dependent] the request object - # @return [Array(Numeric,Hash,Array<String>)] a Rack-style response - # of status, headers, and body wrapped in an array. - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#89 - def call(request); end - - # @return [Hash] the options passed to the command's constructor - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#38 - def command_options; end - - # @return [Hash] the options passed to the command's constructor - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#38 - def command_options=(_arg0); end - - # @return [Hash{String => String}] response headers - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#55 - def headers; end - - # @return [Hash{String => String}] response headers - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#55 - def headers=(_arg0); end - - # @return [String] the path after the command base URI - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#52 - def path; end - - # @return [String] the path after the command base URI - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#52 - def path=(_arg0); end - - # @return [Rack::Request] request object - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#49 - def request; end - - # @return [Rack::Request] request object - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#49 - def request=(_arg0); end - - # Subclass this method to implement a custom command. This method - # should set the {#status} and {#body}, and optionally modify the - # {#headers}. Note that +#status+ defaults to 200. - # - # @abstract - # @example A custom command - # class ErrorCommand < Base - # def run - # self.body = 'ERROR! The System is down!' - # self.status = 500 - # self.headers['Content-Type'] = 'text/plain' - # end - # end - # @raise [NotImplementedError] - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#128 - def run; end - - # @return [Numeric] status code. Defaults to 200 per request - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#58 - def status; end - - # @return [Numeric] status code. Defaults to 200 per request - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#58 - def status=(_arg0); end - - protected - - # Override this method to implement custom caching mechanisms for - # - # @example Caching to memory - # $memory_cache = {} - # def cache(data) - # $memory_cache[path] = data - # end - # @param data [String] the data to cache - # @return [String] the same cached data (for chaining) - # @see StaticCaching - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#165 - def cache(data); end - - # Sets the body and headers for a 404 response. Does not modify the - # body if already set. - # - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#180 - def not_found; end - - # Sets the headers and status code for a redirection to a given URL - # - # @param url [String] the URL to redirect to - # @raise [FinishRequest] causes the request to terminate. - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#192 - def redirect(url); end - - # Renders a specific object if provided, or a regular template rendering - # if object is not provided. - # - # @param object [CodeObjects::Base, nil] calls {CodeObjects::Base#format} if - # an object is provided, or {Templates::Engine.render} if object is nil. Both - # receive +#options+ as an argument. - # @return [String] the resulting output to display - # @since 0.6.0 - # @todo This method is dependent on +#options+, it should be in {LibraryCommand}. - # - # source://yard//lib/yard/server/commands/base.rb#144 - def render(object = T.unsafe(nil)); end - - private - - # Add a conservative cache control policy to reduce load on - # requests served with "?1234567890" style timestamp query strings. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/base.rb#202 - def add_cache_control; end -end - -# Displays a README or extra file. -# -# @since 0.6.0 -# @todo Implement better support for detecting binary (image) filetypes -# -# source://yard//lib/yard/server/commands/display_file_command.rb#8 -class YARD::Server::Commands::DisplayFileCommand < ::YARD::Server::Commands::LibraryCommand - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/display_file_command.rb#9 - def index; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/display_file_command.rb#9 - def index=(_arg0); end - - # @raise [NotFoundError] - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/display_file_command.rb#11 - def run; end -end - -# Displays documentation for a specific object identified by the path -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/display_object_command.rb#6 -class YARD::Server::Commands::DisplayObjectCommand < ::YARD::Server::Commands::LibraryCommand - include ::YARD::Server::DocServerHelper - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/display_object_command.rb#36 - def index; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/display_object_command.rb#47 - def not_found; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/display_object_command.rb#9 - def run; end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/display_object_command.rb#54 - def object_path; end -end - -# Displays an object wrapped in frames -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/frames_command.rb#6 -class YARD::Server::Commands::FramesCommand < ::YARD::Server::Commands::DisplayObjectCommand - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/frames_command.rb#7 - def run; end -end - -# This is the base command for all commands that deal directly with libraries. -# Some commands do not, but most (like {DisplayObjectCommand}) do. If your -# command deals with libraries directly, subclass this class instead. -# See {Base} for notes on how to subclass a command. -# -# @abstract -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/library_command.rb#32 -class YARD::Server::Commands::LibraryCommand < ::YARD::Server::Commands::Base - # @return [LibraryCommand] a new instance of LibraryCommand - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#63 - def initialize(opts = T.unsafe(nil)); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#68 - def call(request); end - - # @return [Boolean] whether to reparse data - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#53 - def incremental; end - - # @return [Boolean] whether to reparse data - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#53 - def incremental=(_arg0); end - - # @return [LibraryVersion] the object containing library information - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#41 - def library; end - - # @return [LibraryVersion] the object containing library information - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#41 - def library=(_arg0); end - - # @return [LibraryOptions] default options for the library - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#44 - def options; end - - # @return [LibraryOptions] default options for the library - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#44 - def options=(_arg0); end - - # @return [Serializers::Base] the serializer used to perform file linking - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#47 - def serializer; end - - # @return [Serializers::Base] the serializer used to perform file linking - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#47 - def serializer=(_arg0); end - - # @return [Boolean] whether router should route for multiple libraries - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#50 - def single_library; end - - # @return [Boolean] whether router should route for multiple libraries - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#50 - def single_library=(_arg0); end - - # @return [Boolean] whether or not this adapter calls +fork+ when serving - # library requests. Defaults to false. - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#57 - def use_fork; end - - # @return [Boolean] whether or not this adapter calls +fork+ when serving - # library requests. Defaults to false. - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#57 - def use_fork=(_arg0); end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#96 - def call_with_fork(request, &block); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#83 - def call_without_fork(request); end - - # @return [Boolean] - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#109 - def can_fork?; end - - # Hack to load a custom fulldoc template object that does - # not do any rendering/generation. We need this to access the - # generate_*_list methods. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#171 - def fulldoc_template; end - - # @raise [LibraryNotPreparedError] - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#147 - def load_yardoc; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#159 - def not_prepared; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#118 - def restore_template_info; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#113 - def save_default_template_info; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#123 - def setup_library; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#130 - def setup_yardopts; end -end - -# source://yard//lib/yard/server/commands/library_command.rb#35 -YARD::Server::Commands::LibraryCommand::CAN_FORK = T.let(T.unsafe(nil), TrueClass) - -# Returns the index of libraries served by the server. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/library_index_command.rb#13 -class YARD::Server::Commands::LibraryIndexCommand < ::YARD::Server::Commands::Base - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_index_command.rb#14 - def options; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_index_command.rb#14 - def options=(_arg0); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_index_command.rb#16 - def run; end -end - -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/library_index_command.rb#5 -class YARD::Server::Commands::LibraryIndexOptions < ::YARD::CLI::YardocOptions - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_index_command.rb#6 - def adapter; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_index_command.rb#6 - def adapter=(_arg0); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_index_command.rb#6 - def libraries; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_index_command.rb#6 - def libraries=(_arg0); end - - # source://yard//lib/yard/options.rb#82 - def serialize; end - - # source://yard//lib/yard/options.rb#82 - def serialize=(_arg0); end - - # source://yard//lib/yard/options.rb#82 - def template; end - - # source://yard//lib/yard/options.rb#82 - def template=(_arg0); end - - # source://yard//lib/yard/options.rb#82 - def type; end - - # source://yard//lib/yard/options.rb#82 - def type=(_arg0); end -end - -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/library_command.rb#7 -class YARD::Server::Commands::LibraryOptions < ::YARD::CLI::YardocOptions - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#8 - def adapter; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#14 - def command; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#14 - def command=(_arg0); end - - # @since 0.6.0 - # @yield [:adapter, adapter] - # - # source://yard//lib/yard/server/commands/library_command.rb#17 - def each(&block); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#15 - def frames; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#15 - def frames=(_arg0); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#9 - def library; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#12 - def serialize; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#11 - def serializer; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/library_command.rb#10 - def single_library; end -end - -# Returns a list of objects of a specific type -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/list_command.rb#6 -class YARD::Server::Commands::ListCommand < ::YARD::Server::Commands::LibraryCommand - include ::YARD::Templates::Helpers::BaseHelper - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/list_command.rb#9 - def run; end -end - -# Serves requests from the root of the server -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/root_request_command.rb#6 -class YARD::Server::Commands::RootRequestCommand < ::YARD::Server::Commands::Base - include ::YARD::Server::HTTPUtils - include ::YARD::Server::Commands::StaticFileHelpers - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/root_request_command.rb#9 - def run; end -end - -# Performs a search over the objects inside of a library and returns -# the results as HTML or plaintext -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/search_command.rb#7 -class YARD::Server::Commands::SearchCommand < ::YARD::Server::Commands::LibraryCommand - include ::YARD::Templates::Helpers::BaseHelper - include ::YARD::Templates::Helpers::ModuleHelper - include ::YARD::Server::DocServerHelper - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#12 - def query; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#12 - def query=(_arg0); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#12 - def results; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#12 - def results=(_arg0); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#14 - def run; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#26 - def visible_results; end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#58 - def search_for_object; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#47 - def serve_normal; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#37 - def serve_xhr; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/search_command.rb#32 - def url_for(object); end -end - -# Serves static content when no other router matches a request -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/static_file_command.rb#6 -class YARD::Server::Commands::StaticFileCommand < ::YARD::Server::Commands::LibraryCommand - include ::YARD::Server::HTTPUtils - include ::YARD::Server::Commands::StaticFileHelpers - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/static_file_command.rb#17 - def run; end -end - -# Defines the paths used to search for static assets. To define an -# extra path, use {YARD::Server.register_static_path} rather than -# modifying this constant directly. Also note that files in the -# document root will always take precedence over these paths. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/static_file_command.rb#15 -YARD::Server::Commands::StaticFileCommand::STATIC_PATHS = T.let(T.unsafe(nil), Array) - -# Include this module to get access to {#static_template_file?} -# and {favicon?} helpers. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/commands/static_file_helpers.rb#8 -module YARD::Server::Commands::StaticFileHelpers - include ::YARD::Server::HTTPUtils - - # Serves an empty favicon. - # - # @raise [FinishRequest] finalizes an empty body if the path matches - # /favicon.ico so browsers don't complain. - # @return [Boolean] - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#14 - def favicon?; end - - # Attempts to route a path to a static template file. - # - # @raise [FinishRequest] if a file was found and served - # @return [void] - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#26 - def static_template_file?; end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 - def find_file(adapter, url); end - - class << self - # @since 0.6.0 - # - # source://yard//lib/yard/server/commands/static_file_helpers.rb#42 - def find_file(adapter, url); end - end -end - -# A module that is mixed into {Templates::Template} in order to customize -# certain template methods. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/doc_server_helper.rb#6 -module YARD::Server::DocServerHelper - # @param path_components [Array<String>] components of a URL - # @return [String] the absolute path from any mounted base URI. - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#61 - def abs_url(*path_components); end - - # @example The base path for a library 'foo' - # base_path('docs') # => 'docs/foo' - # @param path [String] the path prefix for a base path URI - # @return [String] the base URI for a library with an extra +path+ prefix - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#69 - def base_path(path); end - - # @return [String] a timestamp for a given file - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#78 - def mtime(file); end - - # @return [String] a URL for a file with a timestamp - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#84 - def mtime_url(file); end - - # @return [Router] convenience method for accessing the router - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#75 - def router; end - - # Modifies {Templates::Helpers::HtmlHelper#url_for} to return a URL instead - # of a disk location. - # - # @param obj [String, CodeObjects::Base] the object (or object path) to link to - # @param anchor [String] the anchor to link to - # @param relative [Boolean] use a relative or absolute link - # @return [String] the URL location of the object - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#11 - def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end - - # Modifies {Templates::Helpers::HtmlHelper#url_for_file} to return a URL instead - # of a disk location. - # - # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to - # @param anchor [String] optional anchor - # @return [String] the URL pointing to the file - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#24 - def url_for_file(filename, anchor = T.unsafe(nil)); end - - # Returns the frames URL for the page - # - # @return [String] the URL pointing to the frames page - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#43 - def url_for_frameset; end - - # Returns the URL for the alphabetic index page - # - # @return [String] the URL pointing to the first main page the - # user should see. - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#55 - def url_for_index; end - - # Modifies {Templates::Helpers::HtmlHelper#url_for_list} to return a URL - # based on the list prefix instead of a HTML filename. - # - # @param type [String, Symbol] the list type to generate a URL for - # @return [String] the URL pointing to the list - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#37 - def url_for_list(type); end - - # Returns the main URL, first checking a readme and then linking to the index - # - # @return [String] the URL pointing to the first main page the - # user should see. - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_helper.rb#49 - def url_for_main; end -end - -# A custom {Serializers::Base serializer} which returns resource URLs instead of -# static relative paths to files on disk. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/doc_server_serializer.rb#6 -class YARD::Server::DocServerSerializer < ::YARD::Serializers::FileSystemSerializer - # @return [DocServerSerializer] a new instance of DocServerSerializer - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_serializer.rb#7 - def initialize(_command = T.unsafe(nil)); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_serializer.rb#11 - def serialized_path(object); end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/server/doc_server_serializer.rb#31 - def urlencode(name); end -end - -# Short circuits a request by raising an error. This exception is caught -# by {Commands::Base#call} to immediately end a request and return a response. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/adapter.rb#6 -class YARD::Server::FinishRequest < ::RuntimeError; end - -# HTTPUtils provides utility methods for working with the HTTP protocol. -# -# This module is generally used internally by WEBrick -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#25 -module YARD::Server::HTTPUtils - private - - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#443 - def _escape(str, regex); end - - # :stopdoc: - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#441 - def _make_regex(str); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#442 - def _make_regex!(str); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#449 - def _unescape(str, regex); end - - # Removes quotes and escapes from +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#223 - def dequote(str); end - - # Escapes HTTP reserved and unwise characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#467 - def escape(str); end - - # Escapes 8 bit characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#508 - def escape8bit(str); end - - # Escapes form reserved characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#481 - def escape_form(str); end - - # Escapes path +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#497 - def escape_path(str); end - - # Loads Apache-compatible mime.types in +file+. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#112 - def load_mime_types(file); end - - # Returns the mime type of +filename+ from the list in +mime_tab+. If no - # mime type was found application/octet-stream is returned. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#134 - def mime_type(filename, mime_tab); end - - # Normalizes a request path. Raises an exception if the path cannot be - # normalized. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#31 - def normalize_path(path); end - - # Parses form data in +io+ with the given +boundary+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#395 - def parse_form_data(io, boundary); end - - # Parses an HTTP header +raw+ into a hash of header fields with an Array - # of values. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#145 - def parse_header(raw); end - - # Parses the query component of a URI in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#371 - def parse_query(str); end - - # Parses q values in +value+ as used in Accept headers. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#202 - def parse_qvalues(value); end - - # Parses a Range header value +ranges_specifier+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#184 - def parse_range_header(ranges_specifier); end - - # Quotes and escapes quotes in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#233 - def quote(str); end - - # Splits a header value +str+ according to HTTP specification. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#175 - def split_header_value(str); end - - # Unescapes HTTP reserved and unwise characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#474 - def unescape(str); end - - # Unescapes form reserved characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#490 - def unescape_form(str); end - - class << self - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#443 - def _escape(str, regex); end - - # :stopdoc: - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#441 - def _make_regex(str); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#442 - def _make_regex!(str); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#449 - def _unescape(str, regex); end - - # Removes quotes and escapes from +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#223 - def dequote(str); end - - # Escapes HTTP reserved and unwise characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#467 - def escape(str); end - - # Escapes 8 bit characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#508 - def escape8bit(str); end - - # Escapes form reserved characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#481 - def escape_form(str); end - - # Escapes path +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#497 - def escape_path(str); end - - # Loads Apache-compatible mime.types in +file+. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#112 - def load_mime_types(file); end - - # Returns the mime type of +filename+ from the list in +mime_tab+. If no - # mime type was found application/octet-stream is returned. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#134 - def mime_type(filename, mime_tab); end - - # Normalizes a request path. Raises an exception if the path cannot be - # normalized. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#31 - def normalize_path(path); end - - # Parses form data in +io+ with the given +boundary+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#395 - def parse_form_data(io, boundary); end - - # Parses an HTTP header +raw+ into a hash of header fields with an Array - # of values. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#145 - def parse_header(raw); end - - # Parses the query component of a URI in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#371 - def parse_query(str); end - - # Parses q values in +value+ as used in Accept headers. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#202 - def parse_qvalues(value); end - - # Parses a Range header value +ranges_specifier+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#184 - def parse_range_header(ranges_specifier); end - - # Quotes and escapes quotes in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#233 - def quote(str); end - - # Splits a header value +str+ according to HTTP specification. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#175 - def split_header_value(str); end - - # Unescapes HTTP reserved and unwise characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#474 - def unescape(str); end - - # Unescapes form reserved characters in +str+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#490 - def unescape_form(str); end - end -end - -# Default mime types -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#47 -YARD::Server::HTTPUtils::DefaultMimeTypes = T.let(T.unsafe(nil), Hash) - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#459 -YARD::Server::HTTPUtils::ESCAPED = T.let(T.unsafe(nil), Regexp) - -# Stores multipart form data. FormData objects are created when -# WEBrick::HTTPUtils.parse_form_data is called. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#242 -class YARD::Server::HTTPUtils::FormData < ::String - # Creates a new FormData object. - # - # +args+ is an Array of form data entries. One FormData will be created - # for each entry. - # - # This is called by WEBrick::HTTPUtils.parse_form_data for you - # - # @return [FormData] a new instance of FormData - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#267 - def initialize(*args); end - - # Adds +str+ to this FormData which may be the body, a header or a - # header entry. - # - # This is called by WEBrick::HTTPUtils.parse_form_data for you - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#300 - def <<(str); end - - # Retrieves the header at the first entry in +key+ - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#286 - def [](*key); end - - # Adds +data+ at the end of the chain of entries - # - # This is called by WEBrick::HTTPUtils.parse_form_data for you. - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#320 - def append_data(data); end - - # Yields each entry in this FormData - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#335 - def each_data; end - - # The filename of the form data part - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#254 - def filename; end - - # The filename of the form data part - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#254 - def filename=(_arg0); end - - # Returns all the FormData as an Array - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#347 - def list; end - - # The name of the form data part - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#249 - def name; end - - # The name of the form data part - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#249 - def name=(_arg0); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#256 - def next_data=(_arg0); end - - # Returns all the FormData as an Array - # A FormData will behave like an Array - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#347 - def to_ary; end - - # This FormData's body - # - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#363 - def to_s; end - - protected - - # @since 0.6.0 - # - # source://yard//lib/yard/server/http_utils.rb#256 - def next_data; end -end - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#244 -YARD::Server::HTTPUtils::FormData::EmptyHeader = T.let(T.unsafe(nil), Hash) - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#243 -YARD::Server::HTTPUtils::FormData::EmptyRawHeader = T.let(T.unsafe(nil), Array) - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#458 -YARD::Server::HTTPUtils::NONASCII = T.let(T.unsafe(nil), Regexp) - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#456 -YARD::Server::HTTPUtils::UNESCAPED = T.let(T.unsafe(nil), Regexp) - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#457 -YARD::Server::HTTPUtils::UNESCAPED_FORM = T.let(T.unsafe(nil), Regexp) - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#460 -YARD::Server::HTTPUtils::UNESCAPED_PCHAR = T.let(T.unsafe(nil), Regexp) - -# @since 0.6.0 -# -# source://yard//lib/yard/server/http_utils.rb#17 -YARD::Server::LF = T.let(T.unsafe(nil), String) - -# This exception is raised when {LibraryVersion#prepare!} fails, or discovers -# that the library is not "prepared" to be served by -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/library_version.rb#9 -class YARD::Server::LibraryNotPreparedError < ::RuntimeError; end - -# A library version encapsulates a library's documentation at a specific version. -# Although the version is optional, this allows for creating multiple documentation -# points for a specific library, each representing a unique version. The term -# "library" used in other parts of the YARD::Server documentation refers to -# objects of this class unless otherwise noted. -# -# A library points to a location where a {#yardoc_file} is located so that -# its documentation may be loaded and served. Optionally, a {#source_path} is -# given to point to a location where any extra files (and {YARD::CLI::Yardoc .yardopts}) -# should be loaded from. Both of these methods may not be known immediately, -# since the yardoc file may not be built until later. Resolving the yardoc -# file and source path are dependent on the specific library "source type" used. -# Source types (known as "library source") are discussed in detail below. -# -# == Using with Adapters -# A list of libraries need to be passed into adapters upon creation. In -# most cases, you will never do this manually, but if you use a {RackMiddleware}, -# you will need to pass in this list yourself. To build this list of libraries, -# you should create a hash of library names mapped to an *Array* of LibraryVersion -# objects. For example: -# -# {'mylib' => [LibraryVersion.new('mylib', '1.0', ...), -# LibraryVersion.new('mylib', '2.0', ...)]} -# -# Note that you can also use {Adapter#add_library} for convenience. -# -# The "array" part is required, even for just one library version. -# -# == Library Sources -# The {#source} method represents the library source type, ie. where the -# library "comes from". It might come from "disk", or it might come from a -# "gem" (technically the disk, but a separate type nonetheless). In these -# two cases, the yardoc file sits somewhere on your filesystem, though -# it may also be built dynamically if it does not yet exist. This behaviour -# is controlled through the {#prepare!} method, which prepares the yardoc file -# given a specific library source. We will see how this works in detail in -# the following section. -# -# == Implementing a Custom Library Source -# YARD can be extended to support custom library sources in order to -# build or retrieve a yardoc file at runtime from many different locations. -# -# To implement this behaviour, 3 methods can be added to the +LibraryVersion+ -# class, +#load_yardoc_from_SOURCE+, +#yardoc_file_for_SOURCE+, and -# +#source_path_for_SOURCE+. In all cases, "SOURCE" represents the source -# type used in {#source} when creating the library object. The -# +#yardoc_file_for_SOURCE+ and +#source_path_for_SOURCE+ methods are called upon -# creation and should return the location where the source code for the library -# lives. The load method is called from {#prepare!} if there is no yardoc file -# and should set {#yardoc_file}. Below is a full example for -# implementing a custom library source, +:http+, which reads packaged .yardoc -# databases from zipped archives off of an HTTP server. -# -# Note that only +#load_yardoc_from_SOURCE+ is required. The other two -# methods are optional and can be set manually (via {#source_path=} and -# {#yardoc_file=}) on the object at any time. -# -# @example Implementing a Custom Library Source -# # Adds the source type "http" for .yardoc files zipped on HTTP servers -# class LibraryVersion -# def load_yardoc_from_http -# Thread.new do -# # zip/unzip method implementations are not shown -# download_zip_file("http://mysite.com/yardocs/#{self}.zip") -# unzip_file_to("/path/to/yardocs/#{self}") -# end -# -# # tell the server it's not ready yet (but it might be next time) -# raise LibraryNotPreparedError -# end -# -# def yardoc_file_for_http -# "/path/to/yardocs/#{self}/.yardoc" -# end -# -# def source_path_for_http -# File.dirname(yardoc_file) -# end -# end -# -# # Creating a library of this source type: -# LibraryVersion.new('name', '1.0', nil, :http) -# @since 0.6.0 -# -# source://yard//lib/yard/server/library_version.rb#94 -class YARD::Server::LibraryVersion - # @param name [String] the name of the library - # @param version [String] the specific (usually, but not always, numeric) library - # version - # @param yardoc [String] the location of the yardoc file, or nil if it is - # generated later - # @param source [Symbol] the location of the files used to build the yardoc. - # Builtin source types are +:disk+ or +:gem+. - # @return [LibraryVersion] a new instance of LibraryVersion - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#134 - def initialize(name, version = T.unsafe(nil), yardoc = T.unsafe(nil), source = T.unsafe(nil)); end - - # @return [Boolean] whether another LibraryVersion is equal to this one - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#153 - def ==(other); end - - # @return [Boolean] whether another LibraryVersion is equal to this one - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#153 - def eql?(other); end - - # @return [Boolean] whether another LibraryVersion is equal to this one - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#153 - def equal?(other); end - - # @return [Gem::Specification] a gemspec object for a given library. Used - # for :gem source types. - # @return [nil] if there is no installed gem for the library - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#191 - def gemspec; end - - # @return [Fixnum] used for Hash mapping. - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#150 - def hash; end - - # @return [String] the name of the library - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#96 - def name; end - - # @return [String] the name of the library - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#96 - def name=(_arg0); end - - # Prepares a library to be displayed by the server. This callback is - # performed before each request on a library to ensure that it is loaded - # and ready to be viewed. If any steps need to be performed prior to loading, - # they are performed through this method (though they should be implemented - # through the +load_yardoc_from_SOURCE+ method). - # - # @note You should not directly override this method. Instead, implement - # +load_yardoc_from_SOURCENAME+ when implementing loading for a specific - # source type. See the {LibraryVersion} documentation for "Implementing - # a Custom Library Source" - # @raise [LibraryNotPreparedError] if the library is not ready to be - # displayed. Usually when raising this error, you would simultaneously - # begin preparing the library for subsequent requests, although this - # is not necessary. - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#182 - def prepare!; end - - # @return [Boolean] whether the library has been completely processed - # and is ready to be served - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#162 - def ready?; end - - # @return [Symbol] the source type representing where the yardoc should be - # loaded from. Defaults are +:disk+ and +:gem+, though custom sources - # may be implemented. This value is used to inform {#prepare!} about how - # to load the necessary data in order to display documentation for an object. - # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#116 - def source; end - - # @return [Symbol] the source type representing where the yardoc should be - # loaded from. Defaults are +:disk+ and +:gem+, though custom sources - # may be implemented. This value is used to inform {#prepare!} about how - # to load the necessary data in order to display documentation for an object. - # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#116 - def source=(_arg0); end - - # @return [String] the location of the source code for a library. This - # value is filled by calling +#source_path_for_SOURCE+ on this class. - # @return [nil] if there is no source code - # @see LibraryVersion LibraryVersion documentation for "Implementing a Custom Library Source" - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#122 - def source_path; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#125 - def source_path=(_arg0); end - - # @param url_format [Boolean] if true, returns the string in a URI-compatible - # format (for appending to a URL). Otherwise, it is given in a more human - # readable format. - # @return [String] the string representation of the library. - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#145 - def to_s(url_format = T.unsafe(nil)); end - - # @return [String] the version of the specific library - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#99 - def version; end - - # @return [String] the version of the specific library - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#99 - def version=(_arg0); end - - # @note To implement a custom yardoc file getter, implement - # @return [String] the location of the yardoc file used to load the object - # information from. - # @return [nil] if no yardoc file exists yet. In this case, {#prepare!} will - # be called on this library to build the yardoc file. - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#106 - def yardoc_file; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#109 - def yardoc_file=(_arg0); end - - protected - - # Called when a library of source type "disk" is to be prepared. In this - # case, the {#yardoc_file} should already be set, but the library may not - # be prepared. Run preparation if not done. - # - # @raise [LibraryNotPreparedError] if the yardoc file has not been - # prepared. - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#206 - def load_yardoc_from_disk; end - - # Called when a library of source type "gem" is to be prepared. In this - # case, the {#yardoc_file} needs to point to the correct location for - # the installed gem. The yardoc file is built if it has not been done. - # - # @raise [LibraryNotPreparedError] if the gem does not have an existing - # yardoc file. - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#226 - def load_yardoc_from_gem; end - - # @return [String] the source path for a disk source - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#243 - def source_path_for_disk; end - - # @return [String] the source path for a gem source - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#248 - def source_path_for_gem; end - - # @return [String] the yardoc file for a gem source - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#253 - def yardoc_file_for_gem; end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#261 - def load_source_path; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#266 - def load_yardoc_file; end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/library_version.rb#271 - def serializer; end -end - -# Raises an error if a resource is not found. This exception is caught by -# {Commands::Base#call} to immediately end a request and return a 404 response -# code. If a message is provided, the body is set to the exception message. -# -# @since 0.6.0 -# -# source://yard//lib/yard/server/adapter.rb#11 -class YARD::Server::NotFoundError < ::RuntimeError; end - -# A router class implements the logic used to recognize a request for a specific -# URL and run specific {Commands::Base commands}. -# -# == Subclassing Notes -# To create a custom router, subclass this class and pass it into the adapter -# options through {Adapter#initialize} or by directly modifying {Adapter#router}. -# -# The most general customization is to change the URL prefixes recognized by -# routing, which can be done by overriding {#docs_prefix}, {#list_prefix}, -# {#static_prefix}, and {#search_prefix}. -# -# == Implementing Custom Caching -# By default, the Router class performs static disk-based caching on all -# requests through the +#check_static_cache+. To override this behaviour, -# or create your own caching mechanism, mixin your own custom module with -# this method implemented as per {StaticCaching#check_static_cache}. -# -# @example Creating a subclassed router -# # Adds 'my' to all routing prefixes -# class MyRouter < YARD::Server::Router -# def docs_prefix; 'mydocs' end -# def list_prefix; 'mylist' end -# def static_prefix; 'mystatic' end -# def search_prefix; 'mysearch' end -# end -# -# # Using it: -# WebrickAdapter.new(libraries, :router => MyRouter).start -# @since 0.6.0 -# -# source://yard//lib/yard/server/router.rb#32 -class YARD::Server::Router - include ::YARD::Server::StaticCaching - include ::YARD::Server::Commands - - # Creates a new router for a specific adapter - # - # @param adapter [Adapter] the adapter to route requests to - # @return [Router] a new instance of Router - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#45 - def initialize(adapter); end - - # @return [Adapter] the adapter used by the router - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#40 - def adapter; end - - # @return [Adapter] the adapter used by the router - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#40 - def adapter=(_arg0); end - - # Perform routing on a specific request, serving the request as a static - # file through {Commands::RootRequestCommand} if no route is found. - # - # @param request [Adapter Dependent] the request object - # @return [Array(Numeric,Hash,Array)] the Rack-style server response data - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#54 - def call(request); end - - # @return [String] the URI prefix for all object documentation requests - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#63 - def docs_prefix; end - - # @return [String] the URI prefix for all class/method/file list requests - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#66 - def list_prefix; end - - # @return [Array(LibraryVersion, Array<String>)] the library followed - # by the rest of the path components in the request path. LibraryVersion - # will be nil if no matching library was found. - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#79 - def parse_library_from_path(paths); end - - # @return [Adapter Dependent] the request data coming in with the routing - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#37 - def request; end - - # @return [Adapter Dependent] the request data coming in with the routing - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#37 - def request=(_arg0); end - - # @return [String] the URI prefix for all search requests - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#69 - def search_prefix; end - - # @return [String] the URI prefix for all static assets (templates) - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#72 - def static_prefix; end - - protected - - # Adds extra :library/:path option keys to the adapter options. - # Use this method when passing options to a command. - # - # @param library [LibraryVersion] the library to route for - # @param paths [Array<String>] path components (split by '/') - # @return [Hash] finalized options - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#181 - def final_options(library, paths); end - - # Performs routing algorithm to find which prefix is called, first - # parsing out library name/version information. - # - # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response - # @return [nil] if no route is matched - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#105 - def route(path = T.unsafe(nil)); end - - # Routes requests from {#docs_prefix} and calls the appropriate command - # - # @param library [LibraryVersion] the library to route for - # @param paths [Array<String>] path components (split by '/') - # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response - # @return [nil] if no route is matched - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#128 - def route_docs(library, paths); end - - # Routes for the index of a library / multiple libraries - # - # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response - # @return [nil] if no route is matched - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#146 - def route_index; end - - # Routes requests from {#list_prefix} and calls the appropriate command - # - # @param library [LibraryVersion] the library to route for - # @param paths [Array<String>] path components (split by '/') - # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response - # @return [nil] if no route is matched - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#157 - def route_list(library, paths); end - - # Routes requests from {#search_prefix} and calls the appropriate command - # - # @param library [LibraryVersion] the library to route for - # @param paths [Array<String>] path components (split by '/') - # @return [Array(Numeric,Hash,Array<String>)] the Rack-style response - # @return [nil] if no route is matched - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#165 - def route_search(library, paths); end - - # @since 0.6.0 - # - # source://yard//lib/yard/server/router.rb#170 - def route_static(library, paths); end -end - -# Implements static caching for requests. -# -# @see Router Router documentation for "Caching" -# @since 0.6.0 -# -# source://yard//lib/yard/server/static_caching.rb#7 -module YARD::Server::StaticCaching - # Called by a router to return the cached object. By default, this - # method performs disk-based caching. To perform other forms of caching, - # implement your own +#check_static_cache+ method and mix the module into - # the Router class. - # - # Note that caching does not occur here. This method simply checks for - # the existence of cached data. To actually cache a response, see - # {Commands::Base#cache}. - # - # @example Implementing In-Memory Cache Checking - # module MemoryCaching - # def check_static_cache - # # $memory_cache is filled by {Commands::Base#cache} - # cached_data = $memory_cache[request.path] - # if cached_data - # [200, {'Content-Type' => 'text/html'}, [cached_data]] - # else - # nil - # end - # end - # end - # - # class YARD::Server::Router; include MemoryCaching; end - # @return [Array(Numeric,Hash,Array)] the Rack-style response - # @return [nil] if no cache is available and routing should continue - # @see Commands::Base#cache - # @since 0.6.0 - # - # source://yard//lib/yard/server/static_caching.rb#34 - def check_static_cache; end -end - -# Stubs marshal dumps and acts a delegate class for an object by path -# -# @private -# -# source://yard//lib/yard/serializers/yardoc_serializer.rb#6 -class YARD::StubProxy - # @return [StubProxy] a new instance of StubProxy - # - # source://yard//lib/yard/serializers/yardoc_serializer.rb#13 - def initialize(path, transient = T.unsafe(nil)); end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#9 - def _dump(_depth); end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#11 - def hash; end - - # source://yard//lib/yard/serializers/yardoc_serializer.rb#18 - def method_missing(meth, *args, &block); end - - class << self - # source://yard//lib/yard/serializers/yardoc_serializer.rb#10 - def _load(str); end - end -end - -# source://yard//lib/yard/serializers/yardoc_serializer.rb#28 -YARD::StubProxy::FILELEN = T.let(T.unsafe(nil), Integer) - -# The root path for YARD builtin templates -# -# source://yard//lib/yard.rb#10 -YARD::TEMPLATE_ROOT = T.let(T.unsafe(nil), String) - -# Namespace for Tag components -# -# source://yard//lib/yard/autoload.rb#248 -module YARD::Tags; end - -# Defines an attribute with a given name, using indented block data as the -# attribute's docstring. If the type specifier is supplied with "r", "w", or -# "rw", the attribute is made readonly, writeonly or readwrite respectively. -# A readwrite attribute is the default, if no type is specified. The comment -# containing this directive does not need to be attached to any source, but -# if it is, that source code will be used as the method's source. -# -# To define a regular method, see {tag:!method} -# -# @example Defining a simple readonly attribute -# # @!attribute [r] count -# # @return [Fixnum] the size of the list -# @example Defining a simple readwrite attribute -# # @!attribute name -# # @return [String] the name of the user -# @note This directive should only be used if there is no explicit +attr_*+ -# declaration for the attribute in any source files (i.e., the attribute -# is declared dynamically via meta-programming). In all other cases, add -# documentation to the attribute declaration itself. -# @note For backwards compatibility support, you do not need to indent -# the attribute's docstring text. If an +@!attribute+ directive is seen with -# no indented block, the entire docstring is used as the new attribute's -# docstring text. -# @see tag:!method -# @since 0.7.0 -# -# source://yard//lib/yard/tags/directives.rb#460 -class YARD::Tags::AttributeDirective < ::YARD::Tags::MethodDirective - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#461 - def after_parse; end - - protected - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#469 - def method_name; end - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#475 - def method_signature; end - - private - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#485 - def create_attribute_data(object); end - - # @return [Boolean] - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#515 - def readable?; end - - # @return [Boolean] - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#511 - def writable?; end -end - -# source://yard//lib/yard/tags/default_factory.rb#4 -class YARD::Tags::DefaultFactory - # Parses tag text and creates a new tag with descriptive text - # - # @param tag_name the name of the tag to parse - # @param text [String] the raw tag text - # @return [Tag] a tag object with the tag_name and text values filled - # - # source://yard//lib/yard/tags/default_factory.rb#13 - def parse_tag(tag_name, text); end - - # Parses tag text and creates a new tag with a key name and descriptive text - # - # @param tag_name the name of the tag to parse - # @param text [String] the raw tag text - # @return [Tag] a tag object with the tag_name, name and text values filled - # - # source://yard//lib/yard/tags/default_factory.rb#22 - def parse_tag_with_name(tag_name, text); end - - # source://yard//lib/yard/tags/default_factory.rb#89 - def parse_tag_with_options(tag_name, text); end - - # source://yard//lib/yard/tags/default_factory.rb#70 - def parse_tag_with_title_and_text(tag_name, text); end - - # Parses tag text and creates a new tag with formally declared types and - # descriptive text - # - # @param tag_name the name of the tag to parse - # @param text [String] the raw tag text - # @raise [TagFormatError] - # @return [Tag] a tag object with the tag_name, types and text values filled - # - # source://yard//lib/yard/tags/default_factory.rb#33 - def parse_tag_with_types(tag_name, text); end - - # Parses tag text and creates a new tag with formally declared types, a key - # name and descriptive text - # - # @param tag_name the name of the tag to parse - # @param text [String] the raw tag text - # @return [Tag] a tag object with the tag_name, name, types and text values filled - # - # source://yard//lib/yard/tags/default_factory.rb#45 - def parse_tag_with_types_and_name(tag_name, text); end - - # Parses tag text and creates a new tag with formally declared types, a title - # on the first line and descriptive text - # - # @param tag_name the name of the tag to parse - # @param text [String] the raw tag text - # @return [Tag] a tag object with the tag_name, name, types and text values filled - # - # source://yard//lib/yard/tags/default_factory.rb#57 - def parse_tag_with_types_and_title(tag_name, text); end - - # source://yard//lib/yard/tags/default_factory.rb#75 - def parse_tag_with_types_name_and_default(tag_name, text); end - - private - - # Extracts the name from raw tag text returning the name and remaining value - # - # @param text [String] the raw tag text - # @return [Array] an array holding the name as the first element and the - # value as the second element - # - # source://yard//lib/yard/tags/default_factory.rb#101 - def extract_name_from_text(text); end - - # @raise [TagFormatError] - # - # source://yard//lib/yard/tags/default_factory.rb#105 - def extract_title_and_desc_from_text(text); end - - # Parses a [], <>, {} or () block at the beginning of a line of text - # into a list of comma delimited values. - # - # @example - # obj.parse_types('[String, Array<Hash, String>, nil]') # => [nil, ['String', 'Array<Hash, String>', 'nil'], ""] - # obj.parse_types('b<String> A string') # => ['b', ['String'], 'A string'] - # @return [Array(String, Array<String>, String)] the text before the type - # list (or nil), followed by the type list parsed into an array of - # strings, followed by the text following the type list. - # - # source://yard//lib/yard/tags/default_factory.rb#129 - def extract_types_and_name_from_text(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end - - # source://yard//lib/yard/tags/default_factory.rb#138 - def extract_types_and_name_from_text_unstripped(text, opening_types = T.unsafe(nil), closing_types = T.unsafe(nil)); end -end - -# source://yard//lib/yard/tags/default_factory.rb#6 -YARD::Tags::DefaultFactory::TYPELIST_CLOSING_CHARS = T.let(T.unsafe(nil), String) - -# source://yard//lib/yard/tags/default_factory.rb#5 -YARD::Tags::DefaultFactory::TYPELIST_OPENING_CHARS = T.let(T.unsafe(nil), String) - -# source://yard//lib/yard/tags/default_tag.rb#4 -class YARD::Tags::DefaultTag < ::YARD::Tags::Tag - # @return [DefaultTag] a new instance of DefaultTag - # - # source://yard//lib/yard/tags/default_tag.rb#7 - def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil), defaults = T.unsafe(nil)); end - - # Returns the value of attribute defaults. - # - # source://yard//lib/yard/tags/default_tag.rb#5 - def defaults; end -end - -# The base directive class. Subclass this class to create a custom -# directive, registering it with {Library.define_directive}. Directive -# classes are executed via the {#call} method, which perform all directive -# processing on the object. -# -# If processing occurs within a handler, the {#handler} attribute is -# available to access more information about parsing context and state. -# Handlers are only available when parsing from {Parser::SourceParser}, -# not when parsing directly from {DocstringParser}. If the docstring is -# attached to an object declaration, {#object} will be set and available -# to modify the generated code object directly. Note that both of these -# attributes may be nil, and directives should test their existence -# before attempting to use them. -# -# @abstract Subclasses should implement {#call}. -# @see Library.define_directive -# @since 0.8.0 -# -# source://yard//lib/yard/tags/directives.rb#22 -class YARD::Tags::Directive - # @param tag [Tag] the meta-data tag containing all input to the docstring - # @param parser [DocstringParser] the docstring parser object - # @return [Directive] a new instance of Directive - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#54 - def initialize(tag, parser); end - - # Called after parsing all directives and tags in the docstring. Used - # to perform any cleanup after all directives perform their main task. - # - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#73 - def after_parse; end - - # Called when processing the directive. Subclasses should implement - # this method to perform all functionality of the directive. - # - # @abstract implement this method to perform all data processing for - # the directive. - # @raise [NotImplementedError] - # @return [void] - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#68 - def call; end - - # Set this field to replace the directive definition inside of a docstring - # with arbitrary text. For instance, the {MacroDirective} uses this field - # to expand its macro data in place of the call to a +@!macro+. - # - # @return [String] the text to expand in the original docstring in place - # of this directive definition. - # @return [nil] if no expansion should take place for this directive - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#33 - def expanded_text; end - - # Set this field to replace the directive definition inside of a docstring - # with arbitrary text. For instance, the {MacroDirective} uses this field - # to expand its macro data in place of the call to a +@!macro+. - # - # @return [String] the text to expand in the original docstring in place - # of this directive definition. - # @return [nil] if no expansion should take place for this directive - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#33 - def expanded_text=(_arg0); end - - # @return [Handlers::Base, nil] the handler object the docstring parser - # might be attached to. May be nil. Only available when parsing - # through {Parser::SourceParser}. - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#48 - def handler; end - - # @return [CodeObjects::Base, nil] the object the parent docstring is - # attached to. May be nil. - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#42 - def object; end - - # @return [DocstringParser] the parser that is parsing all tag - # information out of the docstring - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#37 - def parser=(_arg0); end - - # @return [Tag] the meta-data tag containing data input to the directive - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#24 - def tag; end - - # @return [Tag] the meta-data tag containing data input to the directive - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#24 - def tag=(_arg0); end - - protected - - # @return [Boolean] - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#79 - def inside_directive?; end - - # @return [DocstringParser] the parser that is parsing all tag - # information out of the docstring - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#37 - def parser; end -end - -# Ends a group listing definition. Group definition automatically end -# when class or module blocks are closed, and defining a new group overrides -# the last group definition, but occasionally you need to end the current -# group to return to the default listing. Use {tag:!group} to begin a -# group listing. -# -# @example -# class Controller -# # @!group Callbacks -# -# def before_filter; end -# def after_filter; end -# -# # @!endgroup -# -# def index; end -# end -# @see tag:!group -# @since 0.6.0 -# -# source://yard//lib/yard/tags/directives.rb#104 -class YARD::Tags::EndGroupDirective < ::YARD::Tags::Directive - # @since 0.6.0 - # - # source://yard//lib/yard/tags/directives.rb#105 - def call; end -end - -# Defines a group listing. All methods (and attributes) seen after this -# directive are placed into a group with the given description as the -# group name. The group listing is used by templates to organize methods -# and attributes into respective logical groups. To end a group listing -# use {tag:!endgroup}. -# -# @example -# # @!group Callbacks -# -# def before_filter; end -# def after_filter; end -# @note A group definition only applies to the scope it is defined in. -# If a new class or module is opened after the directive, this directive -# will not apply to methods in that class or module. -# @see tag:!endgroup -# @since 0.6.0 -# -# source://yard//lib/yard/tags/directives.rb#127 -class YARD::Tags::GroupDirective < ::YARD::Tags::Directive - # @since 0.6.0 - # - # source://yard//lib/yard/tags/directives.rb#128 - def call; end -end - -# Keeps track of all the registered meta-data tags and directives. -# Also allows for defining of custom tags and customizing the tag parsing -# syntax. -# -# == Defining Custom Meta-Data Tags -# -# To define a custom tag, use {define_tag}. You should pass the tag -# name and the factory method to use when creating the tag. If you do not -# provide a factory method to use, it will default to {DefaultFactory#parse_tag} -# -# You can also define tag objects manually by simply implementing a "tagname_tag" -# method that returns a {Tag} object, but they will not take advantage of tag factory -# parsing: -# -# def mytag_tag(text) -# Tag.new(:mytag, text) -# end -# -# == Defining Custom Directives -# -# Directives can be defined by calling the {define_directive} method, taking -# the directive name, an optional tag factory parser method (to parse the -# data in the directive into a temporary {Tag} object) and a {Directive} subclass -# that performs the directive processing. For more information on creating a -# Directive subclass, see the {Directive} class documentation. -# -# Similar to tags, Directives can also be defined manually, in this case using -# the method name "mydirective_directive" and returning a new {Directive} object: -# -# def mydirective_directive(tag, parser) -# MyDirective.new(tag, parser) -# end -# -# == Namespaced Tags -# -# In YARD 0.8.0+, tags can be namespaced using the '.' character. It is recommended -# to namespace project specific tags, like +@yard.tag_name+, so that tags do not -# collide with other plugins or new built-in tags. -# -# == Adding/Changing the Tag Syntax -# -# If you have specialized tag parsing needs you can substitute the {#factory} -# object with your own by setting {Library.default_factory= Library.default_factory} -# to a new class with its own parsing methods before running YARD. This is useful -# if you want to change the syntax of existing tags (@see, @since, etc.) -# -# @example Defining a custom tag -# define_tag "Parameter", :param, :with_types_and_name -# define_tag "Author", :author -# @example Defining a custom directive -# define_directive :method, :with_title_and_text, MethodDirective -# @see DefaultFactory -# @see define_tag -# @see define_directive -# @see Directive -# -# source://yard//lib/yard/tags/library.rb#59 -class YARD::Tags::Library - # @return [Library] a new instance of Library - # - # source://yard//lib/yard/tags/library.rb#260 - def initialize(factory = T.unsafe(nil)); end - - # Marks a class/module/method as abstract with optional - # implementor information. - # - # @example - # # @abstract Subclass and override {#run} to implement - # # a custom Threadable class. - # class Runnable - # def run; raise NotImplementedError end - # end - # - # source://yard//lib/yard/tags/library.rb#168 - def abstract_tag(text); end - - # Declares the API that the object belongs to. Does not display in - # output, but useful for performing queries (+yardoc --query+). Any text is - # allowable in this tag, and there are no predefined values. - # - # @example - # class Post - # # @api private - # def reset_table!; table.flush end - # end - # @note This tag is *transitive*. If it is applied on a - # namespace (module or class), it will immediately be - # applied to all children objects of that namespace unless - # it is redefined on the child object. - # @note The special name +@api private+ does display a notice in - # documentation if it is listed, letting users know that the - # method is not to be used by external components. - # - # source://yard//lib/yard/tags/library.rb#168 - def api_tag(text); end - - # Declares a readonly attribute on a Struct or class. - # - # @deprecated Use the more powerful {tag:!attribute} directive instead. - # @example - # # @attr_reader [String] name the name of the structure - # # @attr_reader [Fixnum] size the size of the structure - # class MyStruct < Struct; end - # @note This attribute is only applicable on class docstrings - # - # source://yard//lib/yard/tags/library.rb#168 - def attr_reader_tag(text); end - - # Declares a readwrite attribute on a Struct or class. - # - # @deprecated Use the more powerful {tag:!attribute} directive instead. - # @example - # # @attr [String] name the name of the structure - # # @attr [Fixnum] size the size of the structure - # class MyStruct < Struct; end - # @note This attribute is only applicable on class docstrings - # - # source://yard//lib/yard/tags/library.rb#168 - def attr_tag(text); end - - # Declares a writeonly attribute on a Struct or class. - # - # @deprecated Use the more powerful {tag:!attribute} directive instead. - # @example - # # @attr_reader [String] name the name of the structure - # # @attr_reader [Fixnum] size the size of the structure - # class MyStruct < Struct; end - # @note This attribute is only applicable on class docstrings - # - # source://yard//lib/yard/tags/library.rb#168 - def attr_writer_tag(text); end - - # source://yard//lib/yard/tags/library.rb#202 - def attribute_directive(tag, parser); end - - # List the author or authors of a class, module, or method. - # - # @example - # # @author Foo Bar <foo@bar.com> - # class MyClass; end - # - # source://yard//lib/yard/tags/library.rb#168 - def author_tag(text); end - - # Marks a method/class as deprecated with an optional description. - # The description should be used to inform users of the recommended - # migration path, and/or any useful information about why the object - # was marked as deprecated. - # - # @example Deprecate a method with a replacement API - # # @deprecated Use {#bar} instead. - # def foo; end - # @example Deprecate a method with no replacement - # class Thread - # # @deprecated Exiting a thread in this way is not reliable and - # # can cause a program crash. - # def kill; end - # end - # - # source://yard//lib/yard/tags/library.rb#168 - def deprecated_tag(text); end - - # Creates a new directive with tag information and a docstring parser - # object. - # - # @param tag_name [String] the name of the tag - # @param tag_buf [String] the tag data - # @param parser [DocstringParser] the parser object parsing the docstring - # @return [Directive] the newly created directive - # - # source://yard//lib/yard/tags/library.rb#290 - def directive_create(tag_name, tag_buf, parser); end - - # source://yard//lib/yard/tags/library.rb#202 - def endgroup_directive(tag, parser); end - - # Show an example snippet of code for an object. The first line - # is an optional title. - # - # @example - # # @example Reverse a String - # # "mystring".reverse #=> "gnirtsym" - # def reverse; end - # - # source://yard//lib/yard/tags/library.rb#168 - def example_tag(text); end - - # A factory class to handle parsing of tags, defaults to {default_factory} - # - # source://yard//lib/yard/tags/library.rb#258 - def factory; end - - # A factory class to handle parsing of tags, defaults to {default_factory} - # - # source://yard//lib/yard/tags/library.rb#258 - def factory=(_arg0); end - - # source://yard//lib/yard/tags/library.rb#202 - def group_directive(tag, parser); end - - # @param tag_name [#to_s] the name of the tag to look for - # @return [Boolean] whether a directive by the given name is registered in - # the library. - # - # source://yard//lib/yard/tags/library.rb#280 - def has_directive?(tag_name); end - - # @param tag_name [#to_s] the name of the tag to look for - # @return [Boolean] whether a tag by the given name is registered in - # the library. - # - # source://yard//lib/yard/tags/library.rb#267 - def has_tag?(tag_name); end - - # source://yard//lib/yard/tags/library.rb#202 - def macro_directive(tag, parser); end - - # source://yard//lib/yard/tags/library.rb#202 - def method_directive(tag, parser); end - - # Adds an emphasized note at the top of the docstring for the object - # - # @example - # # @note This method should only be used in outer space. - # def eject; end - # @see tag:todo - # - # source://yard//lib/yard/tags/library.rb#168 - def note_tag(text); end - - # Describe an options hash in a method. The tag takes the - # name of the options parameter first, followed by optional types, - # the option key name, a default value for the key and a - # description of the option. The default value should be placed within - # parentheses and is optional (can be omitted). - # - # Note that a +@param+ tag need not be defined for the options - # hash itself, though it is useful to do so for completeness. - # - # @example - # # @param [Hash] opts the options to create a message with. - # # @option opts [String] :subject The subject - # # @option opts [String] :from ('nobody') From address - # # @option opts [String] :to Recipient email - # # @option opts [String] :body ('') The email's body - # def send_email(opts = {}) end - # @note For keyword parameters, use +@param+, not +@option+. - # - # source://yard//lib/yard/tags/library.rb#168 - def option_tag(text); end - - # Describe that your method can be used in various - # contexts with various parameters or return types. The first - # line should declare the new method signature, and the following - # indented tag data will be a new documentation string with its - # own tags adding metadata for such an overload. - # - # @example - # # @overload set(key, value) - # # Sets a value on key - # # @param key [Symbol] describe key param - # # @param value [Object] describe value param - # # @overload set(value) - # # Sets a value on the default key +:foo+ - # # @param value [Object] describe value param - # def set(*args) end - # - # source://yard//lib/yard/tags/library.rb#161 - def overload_tag(text); end - - # Documents a single method parameter (either regular or keyword) with a given name, type - # and optional description. - # - # @example - # # @param url [String] the URL of the page to download - # # @param directory [String] the name of the directory to save to - # def load_page(url, directory: 'pages') end - # - # source://yard//lib/yard/tags/library.rb#168 - def param_tag(text); end - - # source://yard//lib/yard/tags/library.rb#202 - def parse_directive(tag, parser); end - - # Declares that the _logical_ visibility of an object is private. - # In other words, it specifies that this method should be marked - # private but cannot due to Ruby's visibility restrictions. This - # exists for classes, modules and constants that do not obey Ruby's - # visibility rules. For instance, an inner class might be considered - # "private", though Ruby would make no such distinction. - # - # This tag is meant to be used in conjunction with the +--no-private+ - # command-line option, and is required to actually remove these objects - # from documentation output. See {file:README.md} for more information on - # switches. - # - # If you simply want to set the API visibility of a method, you should - # look at the {tag:api} tag instead. - # - # @example - # # @private - # class InteralImplementation; end - # @note This method is not recommended for hiding undocumented or - # "unimportant" methods. This tag should only be used to mark objects - # private when Ruby visibility rules cannot do so. In Ruby 1.9.3, you - # can use +private_constant+ to declare constants (like classes or - # modules) as private, and should be used instead of +@private+. - # @note This tag is *transitive*. If it is applied on a - # namespace (module or class), it will immediately be - # applied to all children objects of that namespace unless - # it is redefined on the child object. - # @see tag:api - # - # source://yard//lib/yard/tags/library.rb#168 - def private_tag(text); end - - # Describes that a method may raise a given exception, with - # an optional description of what it may mean. - # - # @example - # # @raise [AccountBalanceError] if the account does not have - # # sufficient funds to perform the transaction - # def withdraw(amount) end - # - # source://yard//lib/yard/tags/library.rb#168 - def raise_tag(text); end - - # Describes the return value (and type or types) of a method. - # You can list multiple return tags for a method in the case - # where a method has distinct return cases. In this case, each - # case should begin with "if ...". - # - # @example A regular return value - # # @return [Fixnum] the size of the file - # def size; @file.size end - # @example A method returns an Array or a single object - # # @return [String] if a single object was returned - # # from the database. - # # @return [Array<String>] if multiple objects were - # # returned. - # def find(query) end - # - # source://yard//lib/yard/tags/library.rb#168 - def return_tag(text); end - - # Sets the scope of a DSL method. Only applicable to DSL method - # calls. Acceptable values are 'class' or 'instance' - # - # source://yard//lib/yard/tags/library.rb#202 - def scope_directive(tag, parser); end - - # "See Also" references for an object. Accepts URLs or - # other code objects with an optional description at the end. - # Note that the URL or object will be automatically linked by - # YARD and does not need to be formatted with markup. - # - # @example - # # Synchronizes system time using NTP. - # # @see http://ntp.org/documentation.html NTP Documentation - # # @see NTPHelperMethods - # class NTPUpdater; end - # - # source://yard//lib/yard/tags/library.rb#168 - def see_tag(text); end - - # Lists the version that the object was first added. - # - # @example - # # @since 1.2.4 - # def clear_routes; end - # @note This tag is *transitive*. If it is applied on a - # namespace (module or class), it will immediately be - # applied to all children objects of that namespace unless - # it is redefined on the child object. - # - # source://yard//lib/yard/tags/library.rb#168 - def since_tag(text); end - - # Creates a new {Tag} object with a given tag name and data - # - # @return [Tag] the newly created tag object - # - # source://yard//lib/yard/tags/library.rb#273 - def tag_create(tag_name, tag_buf); end - - # Marks a TODO note in the object being documented. - # For reference, objects with TODO items can be enumerated - # from the command line with a simple command: - # - # !!!sh - # mocker$ yard list --query '@todo' - # lib/mocker/mocker.rb:15: Mocker - # lib/mocker/report/html.rb:5: Mocker::Report::Html - # - # YARD can also be used to enumerate the TODO items from - # a short script: - # - # !!!ruby - # require 'yard' - # YARD::Registry.load!.all.each do |o| - # puts o.tag(:todo).text if o.tag(:todo) - # end - # - # @example - # # @todo Add support for Jabberwocky service. - # # There is an open source Jabberwocky library available - # # at http://jbrwcky.org that can be easily integrated. - # class Wonderlander; end - # @see tag:note - # - # source://yard//lib/yard/tags/library.rb#168 - def todo_tag(text); end - - # Lists the version of a class, module or method. This is - # similar to a library version, but at finer granularity. - # In some cases, version of specific modules, classes, methods - # or generalized components might change independently between - # releases. A version tag is used to infer the API compatibility - # of a specific object. - # - # @example - # # The public REST API for http://jbrwcky.org - # # @version 2.0 - # class JabberwockyAPI; end - # - # source://yard//lib/yard/tags/library.rb#168 - def version_tag(text); end - - # Sets the visibility of a DSL method. Only applicable to - # DSL method calls. Acceptable values are public, protected, or private. - # - # source://yard//lib/yard/tags/library.rb#202 - def visibility_directive(tag, parser); end - - # Describes what a method might yield to a given block. - # The types specifier list should not list types, but names - # of the parameters yielded to the block. If you define - # parameters with +@yieldparam+, you do not need to define - # the parameters in the type specification of +@yield+ as - # well. - # - # @example - # # For a block {|a,b,c| ... } - # # @yield [a, b, c] Gives 3 random numbers to the block - # def provide3values(&block) yield(42, 42, 42) end - # @see tag:yieldparam - # @see tag:yieldreturn - # - # source://yard//lib/yard/tags/library.rb#168 - def yield_tag(text); end - - # Defines a parameter yielded by a block. If you define the - # parameters with +@yieldparam+, you do not need to define - # them via +@yield+ as well. - # - # @example - # # @yieldparam [String] name the name that is yielded - # def with_name(name) yield(name) end - # - # source://yard//lib/yard/tags/library.rb#168 - def yieldparam_tag(text); end - - # Documents the value and type that the block is expected - # to return to the method. - # - # @example - # # @yieldreturn [Fixnum] the number to add 5 to. - # def add5_block(&block) 5 + yield end - # @see tag:return - # - # source://yard//lib/yard/tags/library.rb#168 - def yieldreturn_tag(text); end - - private - - # @return [Directive] - # - # source://yard//lib/yard/tags/library.rb#244 - def directive_call(tag, parser); end - - # source://yard//lib/yard/tags/library.rb#233 - def send_to_factory(tag_name, meth, text); end - - class << self - # Replace the factory object responsible for parsing tags by setting - # this to an object (or class) that responds to +parse_TAGNAME+ methods - # where +TAGNAME+ is the name of the tag. - # - # You should set this value before performing any source parsing with - # YARD, otherwise your factory class will not be used. - # - # @example - # YARD::Tags::Library.default_factory = MyFactory - # @see DefaultFactory - # - # source://yard//lib/yard/tags/library.rb#83 - def default_factory; end - - # Replace the factory object responsible for parsing tags by setting - # this to an object (or class) that responds to +parse_TAGNAME+ methods - # where +TAGNAME+ is the name of the tag. - # - # You should set this value before performing any source parsing with - # YARD, otherwise your factory class will not be used. - # - # @example - # YARD::Tags::Library.default_factory = MyFactory - # @see DefaultFactory - # - # source://yard//lib/yard/tags/library.rb#87 - def default_factory=(factory); end - - # @overload define_directive - # - # source://yard//lib/yard/tags/library.rb#196 - def define_directive(tag, tag_meth = T.unsafe(nil), directive_class = T.unsafe(nil)); end - - # Convenience method to define a new tag using one of {Tag}'s factory methods, or the - # regular {DefaultFactory#parse_tag} factory method if none is supplied. - # - # @param label [#to_s] the label used when displaying the tag in templates - # @param tag [#to_s] the tag name to create - # @param meth [#to_s, Class<Tag>] the {Tag} factory method to call when - # creating the tag or the name of the class to directly create a tag for - # - # source://yard//lib/yard/tags/library.rb#157 - def define_tag(label, tag, meth = T.unsafe(nil)); end - - # source://yard//lib/yard/tags/library.rb#220 - def directive_method_name(tag_name); end - - # Returns the factory method used to parse the tag text for a specific tag - # - # @param tag [Symbol] the tag name - # @return [Symbol] the factory method name for the tag - # @return [Class<Tag>, Symbol] the Tag class to use to parse the tag - # or the method to call on the factory class - # @return [nil] if the tag is freeform text - # @since 0.6.0 - # - # source://yard//lib/yard/tags/library.rb#99 - def factory_method_for(tag); end - - # Returns the factory method used to parse the tag text for a specific - # directive - # - # @param directive [Symbol] the directive name - # @return [Symbol] the factory method name for the tag - # @return [Class<Tag>, Symbol] the Tag class to use to parse the tag or - # the methods to call on the factory class - # @return [nil] if the tag is freeform text - # @since 0.8.0 - # - # source://yard//lib/yard/tags/library.rb#112 - def factory_method_for_directive(directive); end - - # @return [Library] the main Library instance object. - # - # source://yard//lib/yard/tags/library.rb#67 - def instance; end - - # @return [SymbolHash{Symbol=>String}] the map of tag names and their - # respective display labels. - # - # source://yard//lib/yard/tags/library.rb#63 - def labels; end - - # Sorts the labels lexically by their label name, often used when displaying - # the tags. - # - # @return [Array<Symbol>, String] the sorted labels as an array of the tag name and label - # - # source://yard//lib/yard/tags/library.rb#142 - def sorted_labels; end - - # source://yard//lib/yard/tags/library.rb#216 - def tag_method_name(tag_name); end - - # Sets the list of tags that should apply to any children inside the - # namespace they are defined in. For instance, a "@since" tag should - # apply to all methods inside a module it is defined in. Transitive - # tags can be overridden by directly defining a tag on the child object. - # - # @return [Array<Symbol>] a list of transitive tags - # @since 0.6.0 - # - # source://yard//lib/yard/tags/library.rb#136 - def transitive_tags; end - - # Sets the list of tags that should apply to any children inside the - # namespace they are defined in. For instance, a "@since" tag should - # apply to all methods inside a module it is defined in. Transitive - # tags can be overridden by directly defining a tag on the child object. - # - # @return [Array<Symbol>] a list of transitive tags - # @since 0.6.0 - # - # source://yard//lib/yard/tags/library.rb#136 - def transitive_tags=(_arg0); end - - # Sets the list of tags to display when rendering templates. The order of - # tags in the list is also significant, as it represents the order that - # tags are displayed in templates. - # - # You can use the {Array#place} to insert new tags to be displayed in - # the templates at specific positions: - # - # Library.visible_tags.place(:mytag).before(:return) - # - # @return [Array<Symbol>] a list of ordered tags - # @since 0.6.0 - # - # source://yard//lib/yard/tags/library.rb#127 - def visible_tags; end - - # Sets the list of tags to display when rendering templates. The order of - # tags in the list is also significant, as it represents the order that - # tags are displayed in templates. - # - # You can use the {Array#place} to insert new tags to be displayed in - # the templates at specific positions: - # - # Library.visible_tags.place(:mytag).before(:return) - # - # @return [Array<Symbol>] a list of ordered tags - # @since 0.6.0 - # - # source://yard//lib/yard/tags/library.rb#127 - def visible_tags=(_arg0); end - - private - - # source://yard//lib/yard/tags/library.rb#226 - def tag_or_directive_method_name(tag_name, type = T.unsafe(nil)); end - end -end - -# Defines a block of text to be expanded whenever the macro is called by name -# in subsequent docstrings. The macro data can be any arbitrary text data, be -# it regular documentation, meta-data tags or directives. -# -# == Defining a Macro -# -# A macro must first be defined in order to be used. Note that a macro is also -# expanded upon definition if it defined on an object (the docstring of a -# method, class, module or constant object as opposed to a free standing -# comment). To define a macro, use the "new" or "attach" identifier in the -# types specifier list. A macro will also automatically be created if an -# indented macro data block is given, so the keywords are not strictly needed. -# -# === Anonymous Macros -# -# In addition to standard named macros, macros can be defined anonymously if -# no name is given. In this case, they can not be re-used in future docstrings, -# but they will expand in the first definition. This is useful when needing -# to take advantage of the macro expansion variables (described below). -# -# == Using a Macro -# -# To re-use a macro in another docstring after it is defined, simply use -# <tt>@!macro the_name</tt> with no indented block of macro data. The resulting -# data will be expanded in place. -# -# == Attaching a Macro to a DSL Method -# -# Macros can be defined to auto-expand on DSL-style class method calls. To -# define a macro to be auto expanded in this way, use the "attach" keyword -# in the type specifier list ("new" is implied). -# -# Attached macros can also be attached directly on the class method declaration -# that provides the DSL method to its subclasses. The syntax in either case -# is the same. -# -# == Macro Expansion Variables -# -# In the case of using macros on DSL-style method calls, a number of expansion -# variables can be used for interpolation inside of the macro data. The variables, -# similar in syntax to Ruby's global variables, are as follows: -# -# * $0 - the method name being called -# * $1, $2, $3, ... - the Nth argument in the method call -# * $& - the full source line -# -# The following example shows what the expansion variables might hold for a given -# DSL method call: -# -# property :foo, :a, :b, :c, String -# # $0 => "property" -# # $1 => "foo" -# # $2 => "a" -# # $& => "property :foo, :a, :b, :c, String" -# -# === Ranges -# -# Ranges are also acceptable with the syntax <tt>${N-M}</tt>. Negative values -# on either N or M are valid, and refer to indexes from the end of the list. -# Consider a DSL method that creates a method using the first argument with -# argument names following, ending with the return type of the method. This -# could be documented as: -# -# # @!macro dsl_method -# # @!method $1(${2--2}) -# # @return [${-1}] the return value of $0 -# create_method_with_args :foo, :a, :b, :c, String -# -# As described, the method is using the signature <tt>foo(a, b, c)</tt> and the return -# type from the last argument, +String+. When using ranges, tokens are joined -# with commas. Note that this includes using $0: -# -# !!!plain -# $0-1 # => Interpolates to "create_method_with_args, foo" -# -# If you want to separate them with spaces, use <tt>$1 $2 $3 $4 ...</tt>. Note that -# if the token cannot be expanded, it will return the empty string (not an error), -# so it would be safe to list <tt>$1 $2 ... $10</tt>, for example. -# -# === Escaping Interpolation -# -# Interpolation can be escaped by prefixing the +$+ with +\\\+, like so: -# -# # @!macro foo -# # I have \$2.00 USD. -# -# @example Defining a simple macro -# # @!macro [new] returnself -# # @return [self] returns itself -# @example Using a simple macro in multiple docstrings -# # Documentation for map -# # ... -# # @macro returnself -# def map; end -# -# # Documentation for filter -# # ... -# # @macro returnself -# def filter; end -# @example Attaching a macro to a class method (for DSL usage) -# class Resource -# # Defines a new property -# # @param [String] name the property name -# # @param [Class] type the property's type -# # @!macro [attach] property -# # @return [$2] the $1 property -# def self.property(name, type) end -# end -# -# class Post < Resource -# property :title, String -# property :view_count, Integer -# end -# @example Attaching a macro directly to a DSL method -# class Post < Resource -# # @!macro [attach] property -# # @return [$2] the $1 property -# property :title, String -# -# # Macro will expand on this definition too -# property :view_count, Integer -# end -# @since 0.7.0 -# -# source://yard//lib/yard/tags/directives.rb#257 -class YARD::Tags::MacroDirective < ::YARD::Tags::Directive - # @raise [TagFormatError] - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#258 - def call; end - - private - - # @return [Boolean] - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#287 - def anonymous?; end - - # @return [Boolean] - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#276 - def attach?; end - - # @return [Boolean] - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#282 - def class_method?; end - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#291 - def expand(macro_data); end - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#307 - def find_or_create; end - - # @return [Boolean] - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#271 - def new?; end - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#331 - def warn; end -end - -# Defines a method object with a given method signature, using indented -# block data as the method's docstring. The signature is similar to the -# {tag:overload} tag. The comment containing this directive does not need -# to be attached to any source, but if it is, that source code will be -# used as the method's source. -# -# To define an attribute method, see {tag:!attribute} -# -# @example Defining a simple method -# # @!method quit(username, message = "Quit") -# # Sends a quit message to the server for a +username+. -# # @param [String] username the username to quit -# # @param [String] message the quit message -# quit_message_method -# @example Attaching multiple methods to the same source -# # @!method method1 -# # @!method method2 -# create_methods :method1, :method2 -# @note This directive should only be used if there is no explicit -# declaration for the method in any source files (i.e., the method -# is declared dynamically via meta-programming). In all other cases, add -# documentation to the method definition itself. -# @note For backwards compatibility support, you do not need to indent -# the method's docstring text. If a +@!method+ directive is seen with -# no indented block, the entire docstring is used as the new method's -# docstring text. -# @see tag:!attribute -# @since 0.7.0 -# -# source://yard//lib/yard/tags/directives.rb#367 -class YARD::Tags::MethodDirective < ::YARD::Tags::Directive - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#372 - def after_parse; end - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#370 - def call; end - - protected - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#412 - def create_object; end - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#380 - def method_name; end - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#389 - def method_signature; end - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#393 - def sanitized_tag_signature; end - - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#402 - def use_indented_text; end -end - -# @since 0.7.0 -# -# source://yard//lib/yard/tags/directives.rb#368 -YARD::Tags::MethodDirective::SCOPE_MATCH = T.let(T.unsafe(nil), Regexp) - -# source://yard//lib/yard/tags/option_tag.rb#4 -class YARD::Tags::OptionTag < ::YARD::Tags::Tag - # @return [OptionTag] a new instance of OptionTag - # - # source://yard//lib/yard/tags/option_tag.rb#7 - def initialize(tag_name, name, pair); end - - # Returns the value of attribute pair. - # - # source://yard//lib/yard/tags/option_tag.rb#5 - def pair; end - - # Sets the attribute pair - # - # @param value the value to set the attribute pair to. - # - # source://yard//lib/yard/tags/option_tag.rb#5 - def pair=(_arg0); end -end - -# source://yard//lib/yard/tags/overload_tag.rb#4 -class YARD::Tags::OverloadTag < ::YARD::Tags::Tag - # @return [OverloadTag] a new instance of OverloadTag - # - # source://yard//lib/yard/tags/overload_tag.rb#7 - def initialize(tag_name, text); end - - # Returns the value of attribute docstring. - # - # source://yard//lib/yard/tags/overload_tag.rb#5 - def docstring; end - - # @return [Boolean] - # - # source://yard//lib/yard/tags/overload_tag.rb#15 - def has_tag?(name); end - - # @return [Boolean] - # - # source://yard//lib/yard/tags/overload_tag.rb#36 - def is_a?(other); end - - # @return [Boolean] - # - # source://yard//lib/yard/tags/overload_tag.rb#36 - def kind_of?(other); end - - # source://yard//lib/yard/tags/overload_tag.rb#28 - def method_missing(*args, &block); end - - # source://yard//lib/yard/tags/overload_tag.rb#23 - def name(prefix = T.unsafe(nil)); end - - # source://yard//lib/yard/tags/overload_tag.rb#17 - def object=(value); end - - # Returns the value of attribute parameters. - # - # source://yard//lib/yard/tags/overload_tag.rb#5 - def parameters; end - - # Returns the value of attribute signature. - # - # source://yard//lib/yard/tags/overload_tag.rb#5 - def signature; end - - # source://yard//lib/yard/tags/overload_tag.rb#13 - def tag(name); end - - # source://yard//lib/yard/tags/overload_tag.rb#14 - def tags(name = T.unsafe(nil)); end - - # source://yard//lib/yard/tags/overload_tag.rb#32 - def type; end - - private - - # source://yard//lib/yard/tags/overload_tag.rb#53 - def parse_signature; end - - # source://yard//lib/yard/tags/overload_tag.rb#43 - def parse_tag(text); end -end - -# Parses a block of code as if it were present in the source file at that -# location. This directive is useful if a class has dynamic meta-programmed -# behaviour that cannot be recognized by YARD. -# -# You can specify the language of the code block using the types -# specification list. By default, the code language is "ruby". -# -# @example Documenting dynamic module inclusion -# class User -# # includes "UserMixin" and extends "UserMixin::ClassMethods" -# # using the UserMixin.included callback. -# # @!parse include UserMixin -# # @!parse extend UserMixin::ClassMethods -# end -# @example Declaring a method as an attribute -# # This should really be an attribute -# # @!parse attr_reader :foo -# def object; @parent.object end -# @example Parsing C code -# # @!parse [c] -# # void Init_Foo() { -# # rb_define_method(rb_cFoo, "method", method, 0); -# # } -# @since 0.8.0 -# -# source://yard//lib/yard/tags/directives.rb#544 -class YARD::Tags::ParseDirective < ::YARD::Tags::Directive - # @since 0.8.0 - # - # source://yard//lib/yard/tags/directives.rb#545 - def call; end -end - -# source://yard//lib/yard/tags/ref_tag.rb#4 -module YARD::Tags::RefTag - # Returns the value of attribute owner. - # - # source://yard//lib/yard/tags/ref_tag.rb#5 - def owner; end - - # Sets the attribute owner - # - # @param value the value to set the attribute owner to. - # - # source://yard//lib/yard/tags/ref_tag.rb#5 - def owner=(_arg0); end -end - -# source://yard//lib/yard/tags/ref_tag_list.rb#4 -class YARD::Tags::RefTagList - # @return [RefTagList] a new instance of RefTagList - # - # source://yard//lib/yard/tags/ref_tag_list.rb#7 - def initialize(tag_name, owner, name = T.unsafe(nil)); end - - # Returns the value of attribute name. - # - # source://yard//lib/yard/tags/ref_tag_list.rb#5 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://yard//lib/yard/tags/ref_tag_list.rb#5 - def name=(_arg0); end - - # Returns the value of attribute owner. - # - # source://yard//lib/yard/tags/ref_tag_list.rb#5 - def owner; end - - # Sets the attribute owner - # - # @param value the value to set the attribute owner to. - # - # source://yard//lib/yard/tags/ref_tag_list.rb#5 - def owner=(_arg0); end - - # Returns the value of attribute tag_name. - # - # source://yard//lib/yard/tags/ref_tag_list.rb#5 - def tag_name; end - - # Sets the attribute tag_name - # - # @param value the value to set the attribute tag_name to. - # - # source://yard//lib/yard/tags/ref_tag_list.rb#5 - def tag_name=(_arg0); end - - # source://yard//lib/yard/tags/ref_tag_list.rb#13 - def tags; end -end - -# Modifies the current parsing scope (class or instance). If this -# directive is defined on a docstring attached to an object definition, -# it is applied only to that object. Otherwise, it applies the scope -# to all future objects in the namespace. -# -# @example Modifying the scope of a DSL method -# # @!scope class -# cattr_accessor :subclasses -# @example Modifying the scope of a set of methods -# # @!scope class -# -# # Documentation for method1 -# def method1; end -# -# # Documentation for method2 -# def method2; end -# @since 0.7.0 -# -# source://yard//lib/yard/tags/directives.rb#578 -class YARD::Tags::ScopeDirective < ::YARD::Tags::Directive - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#579 - def call; end -end - -# Represents a metadata tag value (+@tag+). Tags can have any combination of -# {#types}, {#name} and {#text}, or none of the above. -# -# @example Programmatic tag creation -# # The following docstring syntax: -# # @param [String, nil] arg an argument -# # -# # is equivalent to: -# Tag.new(:param, 'an argument', ['String', 'nil'], 'arg') -# -# source://yard//lib/yard/tags/tag.rb#13 -class YARD::Tags::Tag - # Creates a new tag object with a tag name and text. Optionally, formally declared types - # and a key name can be specified. - # - # Types are mainly for meta tags that rely on type information, such as +param+, +return+, etc. - # - # Key names are for tags that declare meta data for a specific key or name, such as +param+, - # +raise+, etc. - # - # @param tag_name [#to_s] the tag name to create the tag for - # @param text [String] the descriptive text for this tag - # @param types [Array<String>] optional type list of formally declared types - # for the tag - # @param name [String] optional key name which the tag refers to - # @return [Tag] a new instance of Tag - # - # source://yard//lib/yard/tags/tag.rb#45 - def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end - - # Provides a plain English summary of the type specification, or nil - # if no types are provided or parsable. - # - # @return [String] a plain English description of the associated types - # @return [nil] if no types are provided or not parsable - # - # source://yard//lib/yard/tags/tag.rb#66 - def explain_types; end - - # @return [String] a name associated with the tag - # @return [nil] if no tag name is supplied - # - # source://yard//lib/yard/tags/tag.rb#27 - def name; end - - # @return [String] a name associated with the tag - # @return [nil] if no tag name is supplied - # - # source://yard//lib/yard/tags/tag.rb#27 - def name=(_arg0); end - - # @return [CodeObjects::Base] the associated object - # - # source://yard//lib/yard/tags/tag.rb#30 - def object; end - - # @return [CodeObjects::Base] the associated object - # - # source://yard//lib/yard/tags/tag.rb#30 - def object=(_arg0); end - - # @return [String] the name of the tag - # - # source://yard//lib/yard/tags/tag.rb#15 - def tag_name; end - - # @return [String] the name of the tag - # - # source://yard//lib/yard/tags/tag.rb#15 - def tag_name=(_arg0); end - - # @return [String] the tag text associated with the tag - # @return [nil] if no tag text is supplied - # - # source://yard//lib/yard/tags/tag.rb#19 - def text; end - - # @return [String] the tag text associated with the tag - # @return [nil] if no tag text is supplied - # - # source://yard//lib/yard/tags/tag.rb#19 - def text=(_arg0); end - - # Convenience method to access the first type specified. This should mainly - # be used for tags that only specify one type. - # - # @return [String] the first of the list of specified types - # @see #types - # - # source://yard//lib/yard/tags/tag.rb#57 - def type; end - - # @return [Array<String>] a list of types associated with the tag - # @return [nil] if no types are associated with the tag - # - # source://yard//lib/yard/tags/tag.rb#23 - def types; end - - # @return [Array<String>] a list of types associated with the tag - # @return [nil] if no types are associated with the tag - # - # source://yard//lib/yard/tags/tag.rb#23 - def types=(_arg0); end -end - -# source://yard//lib/yard/tags/tag_format_error.rb#4 -class YARD::Tags::TagFormatError < ::RuntimeError; end - -# source://yard//lib/yard/tags/types_explainer.rb#6 -class YARD::Tags::TypesExplainer - class << self - # Provides a plain English summary of the type specification, or nil - # if no types are provided or parsable. - # - # @param types [Array<String>] a list of types to parse and summarize - # @return [String] a plain English description of the associated types - # @return [nil] if no types are provided or not parsable - # - # source://yard//lib/yard/tags/types_explainer.rb#9 - def explain(*types); end - - # Provides a plain English summary of the type specification, or nil - # if no types are provided or parsable. - # - # @param types [Array<String>] a list of types to parse and summarize - # @raise [SyntaxError] if the types are not parsable - # @return [String] a plain English description of the associated types - # @return [nil] if no types are provided or not parsable - # - # source://yard//lib/yard/tags/types_explainer.rb#17 - def explain!(*types); end - - private - - def new(*_arg0); end - end -end - -# @private -# -# source://yard//lib/yard/tags/types_explainer.rb#58 -class YARD::Tags::TypesExplainer::CollectionType < ::YARD::Tags::TypesExplainer::Type - # @return [CollectionType] a new instance of CollectionType - # - # source://yard//lib/yard/tags/types_explainer.rb#61 - def initialize(name, types); end - - # source://yard//lib/yard/tags/types_explainer.rb#66 - def to_s(_singular = T.unsafe(nil)); end - - # Returns the value of attribute types. - # - # source://yard//lib/yard/tags/types_explainer.rb#59 - def types; end - - # Sets the attribute types - # - # @param value the value to set the attribute types to. - # - # source://yard//lib/yard/tags/types_explainer.rb#59 - def types=(_arg0); end -end - -# @private -# -# source://yard//lib/yard/tags/types_explainer.rb#72 -class YARD::Tags::TypesExplainer::FixedCollectionType < ::YARD::Tags::TypesExplainer::CollectionType - # source://yard//lib/yard/tags/types_explainer.rb#73 - def to_s(_singular = T.unsafe(nil)); end -end - -# @private -# -# source://yard//lib/yard/tags/types_explainer.rb#79 -class YARD::Tags::TypesExplainer::HashCollectionType < ::YARD::Tags::TypesExplainer::Type - # @return [HashCollectionType] a new instance of HashCollectionType - # - # source://yard//lib/yard/tags/types_explainer.rb#82 - def initialize(name, key_types, value_types); end - - # Returns the value of attribute key_types. - # - # source://yard//lib/yard/tags/types_explainer.rb#80 - def key_types; end - - # Sets the attribute key_types - # - # @param value the value to set the attribute key_types to. - # - # source://yard//lib/yard/tags/types_explainer.rb#80 - def key_types=(_arg0); end - - # source://yard//lib/yard/tags/types_explainer.rb#88 - def to_s(_singular = T.unsafe(nil)); end - - # Returns the value of attribute value_types. - # - # source://yard//lib/yard/tags/types_explainer.rb#80 - def value_types; end - - # Sets the attribute value_types - # - # @param value the value to set the attribute value_types to. - # - # source://yard//lib/yard/tags/types_explainer.rb#80 - def value_types=(_arg0); end -end - -# @private -# -# source://yard//lib/yard/tags/types_explainer.rb#96 -class YARD::Tags::TypesExplainer::Parser - include ::YARD::CodeObjects - - # @return [Parser] a new instance of Parser - # - # source://yard//lib/yard/tags/types_explainer.rb#117 - def initialize(string); end - - # source://yard//lib/yard/tags/types_explainer.rb#121 - def parse; end - - class << self - # source://yard//lib/yard/tags/types_explainer.rb#113 - def parse(string); end - end -end - -# source://yard//lib/yard/tags/types_explainer.rb#99 -YARD::Tags::TypesExplainer::Parser::TOKENS = T.let(T.unsafe(nil), Hash) - -# @private -# -# source://yard//lib/yard/tags/types_explainer.rb#26 -class YARD::Tags::TypesExplainer::Type - # @return [Type] a new instance of Type - # - # source://yard//lib/yard/tags/types_explainer.rb#29 - def initialize(name); end - - # Returns the value of attribute name. - # - # source://yard//lib/yard/tags/types_explainer.rb#27 - def name; end - - # Sets the attribute name - # - # @param value the value to set the attribute name to. - # - # source://yard//lib/yard/tags/types_explainer.rb#27 - def name=(_arg0); end - - # source://yard//lib/yard/tags/types_explainer.rb#33 - def to_s(singular = T.unsafe(nil)); end - - private - - # source://yard//lib/yard/tags/types_explainer.rb#45 - def list_join(list); end -end - -# Modifies the current parsing visibility (public, protected, or private). -# If this directive is defined on a docstring attached to an object -# definition, it is applied only to that object. Otherwise, it applies -# the visibility to all future objects in the namespace. -# -# @example Modifying the visibility of a DSL method -# # @!visibility private -# cattr_accessor :subclasses -# @example Modifying the visibility of a set of methods -# # Note that Ruby's "protected" is recommended over this directive -# # @!visibility protected -# -# # Documentation for method1 -# def method1; end -# -# # Documentation for method2 -# def method2; end -# @since 0.7.0 -# -# source://yard//lib/yard/tags/directives.rb#610 -class YARD::Tags::VisibilityDirective < ::YARD::Tags::Directive - # @since 0.7.0 - # - # source://yard//lib/yard/tags/directives.rb#611 - def call; end -end - -# Namespace for templating system -# -# source://yard//lib/yard/autoload.rb#271 -module YARD::Templates; end - -# This module manages all creation, handling and rendering of {Template} -# objects. -# -# * To create a template object at a path, use {template}. -# * To render a template, call {render}. -# * To register a template path in the lookup paths, call {register_template_path}. -# -# source://yard//lib/yard/templates/engine.rb#11 -module YARD::Templates::Engine - class << self - # Passes a set of objects to the +:fulldoc+ template for full documentation generation. - # This is called by {CLI::Yardoc} to most commonly perform HTML - # documentation generation. - # - # @param objects [Array<CodeObjects::Base>] a list of {CodeObjects::Base} - # objects to pass to the template - # @param options [Hash] (see {render}) - # @return [void] - # - # source://yard//lib/yard/templates/engine.rb#100 - def generate(objects, options = T.unsafe(nil)); end - - # Registers a new template path in {template_paths} - # - # @param path [String] a new template path - # @return [void] - # - # source://yard//lib/yard/templates/engine.rb#20 - def register_template_path(path); end - - # Renders a template on a {CodeObjects::Base code object} using - # a set of default (overridable) options. Either the +:object+ - # or +:type+ keys must be provided. - # - # If a +:serializer+ key is provided and +:serialize+ is not set to - # false, the rendered contents will be serialized through the {Serializers::Base} - # object. See {with_serializer}. - # - # @example Renders an object with html formatting - # Engine.render(:format => :html, :object => obj) - # @example Renders without an object - # Engine.render(:type => :fulldoc, :otheropts => somevalue) - # @option options - # @option options - # @option options - # @param options [Hash] the options hash - # @return [String] the rendered template - # - # source://yard//lib/yard/templates/engine.rb#81 - def render(options = T.unsafe(nil)); end - - # Creates a template module representing the path. Searches on disk - # for the first directory named +path+ (joined by '/') within the - # template paths and builds a template module for. All other matching - # directories in other template paths will be included in the - # generated module as mixins (for overriding). - # - # @param path [Array<String, Symbol>] a list of path components - # @raise [ArgumentError] if the path does not exist within one of the - # {template_paths} on disk. - # @return [Template] the module representing the template - # - # source://yard//lib/yard/templates/engine.rb#34 - def template(*path); end - - # Forces creation of a template at +path+ within a +full_path+. - # - # @param path [String] the path name of the template - # @param full_paths [Array<String>] the full path on disk of the template - # @return [Template] the template module representing the +path+ - # - # source://yard//lib/yard/templates/engine.rb#52 - def template!(path, full_paths = T.unsafe(nil)); end - - # @return [Array<String>] the list of registered template paths - # - # source://yard//lib/yard/templates/engine.rb#14 - def template_paths; end - - # @return [Array<String>] the list of registered template paths - # - # source://yard//lib/yard/templates/engine.rb#14 - def template_paths=(_arg0); end - - # Serializes the results of a block with a +serializer+ object. - # - # @param object [CodeObjects::Base] the code object to serialize - # @param serializer [Serializers::Base] the serializer object - # @see Serializers::Base - # @yield a block whose result will be serialize - # @yieldreturn [String] the contents to serialize - # - # source://yard//lib/yard/templates/engine.rb#114 - def with_serializer(object, serializer); end - - private - - # Searches through the registered {template_paths} and returns - # all full directories that have the +path+ within them on disk. - # - # @param from_template [Template] if provided, allows a relative - # path to be specified from this template's full path. - # @param path [String] the path component to search for in the - # {template_paths} - # @return [Array<String>] a list of full paths that are existing - # candidates for a template module - # - # source://yard//lib/yard/templates/engine.rb#160 - def find_template_paths(from_template, path); end - - # Sets default options on the options hash - # - # @option options - # @option options - # @option options - # @param options [Hash] the options hash - # @return [void] - # - # source://yard//lib/yard/templates/engine.rb#140 - def set_default_options(options = T.unsafe(nil)); end - - # The name of the module that represents a +path+ - # - # @param path [String] the path to generate a module name for - # @return [String] the module name - # - # source://yard//lib/yard/templates/engine.rb#175 - def template_module_name(path); end - end -end - -# @since 0.5.4 -# -# source://yard//lib/yard/templates/erb_cache.rb#5 -module YARD::Templates::ErbCache - class << self - # @since 0.5.4 - # - # source://yard//lib/yard/templates/erb_cache.rb#17 - def clear!; end - - # @since 0.5.4 - # - # source://yard//lib/yard/templates/erb_cache.rb#6 - def method_for(filename); end - end -end - -# Namespace for template helpers -# -# source://yard//lib/yard/autoload.rb#272 -module YARD::Templates::Helpers; end - -# The base helper module included in all templates. -# -# source://yard//lib/yard/templates/helpers/base_helper.rb#4 -module YARD::Templates::Helpers::BaseHelper - # @example - # s = format_object_title ModuleObject.new(:root, :MyModuleName) - # s # => "Module: MyModuleName" - # @param object [CodeObjects::Base] the object to retrieve a title for - # @return [String] the page title name for a given object - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#196 - def format_object_title(object); end - - # @example Formatted type of an exception class - # o = ClassObject.new(:root, :MyError) - # o.superclass = P('RuntimeError') - # format_object_type(o) # => "Exception" - # @example Formatted type of a method - # o = MethodObject.new(:root, :to_s) - # format_object_type(o) # => "Method" - # @param object [CodeObjects::Base] the object to retrieve the type for - # @return [String] the human-readable formatted {CodeObjects::Base#type #type} - # for the object - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#182 - def format_object_type(object); end - - # Indents and formats source code - # - # @param value [String] the input source code - # @return [String] formatted source code - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#209 - def format_source(value); end - - # Formats a list of return types for output and links each type. - # - # @example Formatting types - # format_types(['String', 'Array']) #=> "(String, Array)" - # @example Formatting types without surrounding brackets - # format_types(['String', 'Array'], false) #=> "String, Array" - # @param list [Array<String>] a list of types - # @param brackets [Boolean] whether to surround the types in brackets - # @return [String] the formatted list of Ruby types - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#168 - def format_types(list, brackets = T.unsafe(nil)); end - - # An object that keeps track of global state throughout the entire template - # rendering process (including any sub-templates). - # - # @return [OpenStruct] a struct object that stores state - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#20 - def globals; end - - # Escapes text. This is used a lot by the HtmlHelper and there should - # be some helper to "clean up" text for whatever, this is it. - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#38 - def h(text); end - - # Links to an extra file - # - # @param filename [String] the filename to link to - # @param title [String] the title of the link - # @param anchor [String] optional anchor - # @return [String] the link to the file - # @since 0.5.5 - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#152 - def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end - - # Include a file as a docstring in output - # - # @param file [String] the filename to include - # @return [String] the file's contents - # @since 0.7.0 - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#113 - def link_include_file(file); end - - # Includes an object's docstring into output. - # - # @param obj [CodeObjects::Base] the object to include - # @return [String] the object's docstring (no tags) - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#105 - def link_include_object(obj); end - - # Links to an object with an optional title - # - # @param obj [CodeObjects::Base] the object to link to - # @param title [String] the title to use for the link - # @return [String] the linked object - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#122 - def link_object(obj, title = T.unsafe(nil)); end - - # Links to a URL - # - # @param url [String] the URL to link to - # @param title [String] the optional title to display the link as - # @param params [Hash] optional parameters for the link - # @return [String] the linked URL - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#141 - def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end - - # Links objects or URLs. This method will delegate to the correct +link_+ - # method depending on the arguments passed in. - # - # @example Linking a URL - # linkify('http://example.com') - # @example Including docstring contents of an object - # linkify('include:YARD::Docstring') - # @example Linking to an extra file - # linkify('file:README') - # @example Linking an object by path - # linkify('YARD::Docstring') - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#55 - def linkify(*args); end - - # Returns the value of attribute object. - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#5 - def object; end - - # Sets the attribute object - # - # @param value the value to set the attribute object to. - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#5 - def object=(_arg0); end - - # @return [CodeObjects::Base] the object representing the current generated - # page. Might not be the current {#object} when inside sub-templates. - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#11 - def owner; end - - # Runs a list of objects against the {Verifier} object passed into the - # template and returns the subset of verified objects. - # - # @param list [Array<CodeObjects::Base>] a list of code objects - # @return [Array<CodeObjects::Base>] a list of code objects that match - # the verifier. If no verifier is supplied, all objects are returned. - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#30 - def run_verifier(list); end - - # Returns the value of attribute serializer. - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#5 - def serializer; end - - # Sets the attribute serializer - # - # @param value the value to set the attribute serializer to. - # - # source://yard//lib/yard/templates/helpers/base_helper.rb#5 - def serializer=(_arg0); end -end - -# Helpers for various object types -# -# source://yard//lib/yard/templates/helpers/filter_helper.rb#5 -module YARD::Templates::Helpers::FilterHelper - # @return [Boolean] whether an object is a class - # - # source://yard//lib/yard/templates/helpers/filter_helper.rb#17 - def is_class?(object); end - - # @return [Boolean] whether an object is a method - # - # source://yard//lib/yard/templates/helpers/filter_helper.rb#7 - def is_method?(object); end - - # @return [Boolean] whether an object is a module - # - # source://yard//lib/yard/templates/helpers/filter_helper.rb#22 - def is_module?(object); end - - # @return [Boolean] whether an object is a namespace - # - # source://yard//lib/yard/templates/helpers/filter_helper.rb#12 - def is_namespace?(object); end -end - -# The helper module for HTML templates. -# -# source://yard//lib/yard/templates/helpers/html_helper.rb#7 -module YARD::Templates::Helpers::HtmlHelper - include ::YARD::Templates::Helpers::MarkupHelper - include ::YARD::Templates::Helpers::ModuleHelper - include ::YARD::Templates::Helpers::HtmlSyntaxHighlightHelper - - # @param object [CodeObjects::Base] the object to get an anchor for - # @return [String] the anchor for a specific object - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#347 - def anchor_for(object); end - - # Returns the current character set. The default value can be overridden - # by setting the +LANG+ environment variable or by overriding this - # method. In Ruby 1.9 you can also modify this value by setting - # +Encoding.default_external+. - # - # @return [String] the current character set - # @since 0.5.4 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#574 - def charset; end - - # Formats a list of objects and links them - # - # @return [String] a formatted list of objects - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#458 - def format_object_name_list(objects); end - - # Formats a list of types from a tag. - # - # @param typelist [Array<String>, FalseClass] the list of types to be formatted. - # @param brackets [Boolean] omits the surrounding - # brackets if +brackets+ is set to +false+. - # @return [String] the list of types formatted - # as [Type1, Type2, ...] with the types linked - # to their respective descriptions. - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#476 - def format_types(typelist, brackets = T.unsafe(nil)); end - - # Escapes HTML entities - # - # @param text [String] the text to escape - # @return [String] the HTML with escaped entities - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#23 - def h(text); end - - # Converts Asciidoc to HTML - # - # @param text [String] input Asciidoc text - # @return [String] output HTML - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#109 - def html_markup_asciidoc(text); end - - # Converts HTML to HTML - # - # @param text [String] input html - # @return [String] output HTML - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#168 - def html_markup_html(text); end - - # Converts Markdown to HTML - # - # @param text [String] input Markdown text - # @return [String] output HTML - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#78 - def html_markup_markdown(text); end - - # @return [String] the same text with no markup - # @since 0.6.6 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#160 - def html_markup_none(text); end - - # Converts org-mode to HTML - # - # @param text [String] input org-mode text - # @return [String] output HTML - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#102 - def html_markup_org(text); end - - # Converts plaintext to pre-formatted HTML - # - # @param text [String] the input text - # @return [String] the output HTML - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#146 - def html_markup_pre(text); end - - # Converts RDoc formatting (SimpleMarkup) to HTML - # - # @param text [String] the input RDoc formatted text - # @return [String] output HTML - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#136 - def html_markup_rdoc(text); end - - # Highlights Ruby source. Similar to {#html_syntax_highlight}, but - # this method is meant to be called from {#htmlify} when markup is - # set to "ruby". - # - # @param source [String] the Ruby source - # @return [String] the highlighted HTML - # @since 0.7.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#179 - def html_markup_ruby(source); end - - # Converts plaintext to regular HTML - # - # @param text [String] the input text - # @return [String] the output HTML - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#154 - def html_markup_text(text); end - - # Converts Textile to HTML - # - # @param text [String] the input Textile text - # @return [String] output HTML - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#118 - def html_markup_textile(text); end - - # Converts plaintext to strict Textile (hard breaks) - # - # @param text [String] the input textile data - # @return [String] the output HTML - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#128 - def html_markup_textile_strict(text); end - - # Syntax highlights +source+ in language +type+. - # - # @note To support a specific language +type+, implement the method - # +html_syntax_highlight_TYPE+ in this class. - # @param source [String] the source code to highlight - # @param type [Symbol, String] the language type (:ruby, :plain, etc). Use - # :plain for no syntax highlighting. - # @return [String] the highlighted source - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#199 - def html_syntax_highlight(source, type = T.unsafe(nil)); end - - # @return [String] unhighlighted source - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#210 - def html_syntax_highlight_plain(source); end - - # Turns text into HTML using +markup+ style formatting. - # - # @param text [String] the text to format - # @param markup [Symbol] examples are +:markdown+, +:textile+, +:rdoc+. - # To add a custom markup type, see {MarkupHelper} - # @return [String] the HTML - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#57 - def htmlify(text, markup = T.unsafe(nil)); end - - # @return [String] HTMLified text as a single line (paragraphs removed) - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#184 - def htmlify_line(*args); end - - # Inserts an include link while respecting inlining - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#296 - def insert_include(text, markup = T.unsafe(nil)); end - - # Links to an extra file - # - # @param filename [String] the filename to link to - # @param title [String] the title of the link - # @param anchor [String] optional anchor - # @return [String] the link to the file - # @since 0.5.5 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#270 - def link_file(filename, title = T.unsafe(nil), anchor = T.unsafe(nil)); end - - # Include a file as a docstring in output - # - # @param file [String] the filename to include - # @return [String] the file's contents - # @since 0.7.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#282 - def link_include_file(file); end - - # Includes an object's docstring into output. - # - # @param obj [CodeObjects::Base] the object to include - # @return [String] the object's docstring (no tags) - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#291 - def link_include_object(obj); end - - # Links to an object with an optional title - # - # @param obj [CodeObjects::Base] the object to link to - # @param title [String] the title to use for the link - # @return [String] the linked object - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#301 - def link_object(obj, title = T.unsafe(nil), anchor = T.unsafe(nil), relative = T.unsafe(nil)); end - - # Links to a URL - # - # @param url [String] the URL to link to - # @param title [String] the optional title to display the link as - # @param params [Hash] optional parameters for the link - # @return [String] the linked URL - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#332 - def link_url(url, title = T.unsafe(nil), params = T.unsafe(nil)); end - - # source://yard//lib/yard/templates/helpers/html_helper.rb#400 - def mtime(_file); end - - # Returns the URL for an object. - # - # @param obj [String, CodeObjects::Base] the object (or object path) to link to - # @param anchor [String] the anchor to link to - # @param relative [Boolean] use a relative or absolute link - # @return [String] the URL location of the object - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#368 - def mtime_url(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end - - # Resolves any text in the form of +{Name}+ to the object specified by - # Name. Also supports link titles in the form +{Name title}+. - # - # @example Linking to an instance method - # resolve_links("{MyClass#method}") # => "<a href='...'>MyClass#method</a>" - # @example Linking to a class with a title - # resolve_links("{A::B::C the C class}") # => "<a href='...'>the c class</a>" - # @param text [String] the text to resolve links in - # @return [String] HTML with linkified references - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#225 - def resolve_links(text); end - - # Formats the signature of method +meth+. - # - # @param meth [CodeObjects::MethodObject] the method object to list - # the signature of - # @param link [Boolean] whether to link the method signature to the details view - # @param show_extras [Boolean] whether to show extra meta-data (visibility, attribute info) - # @param full_attr_name [Boolean] whether to show the full attribute name - # ("name=" instead of "name") - # @return [String] the formatted method signature - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#529 - def signature(meth, link = T.unsafe(nil), show_extras = T.unsafe(nil), full_attr_name = T.unsafe(nil)); end - - # Get the return types for a method signature. - # - # @param meth [CodeObjects::MethodObject] the method object - # @param link [Boolean] whether to link the types - # @return [String] the signature types - # @since 0.5.3 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#492 - def signature_types(meth, link = T.unsafe(nil)); end - - # Returns the URL for an object. - # - # @param obj [String, CodeObjects::Base] the object (or object path) to link to - # @param anchor [String] the anchor to link to - # @param relative [Boolean] use a relative or absolute link - # @return [String] the URL location of the object - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#368 - def url_for(obj, anchor = T.unsafe(nil), relative = T.unsafe(nil)); end - - # Returns the URL for a specific file - # - # @param filename [String, CodeObjects::ExtraFileObject] the filename to link to - # @param anchor [String] optional anchor - # @return [String] the URL pointing to the file - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#407 - def url_for_file(filename, anchor = T.unsafe(nil)); end - - # Returns the URL for the frameset page - # - # @return [String] the URL pointing to the frames page - # @since 0.8.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#434 - def url_for_frameset; end - - # Returns the URL for the alphabetic index page - # - # @return [String] the URL pointing to the first main page the - # user should see. - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#450 - def url_for_index; end - - # Returns the URL for a list type - # - # @param type [String, Symbol] the list type to generate a URL for - # @return [String] the URL pointing to the list - # @since 0.8.0 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#426 - def url_for_list(type); end - - # Returns the URL for the main page (README or alphabetic index) - # - # @return [String] the URL pointing to the first main page the - # user should see. - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#442 - def url_for_main; end - - private - - # Converts a {CodeObjects::MethodObject} into an overload object - # - # @since 0.5.3 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#609 - def convert_method_to_overload(meth); end - - # Parses code block's HTML attributes in order to detect the programming - # language of what's enclosed in that code block. - # - # @param pre_html_attrs [String, nil] HTML attribute list of +pre+ element - # @param code_html_attrs [String, nil] HTML attribute list of +code+ - # element - # @return [String, nil] detected programming language - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#664 - def detect_lang_in_codeblock_attributes(pre_html_attrs, code_html_attrs); end - - # Parses code blocks out of html and performs syntax highlighting - # on code inside of the blocks. - # - # @param html [String] the html to search for code in - # @return [String] highlighted html - # @see #html_syntax_highlight - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#640 - def parse_codeblocks(html); end - - # Parses !!!lang out of codeblock, returning the codeblock language - # followed by the source code. - # - # @param source [String] the source code whose language to determine - # @return [Array(String, String)] the language, if any, and the - # remaining source - # @since 0.7.5 - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#624 - def parse_lang_for_codeblock(source); end - - # Converts a set of hash options into HTML attributes for a tag - # - # @param opts [Hash{String => String}] the tag options - # @return [String] the tag attributes of an HTML tag - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#603 - def tag_attrs(opts = T.unsafe(nil)); end - - # Escapes a URL - # - # @param text [String] the URL - # @return [String] the escaped URL - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#31 - def urlencode(text); end - - class << self - # Escapes a URL - # - # @param text [String] the URL - # @return [String] the escaped URL - # - # source://yard//lib/yard/templates/helpers/html_helper.rb#31 - def urlencode(text); end - end -end - -# @private -# -# source://yard//lib/yard/templates/helpers/html_helper.rb#15 -YARD::Templates::Helpers::HtmlHelper::ASCIIDOC_ATTRIBUTES = T.let(T.unsafe(nil), Hash) - -# @private -# -# source://yard//lib/yard/templates/helpers/html_helper.rb#12 -YARD::Templates::Helpers::HtmlHelper::URLMATCH = T.let(T.unsafe(nil), Regexp) - -# Helper methods for syntax highlighting. -# -# source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#6 -module YARD::Templates::Helpers::HtmlSyntaxHighlightHelper - include ::YARD::Templates::Helpers::ModuleHelper - - # Highlights Ruby source - # - # @param source [String] the Ruby source code - # @return [String] the highlighted Ruby source - # - # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#12 - def html_syntax_highlight_ruby(source); end - - private - - # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#63 - def clean_token_object(token_obj); end - - # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#45 - def html_syntax_highlight_ruby_legacy(source); end - - # source://yard//lib/yard/templates/helpers/html_syntax_highlight_helper.rb#22 - def html_syntax_highlight_ruby_ripper(source); end -end - -# Namespace for markup providers -# -# source://yard//lib/yard/autoload.rb#273 -module YARD::Templates::Helpers::Markup; end - -# source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#13 -class YARD::Templates::Helpers::Markup::RDocMarkdown < ::YARD::Templates::Helpers::Markup::RDocMarkup - # @return [RDocMarkdown] a new instance of RDocMarkdown - # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#14 - def initialize(text); end - - # source://yard//lib/yard/templates/helpers/markup/rdoc_markdown.rb#18 - def fix_typewriter(html); end -end - -# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 -class YARD::Templates::Helpers::Markup::RDocMarkup - # @return [RDocMarkup] a new instance of RDocMarkup - # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#41 - def initialize(text); end - - # Returns the value of attribute from_path. - # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 - def from_path; end - - # Sets the attribute from_path - # - # @param value the value to set the attribute from_path to. - # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#35 - def from_path=(_arg0); end - - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#50 - def to_html; end - - private - - # Don't allow -- to turn into — element. The chances of this being - # some --option is far more likely than the typographical meaning. - # - # @todo Refactor into own SimpleMarkup subclass - # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#87 - def fix_dash_dash(text); end - - # Fixes RDoc behaviour with ++ only supporting alphanumeric text. - # - # @todo Refactor into own SimpleMarkup subclass - # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#66 - def fix_typewriter(text); end -end - -# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#12 -YARD::Templates::Helpers::Markup::RDocMarkup::MARKUP = RDoc::Markup - -# source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#13 -class YARD::Templates::Helpers::Markup::RDocMarkupToHtml < ::RDoc::Markup::ToHtml - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#16 - def initialize; end - - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#100 - def accept_paragraph(*args); end - - # Returns the value of attribute from_path. - # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 - def from_path; end - - # Sets the attribute from_path - # - # @param value the value to set the attribute from_path to. - # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#93 - def from_path=(_arg0); end - - # Disable auto-link of URLs - # - # source://yard//lib/yard/templates/helpers/markup/rdoc_markup.rb#96 - def handle_special_HYPERLINK(special); end -end - -# Helper methods for loading and managing markup types. -# -# source://yard//lib/yard/templates/helpers/markup_helper.rb#7 -module YARD::Templates::Helpers::MarkupHelper - # Attempts to load the first valid markup provider in {MARKUP_PROVIDERS}. - # If a provider is specified, immediately try to load it. - # - # On success this sets `@markup_provider` and `@markup_class` to - # the provider name and library constant class/module respectively for - # the loaded provider. - # - # On failure this method will inform the user that no provider could be - # found and exit the program. - # - # @return [Boolean] whether the markup provider was successfully loaded. - # - # source://yard//lib/yard/templates/helpers/markup_helper.rb#87 - def load_markup_provider(type = T.unsafe(nil)); end - - # Gets the markup provider class/module constant for a markup type - # Call {#load_markup_provider} before using this method. - # - # @param type [Symbol] the markup type (:rdoc, :markdown, etc.) - # @return [Class] the markup class - # - # source://yard//lib/yard/templates/helpers/markup_helper.rb#158 - def markup_class(type = T.unsafe(nil)); end - - # Strips any shebang lines on the file contents that pertain to - # markup or preprocessing data. - # - # @deprecated Use {CodeObjects::ExtraFileObject#contents} instead - # @return [String] the file contents minus any preprocessing tags - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/markup_helper.rb#149 - def markup_file_contents(contents); end - - # Checks for a shebang or looks at the file extension to determine - # the markup type for the file contents. File extensions are registered - # for a markup type in {MARKUP_EXTENSIONS}. - # - # A shebang should be on the first line of a file and be in the form: - # - # #!markup_type - # - # Standard markup types are text, html, rdoc, markdown, textile - # - # @param contents [String] Unused. Was necessary prior to 0.7.0. - # Newer versions of YARD use {CodeObjects::ExtraFileObject#contents} - # @return [Symbol] the markup type recognized for the file - # @see MARKUP_EXTENSIONS - # @since 0.6.0 - # - # source://yard//lib/yard/templates/helpers/markup_helper.rb#133 - def markup_for_file(contents, filename); end - - # Gets the markup provider name for a markup type - # Call {#load_markup_provider} before using this method. - # - # @param type [Symbol] the markup type (:rdoc, :markdown, etc.) - # @return [Symbol] the markup provider name (usually the gem name of the library) - # - # source://yard//lib/yard/templates/helpers/markup_helper.rb#168 - def markup_provider(type = T.unsafe(nil)); end - - class << self - # Clears the markup provider cache information. Mainly used for testing. - # - # @return [void] - # - # source://yard//lib/yard/templates/helpers/markup_helper.rb#11 - def clear_markup_cache; end - - # @private - # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers - # @since 0.6.4 - # - # source://yard//lib/yard/templates/helpers/markup_helper.rb#18 - def markup_cache; end - - # @private - # @return [Hash{Symbol=>{(:provider,:class)=>Object}}] the cached markup providers - # @since 0.6.4 - # - # source://yard//lib/yard/templates/helpers/markup_helper.rb#18 - def markup_cache=(_arg0); end - end -end - -# Returns a list of extensions for various markup types. To register -# extensions for a type, add them to the array of extensions for the -# type. -# -# @since 0.6.0 -# -# source://yard//lib/yard/templates/helpers/markup_helper.rb#61 -YARD::Templates::Helpers::MarkupHelper::MARKUP_EXTENSIONS = T.let(T.unsafe(nil), Hash) - -# Contains the Regexp object that matches the shebang line of extra -# files to detect the markup type. -# -# source://yard//lib/yard/templates/helpers/markup_helper.rb#74 -YARD::Templates::Helpers::MarkupHelper::MARKUP_FILE_SHEBANG = T.let(T.unsafe(nil), Regexp) - -# The default list of markup providers for each markup type -# -# source://yard//lib/yard/templates/helpers/markup_helper.rb#24 -YARD::Templates::Helpers::MarkupHelper::MARKUP_PROVIDERS = T.let(T.unsafe(nil), Hash) - -# Helper methods for method objects. -# -# source://yard//lib/yard/templates/helpers/method_helper.rb#5 -module YARD::Templates::Helpers::MethodHelper - # @return [String] formatted arguments for a method - # - # source://yard//lib/yard/templates/helpers/method_helper.rb#7 - def format_args(object); end - - # @return [String] formatted block if one exists - # - # source://yard//lib/yard/templates/helpers/method_helper.rb#35 - def format_block(object); end - - # @return [String] formats source of an object - # - # source://yard//lib/yard/templates/helpers/method_helper.rb#57 - def format_code(object, _show_lines = T.unsafe(nil)); end - - # @return [String] formats source code of a constant value - # - # source://yard//lib/yard/templates/helpers/method_helper.rb#68 - def format_constant(value); end - - # @return [String] formats line numbers for source code of an object - # - # source://yard//lib/yard/templates/helpers/method_helper.rb#50 - def format_lines(object); end - - # @return [String] formatted and linked return types for a method - # - # source://yard//lib/yard/templates/helpers/method_helper.rb#28 - def format_return_types(object); end -end - -# Helper methods for managing module objects. -# -# source://yard//lib/yard/templates/helpers/module_helper.rb#6 -module YARD::Templates::Helpers::ModuleHelper - # Prunes the method listing by running the verifier and removing attributes/aliases - # - # @param list [Array<CodeObjects::Base>] a list of methods - # @param hide_attributes [Boolean] whether to prune attribute methods from the list - # @return [Array<CodeObjects::Base>] a pruned list of methods - # - # source://yard//lib/yard/templates/helpers/module_helper.rb#11 - def prune_method_listing(list, hide_attributes = T.unsafe(nil)); end -end - -# Helper methods for text template formats. -# -# source://yard//lib/yard/templates/helpers/text_helper.rb#6 -module YARD::Templates::Helpers::TextHelper - # @return [String] aligns text to the right - # - # source://yard//lib/yard/templates/helpers/text_helper.rb#39 - def align_right(text, spacer = T.unsafe(nil), col = T.unsafe(nil)); end - - # @return [String] escapes text - # - # source://yard//lib/yard/templates/helpers/text_helper.rb#8 - def h(text); end - - # @return [String] returns a horizontal rule for output - # - # source://yard//lib/yard/templates/helpers/text_helper.rb#45 - def hr(col = T.unsafe(nil), sep = T.unsafe(nil)); end - - # @return [String] indents +text+ by +len+ characters. - # - # source://yard//lib/yard/templates/helpers/text_helper.rb#29 - def indent(text, len = T.unsafe(nil)); end - - # @return [String] the formatted signature for a method - # - # source://yard//lib/yard/templates/helpers/text_helper.rb#50 - def signature(meth); end - - # @return [String] aligns a title to the right - # - # source://yard//lib/yard/templates/helpers/text_helper.rb#34 - def title_align_right(text, col = T.unsafe(nil)); end - - # @return [String] wraps text at +col+ columns. - # - # source://yard//lib/yard/templates/helpers/text_helper.rb#24 - def wrap(text, col = T.unsafe(nil)); end - - private - - # source://yard//lib/yard/templates/helpers/text_helper.rb#98 - def resolve_links(text); end -end - -# Helpers for UML template format -# -# source://yard//lib/yard/templates/helpers/uml_helper.rb#5 -module YARD::Templates::Helpers::UMLHelper - # Formats the path of an object for Graphviz syntax - # - # @param object [CodeObjects::Base] an object to format the path of - # @return [String] the encoded path - # - # source://yard//lib/yard/templates/helpers/uml_helper.rb#20 - def format_path(object); end - - # Encodes text in escaped Graphviz syntax - # - # @param text [String] text to encode - # @return [String] the encoded text - # - # source://yard//lib/yard/templates/helpers/uml_helper.rb#27 - def h(text); end - - # Tidies data by formatting and indenting text - # - # @param data [String] pre-formatted text - # @return [String] tidied text. - # - # source://yard//lib/yard/templates/helpers/uml_helper.rb#34 - def tidy(data); end - - # Official UML visibility prefix syntax for an object given its visibility - # - # @param object [CodeObjects::Base] the object to retrieve visibility for - # @return [String] the UML visibility prefix - # - # source://yard//lib/yard/templates/helpers/uml_helper.rb#9 - def uml_visibility(object); end -end - -# Abstracts the structure for a section and its subsections into an ordered -# list of sections and subsections. -# -# @since 0.6.0 -# -# source://yard//lib/yard/templates/section.rb#7 -class YARD::Templates::Section < ::Array - # @return [Section] a new instance of Section - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#10 - def initialize(name, *args); end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#45 - def <<(*args); end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#34 - def ==(other); end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#21 - def [](*args); end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#74 - def any(item); end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#15 - def dup; end - - # @return [Boolean] - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#30 - def eql?(other); end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#54 - def inspect; end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#8 - def name; end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#8 - def name=(_arg0); end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#60 - def place(*args); end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#45 - def push(*args); end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#64 - def to_a; end - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#50 - def unshift(*args); end - - private - - # @since 0.6.0 - # - # source://yard//lib/yard/templates/section.rb#84 - def parse_sections(args); end -end - -# source://yard//lib/yard/templates/template.rb#6 -module YARD::Templates::Template - include ::YARD::Templates::ErbCache - include ::YARD::Templates::Helpers::BaseHelper - include ::YARD::Templates::Helpers::MethodHelper - - mixes_in_class_methods ::YARD::Templates::Template::ClassMethods - - # source://yard//lib/yard/templates/template.rb#186 - def initialize(opts = T.unsafe(nil)); end - - # Loads a template specified by path. If +:template+ or +:format+ is - # specified in the {#options} hash, they are prepended and appended - # to the path respectively. - # - # @param path [Array<String, Symbol>] the path of the template - # @return [Template] the loaded template module - # - # source://yard//lib/yard/templates/template.rb#204 - def T(*path); end - - # Returns the value of attribute class. - # - # source://yard//lib/yard/templates/template.rb#7 - def class; end - - # Sets the attribute class - # - # @param value the value to set the attribute class to. - # - # source://yard//lib/yard/templates/template.rb#7 - def class=(_arg0); end - - # @param section [String, Symbol] the section name - # @return [String] the contents of the ERB rendered section - # @yield calls subsections to be rendered - # - # source://yard//lib/yard/templates/template.rb#285 - def erb(section, &block); end - - # Returns the contents of a file. If +allow_inherited+ is set to +true+, - # use +{{{__super__}}}+ inside the file contents to insert the contents - # of the file from an inherited template. For instance, if +templates/b+ - # inherits from +templates/a+ and file "test.css" exists in both directories, - # both file contents can be retrieved by having +templates/b/test.css+ look - # like: - # - # {{{__super__}}} - # ... - # body { css styles here } - # p.class { other styles } - # - # @param basename [String] the name of the file - # @param allow_inherited [Boolean] whether inherited templates can - # be inserted with +{{{__super__}}}+ - # @raise [ArgumentError] - # @return [String] the contents of a file identified by +basename+. All - # template paths (including any mixed in templates) are searched for - # the file - # @see ClassMethods#find_file - # @see ClassMethods#find_nth_file - # - # source://yard//lib/yard/templates/template.rb#312 - def file(basename, allow_inherited = T.unsafe(nil)); end - - # Initialization called on the template. Override this in a 'setup.rb' - # file in the template's path to implement a template - # - # @example A default set of sections - # def init - # sections :section1, :section2, [:subsection1, :etc] - # end - # @see #sections - # - # source://yard//lib/yard/templates/template.rb#239 - def init; end - - # source://yard//lib/yard/templates/template.rb#342 - def inspect; end - - # Returns the value of attribute options. - # - # source://yard//lib/yard/templates/template.rb#8 - def options; end - - # source://yard//lib/yard/templates/template.rb#337 - def options=(value); end - - # Runs a template on +sects+ using extra options. This method should - # not be called directly. Instead, call the class method {ClassMethods#run} - # - # @param opts [Hash, nil] any extra options to apply to sections - # @param sects [Section, Array] a section list of sections to render - # @param start_at [Fixnum] the index in the section list to start from - # @param break_first [Boolean] if true, renders only the first section - # @return [String] the rendered sections joined together - # @yield [opts] calls for the subsections to be rendered - # @yieldparam opts [Hash] any extra options to yield - # - # source://yard//lib/yard/templates/template.rb#252 - def run(opts = T.unsafe(nil), sects = T.unsafe(nil), start_at = T.unsafe(nil), break_first = T.unsafe(nil), &block); end - - # Returns the value of attribute section. - # - # source://yard//lib/yard/templates/template.rb#7 - def section; end - - # Sets the attribute section - # - # @param value the value to set the attribute section to. - # - # source://yard//lib/yard/templates/template.rb#7 - def section=(_arg0); end - - # Sets the sections (and subsections) to be rendered for the template - # - # @example Sets a set of erb sections - # sections :a, :b, :c # searches for a.erb, b.erb, c.erb - # @example Sets a set of method and erb sections - # sections :a, :b, :c # a is a method, the rest are erb files - # @example Sections with subsections - # sections :header, [:name, :children] - # # the above will call header.erb and only renders the subsections - # # if they are yielded by the template (see #yieldall) - # @param args [Array<Symbol, String, Template, Array>] the sections - # to use to render the template. For symbols and strings, the - # section will be executed as a method (if one exists), or rendered - # from the file "name.erb" where name is the section name. For - # templates, they will have {Template::ClassMethods#run} called on them. - # Any subsections can be yielded to using yield or {#yieldall} - # - # source://yard//lib/yard/templates/template.rb#226 - def sections(*args); end - - # Calls the ERB file from the last inherited template with {#section}.erb - # - # @param sect [Symbol, String] if provided, uses a specific section name - # @return [String] the rendered ERB file in any of the inherited template - # paths. - # - # source://yard//lib/yard/templates/template.rb#330 - def superb(sect = T.unsafe(nil), &block); end - - # Yields all subsections with any extra options - # - # @param opts [Hash] extra options to be applied to subsections - # - # source://yard//lib/yard/templates/template.rb#278 - def yieldall(opts = T.unsafe(nil), &block); end - - protected - - # source://yard//lib/yard/templates/template.rb#348 - def erb_file_for(section); end - - # source://yard//lib/yard/templates/template.rb#352 - def erb_with(content, filename = T.unsafe(nil)); end - - private - - # source://yard//lib/yard/templates/template.rb#399 - def add_options(opts = T.unsafe(nil)); end - - # @raise [ArgumentError] - # - # source://yard//lib/yard/templates/template.rb#378 - def cache(section); end - - # source://yard//lib/yard/templates/template.rb#388 - def cache_filename(section); end - - # source://yard//lib/yard/templates/template.rb#364 - def render_section(section, &block); end - - # source://yard//lib/yard/templates/template.rb#393 - def set_ivars; end - - # source://yard//lib/yard/templates/template.rb#412 - def with_section; end - - class << self - # Extra includes are mixins that are included after a template is created. These - # mixins can be registered by plugins to operate on templates and override behaviour. - # - # Note that this array can be filled with modules or proc objects. If a proc object - # is given, the proc will be called with the {Template#options} hash containing - # relevant template information like the object, format, and more. The proc should - # return a module or nil if there is none. - # - # @example Adding in extra mixins to include on a template - # Template.extra_includes << MyHelper - # @example Conditionally including a mixin if the format is html - # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html } - # @return [Array<Module, Proc>] a list of modules to be automatically included - # into any new template module - # - # source://yard//lib/yard/templates/template.rb#25 - def extra_includes; end - - # Extra includes are mixins that are included after a template is created. These - # mixins can be registered by plugins to operate on templates and override behaviour. - # - # Note that this array can be filled with modules or proc objects. If a proc object - # is given, the proc will be called with the {Template#options} hash containing - # relevant template information like the object, format, and more. The proc should - # return a module or nil if there is none. - # - # @example Adding in extra mixins to include on a template - # Template.extra_includes << MyHelper - # @example Conditionally including a mixin if the format is html - # Template.extra_includes << proc {|opts| MyHelper if opts.format == :html } - # @return [Array<Module, Proc>] a list of modules to be automatically included - # into any new template module - # - # source://yard//lib/yard/templates/template.rb#25 - def extra_includes=(_arg0); end - - # Includes the {extra_includes} modules into the template object. - # - # @param template [Template] the template object to mixin the extra includes. - # @param options [SymbolHash] the options hash containing all template information - # @return [void] - # - # source://yard//lib/yard/templates/template.rb#38 - def include_extra(template, options); end - - # @private - # @private - # - # source://yard//lib/yard/templates/template.rb#29 - def included(klass); end - end -end - -# source://yard//lib/yard/templates/template.rb#59 -module YARD::Templates::Template::ClassMethods - # source://yard//lib/yard/templates/template.rb#81 - def initialize(path, full_paths); end - - # Alias for creating a {Section} with arguments - # - # @see Section#initialize - # @since 0.6.0 - # - # source://yard//lib/yard/templates/template.rb#149 - def S(*args); end - - # Alias for creating {Engine.template}. - # - # source://yard//lib/yard/templates/template.rb#142 - def T(*path); end - - # Searches for a file identified by +basename+ in the template's - # path as well as any mixed in template paths. Equivalent to calling - # {ClassMethods#find_nth_file} with index of 1. - # - # @param basename [String] the filename to search for - # @return [String] the full path of a file on disk with filename - # +basename+ in one of the template's paths. - # @see find_nth_file - # - # source://yard//lib/yard/templates/template.rb#98 - def find_file(basename); end - - # Searches for the nth file (where n = +index+) identified - # by basename in the template's path and any mixed in template paths. - # - # @param basename [String] the filename to search for - # @param index [Fixnum] the nth existing file to return - # @return [String] the full path of the nth file on disk with - # filename +basename+ in one of the template paths - # - # source://yard//lib/yard/templates/template.rb#109 - def find_nth_file(basename, index = T.unsafe(nil)); end - - # Returns the value of attribute full_path. - # - # source://yard//lib/yard/templates/template.rb#60 - def full_path; end - - # Sets the attribute full_path - # - # @param value the value to set the attribute full_path to. - # - # source://yard//lib/yard/templates/template.rb#60 - def full_path=(_arg0); end - - # @note This method caches path results. Paths should not be modified - # after this method is called; call {#reset_full_paths} to reset cache. - # @return [Array<String>] a list of full paths - # - # source://yard//lib/yard/templates/template.rb#65 - def full_paths; end - - # @return [Boolean] - # - # source://yard//lib/yard/templates/template.rb#122 - def is_a?(klass); end - - # Creates a new template object to be rendered with {Template#run} - # - # source://yard//lib/yard/templates/template.rb#128 - def new(*args); end - - # Returns the value of attribute path. - # - # source://yard//lib/yard/templates/template.rb#60 - def path; end - - # Sets the attribute path - # - # @param value the value to set the attribute path to. - # - # source://yard//lib/yard/templates/template.rb#60 - def path=(_arg0); end - - # Resets cache for {#full_paths} - # - # source://yard//lib/yard/templates/template.rb#77 - def reset_full_paths; end - - # source://yard//lib/yard/templates/template.rb#135 - def run(*args); end - - private - - # source://yard//lib/yard/templates/template.rb#170 - def include_inherited(full_paths); end - - # source://yard//lib/yard/templates/template.rb#157 - def include_parent; end - - # source://yard//lib/yard/templates/template.rb#176 - def load_setup_rb; end -end - -# An Options class containing default options for base template rendering. For -# options specific to generation of HTML output, see {CLI::YardocOptions}. -# -# @see CLI::YardocOptions -# -# source://yard//lib/yard/templates/template_options.rb#9 -class YARD::Templates::TemplateOptions < ::YARD::Options - # @return [OpenStruct] an open struct containing any global state across all - # generated objects in a template. - # - # source://yard//lib/yard/options.rb#82 - def __globals; end - - # @return [String] the default return type for a method with no return tags - # - # source://yard//lib/yard/options.rb#82 - def default_return; end - - # @return [String] the default return type for a method with no return tags - # - # source://yard//lib/yard/options.rb#82 - def default_return=(_arg0); end - - # @example A list of mixin path names (including wildcards) - # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*'] - # @return [Array<String>] an array of module name wildcards to embed into - # class documentation as if their methods were defined directly in the class. - # Useful for modules like ClassMethods. If the name contains '::', the module - # is matched against the full mixin path, otherwise only the module name is used. - # - # source://yard//lib/yard/options.rb#82 - def embed_mixins; end - - # @example A list of mixin path names (including wildcards) - # opts.embed_mixins #=> ['ClassMethods', '*Helper', 'YARD::*'] - # @return [Array<String>] an array of module name wildcards to embed into - # class documentation as if their methods were defined directly in the class. - # Useful for modules like ClassMethods. If the name contains '::', the module - # is matched against the full mixin path, otherwise only the module name is used. - # - # source://yard//lib/yard/options.rb#82 - def embed_mixins=(_arg0); end - - # @param mixin [CodeObjects::Base] accepts any code object, but returns - # nil unless the object is a module. - # @return [Boolean] whether a mixin matches the embed_mixins list - # @return [nil] if the mixin is not a module object - # - # source://yard//lib/yard/templates/template_options.rb#77 - def embed_mixins_match?(mixin); end - - # @return [Symbol] the template output format - # - # source://yard//lib/yard/options.rb#82 - def format; end - - # @return [Symbol] the template output format - # - # source://yard//lib/yard/options.rb#82 - def format=(_arg0); end - - # @return [OpenStruct] an open struct containing any global state across all - # generated objects in a template. - # - # source://yard//lib/yard/options.rb#82 - def globals; end - - # @return [OpenStruct] an open struct containing any global state across all - # generated objects in a template. - # - # source://yard//lib/yard/options.rb#82 - def globals=(_arg0); end - - # @return [Boolean] whether void methods should show "void" in their signature - # - # source://yard//lib/yard/options.rb#82 - def hide_void_return; end - - # @return [Boolean] whether void methods should show "void" in their signature - # - # source://yard//lib/yard/options.rb#82 - def hide_void_return=(_arg0); end - - # @return [Boolean] whether code blocks should be syntax highlighted - # - # source://yard//lib/yard/options.rb#82 - def highlight; end - - # @return [Boolean] whether code blocks should be syntax highlighted - # - # source://yard//lib/yard/options.rb#82 - def highlight=(_arg0); end - - # @return [Boolean] whether the page is the "index" - # - # source://yard//lib/yard/templates/template_options.rb#63 - def index; end - - # @return [Boolean] whether the page is the "index" - # - # source://yard//lib/yard/templates/template_options.rb#63 - def index=(_arg0); end - - # @return [Symbol] the markup format to use when parsing docstrings - # - # source://yard//lib/yard/options.rb#82 - def markup; end - - # @return [Symbol] the markup format to use when parsing docstrings - # - # source://yard//lib/yard/options.rb#82 - def markup=(_arg0); end - - # @return [Class] the markup provider class for the markup format - # - # source://yard//lib/yard/templates/template_options.rb#29 - def markup_provider; end - - # @return [Class] the markup provider class for the markup format - # - # source://yard//lib/yard/templates/template_options.rb#29 - def markup_provider=(_arg0); end - - # @deprecated use {#highlight} instead. - # @return [Boolean] whether highlighting should be ignored - # - # source://yard//lib/yard/templates/template_options.rb#56 - def no_highlight; end - - # source://yard//lib/yard/templates/template_options.rb#57 - def no_highlight=(value); end - - # @return [CodeObjects::Base] the main object being generated in the template - # - # source://yard//lib/yard/templates/template_options.rb#37 - def object; end - - # @return [CodeObjects::Base] the main object being generated in the template - # - # source://yard//lib/yard/templates/template_options.rb#37 - def object=(_arg0); end - - # @return [CodeObjects::Base] the owner of the generated object - # - # source://yard//lib/yard/templates/template_options.rb#40 - def owner; end - - # @return [CodeObjects::Base] the owner of the generated object - # - # source://yard//lib/yard/templates/template_options.rb#40 - def owner=(_arg0); end - - # @return [String] the title of a given page - # - # source://yard//lib/yard/templates/template_options.rb#60 - def page_title; end - - # @return [String] the title of a given page - # - # source://yard//lib/yard/templates/template_options.rb#60 - def page_title=(_arg0); end - - # @return [Boolean] whether serialization should be performed - # - # source://yard//lib/yard/options.rb#82 - def serialize; end - - # @return [Boolean] whether serialization should be performed - # - # source://yard//lib/yard/options.rb#82 - def serialize=(_arg0); end - - # @return [Serializers::Base] the serializer used to generate links and serialize - # output. Serialization output only occurs if {#serialize} is +true+. - # - # source://yard//lib/yard/templates/template_options.rb#50 - def serializer; end - - # @return [Serializers::Base] the serializer used to generate links and serialize - # output. Serialization output only occurs if {#serialize} is +true+. - # - # source://yard//lib/yard/templates/template_options.rb#50 - def serializer=(_arg0); end - - # @return [Symbol] the template name used to render output - # - # source://yard//lib/yard/options.rb#82 - def template; end - - # @return [Symbol] the template name used to render output - # - # source://yard//lib/yard/options.rb#82 - def template=(_arg0); end - - # @return [Symbol] the template type used to generate output - # - # source://yard//lib/yard/templates/template_options.rb#43 - def type; end - - # @return [Symbol] the template type used to generate output - # - # source://yard//lib/yard/templates/template_options.rb#43 - def type=(_arg0); end - - # @return [Verifier] the verifier object - # - # source://yard//lib/yard/templates/template_options.rb#88 - def verifier; end - - # @return [Verifier] the verifier object - # - # source://yard//lib/yard/templates/template_options.rb#88 - def verifier=(_arg0); end -end - -# source://yard//lib/yard/version.rb#5 -YARD::VERSION = T.let(T.unsafe(nil), String) - -# Similar to a Proc, but runs a set of Ruby expressions using a small -# DSL to make tag lookups easier. -# -# The syntax is as follows: -# * All syntax is Ruby compatible -# * +object+ (+o+ for short) exist to access the object being verified -# * +@TAGNAME+ is translated into +object.tag('TAGNAME')+ -# * +@@TAGNAME+ is translated into +object.tags('TAGNAME')+ -# * +object+ can be omitted as target for method calls (it is implied) -# -# @example Create a verifier to check for objects that don't have @private tags -# verifier = Verifier.new('!@private') -# verifier.call(object) # => true (no @private tag) -# @example Create a verifier to find any return tag with an empty description -# Verifier.new('@return.text.empty?') -# # Equivalent to: -# Verifier.new('object.tag(:return).text.empty?') -# @example Check if there are any @param tags -# Verifier.new('@@param.empty?') -# # Equivalent to: -# Verifier.new('object.tags(:param).empty?') -# @example Using +object+ or +o+ to look up object attributes directly -# Verifier.new('object.docstring == "hello world"') -# # Equivalent to: -# Verifier.new('o.docstring == "hello world"') -# @example Without using +object+ or +o+ -# Verifier.new('tag(:return).size == 1 || has_tag?(:author)') -# @example Specifying multiple expressions -# Verifier.new('@return', '@param', '@yield') -# # Equivalent to: -# Verifier.new('@return && @param && @yield') -# -# source://yard//lib/yard/verifier.rb#34 -class YARD::Verifier - # Creates a verifier from a set of expressions - # - # @param expressions [Array<String>] a list of Ruby expressions to - # parse. - # @return [Verifier] a new instance of Verifier - # - # source://yard//lib/yard/verifier.rb#48 - def initialize(*expressions); end - - # Adds a set of expressions and recompiles the verifier - # - # @param expressions [Array<String>] a list of expressions - # @return [void] - # @since 0.5.6 - # - # source://yard//lib/yard/verifier.rb#58 - def add_expressions(*expressions); end - - # Tests the expressions on the object. - # - # @note If the object is a {CodeObjects::Proxy} the result will always be true. - # @param object [CodeObjects::Base] the object to verify - # @return [Boolean] the result of the expressions - # - # source://yard//lib/yard/verifier.rb#76 - def call(object); end - - # @return [Array<String>] a list of all expressions the verifier checks for - # @since 0.5.6 - # - # source://yard//lib/yard/verifier.rb#37 - def expressions; end - - # source://yard//lib/yard/verifier.rb#39 - def expressions=(value); end - - # Passes any method calls to the object from the {#call} - # - # source://yard//lib/yard/verifier.rb#63 - def method_missing(sym, *args, &block); end - - # Runs a list of objects against the verifier and returns the subset - # of verified objects. - # - # @param list [Array<CodeObjects::Base>] a list of code objects - # @return [Array<CodeObjects::Base>] a list of code objects that match - # the verifier. - # - # source://yard//lib/yard/verifier.rb#91 - def run(list); end - - protected - - # @return [CodeObjects::Base] the current object being tested - # - # source://yard//lib/yard/verifier.rb#98 - def o; end - - # @return [CodeObjects::Base] the current object being tested - # - # source://yard//lib/yard/verifier.rb#98 - def object; end - - private - - # Creates the +__execute+ method by evaluating the expressions - # as Ruby code - # - # @return [void] - # - # source://yard//lib/yard/verifier.rb#130 - def create_method_from_expressions; end - - # Modifies nil to not throw NoMethodErrors. This allows - # syntax like object.tag(:return).text to work if the #tag - # call returns nil, which means users don't need to perform - # stringent nil checking - # - # @return [void] - # - # source://yard//lib/yard/verifier.rb#112 - def modify_nilclass; end - - # Parses a single expression, handling some of the DSL syntax. - # - # The syntax "@tag" should be turned into object.tag(:tag), - # and "@@tag" should be turned into object.tags(:tag) - # - # @return [String] the parsed expression - # - # source://yard//lib/yard/verifier.rb#145 - def parse_expression(expr); end - - # Returns the state of NilClass back to normal - # - # @return [void] - # - # source://yard//lib/yard/verifier.rb#120 - def unmodify_nilclass; end -end - -# @private -# -# source://yard//lib/yard/verifier.rb#104 -YARD::Verifier::NILCLASS_METHODS = T.let(T.unsafe(nil), Array) diff --git a/tools/ruby-tools/sorbet/tapioca/config.yml b/tools/ruby-tools/sorbet/tapioca/config.yml deleted file mode 100644 index 886ae58..0000000 --- a/tools/ruby-tools/sorbet/tapioca/config.yml +++ /dev/null @@ -1,13 +0,0 @@ -gem: - # Add your `gem` command parameters here: - # - # exclude: - # - gem_name - # doc: true - # workers: 5 -dsl: - # Add your `dsl` command parameters here: - # - # exclude: - # - SomeGeneratorName - # workers: 5 diff --git a/tools/ruby-tools/sorbet/tapioca/require.rb b/tools/ruby-tools/sorbet/tapioca/require.rb deleted file mode 100644 index 80f31f8..0000000 --- a/tools/ruby-tools/sorbet/tapioca/require.rb +++ /dev/null @@ -1,4 +0,0 @@ -# typed: true -# frozen_string_literal: true - -# Add your extra requires here (`bin/tapioca require` can be used to bootstrap this list) |