From 63ce68026ad547aa33faf034727cbfba44e766d8 Mon Sep 17 00:00:00 2001 From: Mateusz Drewniak Date: Fri, 15 Nov 2024 19:27:42 +0100 Subject: [PATCH] Add support for sorbet --- .github/workflows/ci.yml | 56 + .gitignore | 1 + .rubocop.yml | 74 +- .ruby-version | 2 +- .travis.yml | 6 - .vscode/settings.json | 6 +- Gemfile | 12 +- Gemfile.lock | 148 +- Rakefile | 10 +- bin/tapioca | 27 + bin/test | 8 + .../initializers/simple_feature_flags.rb | 7 +- lib/simple_feature_flags.rb | 30 +- lib/simple_feature_flags/base_storage.rb | 296 + lib/simple_feature_flags/cli.rb | 4 +- lib/simple_feature_flags/cli/command.rb | 4 +- .../cli/command/generate.rb | 39 +- lib/simple_feature_flags/cli/options.rb | 22 +- lib/simple_feature_flags/cli/runner.rb | 18 +- lib/simple_feature_flags/configuration.rb | 6 + lib/simple_feature_flags/ram_storage.rb | 332 +- lib/simple_feature_flags/redis_storage.rb | 305 +- lib/simple_feature_flags/test_ram_storage.rb | 8 +- lib/simple_feature_flags/version.rb | 2 +- simple_feature_flags.gemspec | 39 +- sorbet/config | 4 + sorbet/rbi/annotations/.gitattributes | 1 + sorbet/rbi/annotations/minitest.rbi | 119 + sorbet/rbi/annotations/rainbow.rbi | 269 + sorbet/rbi/gems/.gitattributes | 1 + sorbet/rbi/gems/ast@2.4.2.rbi | 585 + sorbet/rbi/gems/byebug@11.1.3.rbi | 37 + sorbet/rbi/gems/connection_pool@2.4.1.rbi | 274 + sorbet/rbi/gems/erubi@1.13.0.rbi | 150 + sorbet/rbi/gems/json@2.8.2.rbi | 1901 + .../language_server-protocol@3.17.0.3.rbi | 9 + sorbet/rbi/gems/minitest@5.25.1.rbi | 1546 + sorbet/rbi/gems/netrc@0.11.0.rbi | 159 + sorbet/rbi/gems/parallel@1.26.3.rbi | 291 + sorbet/rbi/gems/parser@3.3.6.0.rbi | 5519 +++ sorbet/rbi/gems/prism@1.2.0.rbi | 39085 ++++++++++++++++ sorbet/rbi/gems/racc@1.8.1.rbi | 156 + sorbet/rbi/gems/rainbow@3.1.1.rbi | 9 + sorbet/rbi/gems/rake@13.2.1.rbi | 3028 ++ sorbet/rbi/gems/rbi@0.2.1.rbi | 4535 ++ sorbet/rbi/gems/redis-client@0.22.2.rbi | 1254 + sorbet/rbi/gems/redis-namespace@1.11.0.rbi | 826 + sorbet/rbi/gems/redis@5.3.0.rbi | 3317 ++ sorbet/rbi/gems/regexp_parser@2.9.2.rbi | 9 + sorbet/rbi/gems/rubocop-ast@1.36.1.rbi | 9 + sorbet/rbi/gems/rubocop-espago@1.1.5.rbi | 9 + sorbet/rbi/gems/rubocop@1.68.0.rbi | 9 + sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi | 9 + sorbet/rbi/gems/spoom@1.5.0.rbi | 4932 ++ sorbet/rbi/gems/tapioca@0.16.4.rbi | 3597 ++ sorbet/rbi/gems/thor@1.3.2.rbi | 4378 ++ .../rbi/gems/unicode-display_width@2.6.0.rbi | 9 + sorbet/rbi/gems/yard-sorbet@0.9.0.rbi | 435 + sorbet/rbi/gems/yard@0.9.37.rbi | 18379 ++++++++ sorbet/rbi/todo.rbi | 7 + sorbet/tapioca/config.yml | 13 + sorbet/tapioca/require.rb | 4 + test/simple_feature_flags/ram_storage_test.rb | 51 +- .../redis_storage_test.rb | 53 +- .../test_ram_storage_test.rb | 49 +- test/simple_feature_flags_test.rb | 3 +- test/support/universal_storage_tests.rb | 484 +- test/test_helper.rb | 9 +- 68 files changed, 96344 insertions(+), 641 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml create mode 100755 bin/tapioca create mode 100755 bin/test create mode 100644 lib/simple_feature_flags/base_storage.rb create mode 100644 sorbet/config create mode 100644 sorbet/rbi/annotations/.gitattributes create mode 100644 sorbet/rbi/annotations/minitest.rbi create mode 100644 sorbet/rbi/annotations/rainbow.rbi create mode 100644 sorbet/rbi/gems/.gitattributes create mode 100644 sorbet/rbi/gems/ast@2.4.2.rbi create mode 100644 sorbet/rbi/gems/byebug@11.1.3.rbi create mode 100644 sorbet/rbi/gems/connection_pool@2.4.1.rbi create mode 100644 sorbet/rbi/gems/erubi@1.13.0.rbi create mode 100644 sorbet/rbi/gems/json@2.8.2.rbi create mode 100644 sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi create mode 100644 sorbet/rbi/gems/minitest@5.25.1.rbi create mode 100644 sorbet/rbi/gems/netrc@0.11.0.rbi create mode 100644 sorbet/rbi/gems/parallel@1.26.3.rbi create mode 100644 sorbet/rbi/gems/parser@3.3.6.0.rbi create mode 100644 sorbet/rbi/gems/prism@1.2.0.rbi create mode 100644 sorbet/rbi/gems/racc@1.8.1.rbi create mode 100644 sorbet/rbi/gems/rainbow@3.1.1.rbi create mode 100644 sorbet/rbi/gems/rake@13.2.1.rbi create mode 100644 sorbet/rbi/gems/rbi@0.2.1.rbi create mode 100644 sorbet/rbi/gems/redis-client@0.22.2.rbi create mode 100644 sorbet/rbi/gems/redis-namespace@1.11.0.rbi create mode 100644 sorbet/rbi/gems/redis@5.3.0.rbi create mode 100644 sorbet/rbi/gems/regexp_parser@2.9.2.rbi create mode 100644 sorbet/rbi/gems/rubocop-ast@1.36.1.rbi create mode 100644 sorbet/rbi/gems/rubocop-espago@1.1.5.rbi create mode 100644 sorbet/rbi/gems/rubocop@1.68.0.rbi create mode 100644 sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi create mode 100644 sorbet/rbi/gems/spoom@1.5.0.rbi create mode 100644 sorbet/rbi/gems/tapioca@0.16.4.rbi create mode 100644 sorbet/rbi/gems/thor@1.3.2.rbi create mode 100644 sorbet/rbi/gems/unicode-display_width@2.6.0.rbi create mode 100644 sorbet/rbi/gems/yard-sorbet@0.9.0.rbi create mode 100644 sorbet/rbi/gems/yard@0.9.37.rbi create mode 100644 sorbet/rbi/todo.rbi create mode 100644 sorbet/tapioca/config.yml create mode 100644 sorbet/tapioca/require.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8c77a1b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +name: CI Ruby + +on: + push: + branches: [ 'main', 'develop' ] + pull_request: + branches: [ 'main', 'develop' ] + +jobs: + test: + runs-on: ubuntu-latest + env: + CI: true + strategy: + matrix: + ruby-version: ['3.1', '3.2', '3.3'] + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Ruby and gems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run unit tests + run: bundle exec rake test + + lint: + runs-on: ubuntu-latest + env: + CI: true + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Ruby and gems + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + - name: Lint Ruby files + run: bundle exec rubocop --parallel + + typecheck: + runs-on: ubuntu-latest + env: + CI: true + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Ruby and gems + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + - name: Typecheck Ruby files + run: bundle exec srb tc diff --git a/.gitignore b/.gitignore index 644d933..26a3756 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ /pkg/ /spec/reports/ /tmp/ +/.vscode .byebug_history my_examples diff --git a/.rubocop.yml b/.rubocop.yml index 315b972..219f32b 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,78 +1,32 @@ -Style/StringLiterals: - Enabled: false - -Style/SingleArgumentDig: - Enabled: false - -Layout/LineLength: - Enabled: false +inherit_gem: + rubocop-espago: sorbet.yml -Style/Documentation: +Metrics/MethodLength: Enabled: false -Style/ClassAndModuleChildren: - Enabled: false - -Style/MethodCallWithArgsParentheses: - Enabled: false - -Style/ModuleFunction: - EnforcedStyle: 'extend_self' - -Style/MissingElse: +Sorbet/RedundantExtendTSig: Enabled: false -Lint/NumberConversion: +Sorbet/HasSigil: Enabled: false -Lint/ConstantResolution: +Metrics/ClassLength: Enabled: false -Style/RescueStandardError: - Enabled: false - -Style/FormatStringToken: - Enabled: false - -Style/FormatString: - Enabled: false - -Style/DocumentationMethod: - Enabled: false - -Style/Copyright: - Enabled: false - -Style/StringHashKeys: - Enabled: false - -Style/InlineComment: - Enabled: false - -Layout/FirstHashElementLineBreak: - Enabled: false - -Layout/FirstMethodArgumentLineBreak: - Enabled: false - -Style/ConstantVisibility: - Enabled: false - -Layout/FirstArrayElementLineBreak: - Enabled: false - -Layout/MultilineMethodArgumentLineBreaks: - Enabled: false +Sorbet/EnforceSignatures: + Exclude: + - 'bin/*' + - 'test/**/*' -Layout/MultilineAssignmentLayout: +Sorbet/ForbidTUnsafe: Enabled: false -Bundler/GemComment: +Naming/BlockForwarding: Enabled: false AllCops: + TargetRubyVersion: 3.1.0 EnabledByDefault: true Exclude: - 'bin/*' - - 'spec/**/*' - - 'test/**/*' + - 'sorbet/**/*' diff --git a/.ruby-version b/.ruby-version index a4dd9db..9c25013 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.7.4 +3.3.6 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bcac2c1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -language: ruby -cache: bundler -rvm: - - 2.7.4 -before_install: gem install bundler -v 2.1.4 diff --git a/.vscode/settings.json b/.vscode/settings.json index d55a68e..280aeb4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,5 +13,9 @@ "optparse", "solargraph", "testtask" - ] + ], + "sorbet.enabled": true, + "[ruby]": { + "editor.defaultFormatter": "Shopify.ruby-lsp" + } } \ No newline at end of file diff --git a/Gemfile b/Gemfile index 7e7c582..d09e726 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,16 @@ # frozen_string_literal: true -source "https://rubygems.org" +source 'https://rubygems.org' # Specify your gem's dependencies in simple_feature_flags.gemspec gemspec + +gem 'byebug', '~> 11.1' # debugger +gem 'minitest', '~> 5.0' # test library +gem 'rake', '~> 13.0' # automation tasks +gem 'redis', '~> 5.3' # redis client +gem 'redis-namespace', '~> 1.11' # namespaces for redis +gem 'rubocop-espago', '~> 1.0' # ruby linter +gem 'rubocop-sorbet', '~> 0.8' # rubocop for sorbet +gem 'sorbet', '>= 0.5' # static typechecker +gem 'tapioca', '> 0.13' # RBI generator for sorbet diff --git a/Gemfile.lock b/Gemfile.lock index 290e506..c885460 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,91 +1,101 @@ PATH remote: . specs: - simple_feature_flags (1.2.0) + simple_feature_flags (1.3.0) + sorbet-runtime (> 0.5) GEM remote: https://rubygems.org/ specs: ast (2.4.2) - backport (1.2.0) - benchmark (0.2.0) - bundler-audit (0.9.0.1) - bundler (>= 1.2.0, < 3) - thor (~> 1.0) byebug (11.1.3) - diff-lcs (1.5.0) - e2mmap (0.1.0) - jaro_winkler (1.5.4) - kramdown (2.3.1) - rexml - kramdown-parser-gfm (1.1.0) - kramdown (~> 2.0) - mini_portile2 (2.7.1) - minitest (5.15.0) - nokogiri (1.13.1) - mini_portile2 (~> 2.7.0) - racc (~> 1.4) - parallel (1.21.0) - parser (3.1.0.0) + connection_pool (2.4.1) + erubi (1.13.0) + json (2.8.2) + language_server-protocol (3.17.0.3) + minitest (5.25.1) + netrc (0.11.0) + parallel (1.26.3) + parser (3.3.6.0) ast (~> 2.4.1) - racc (1.6.0) + racc + prism (1.2.0) + racc (1.8.1) rainbow (3.1.1) - rake (12.3.3) - redis (4.6.0) - redis-namespace (1.8.1) - redis (>= 3.0.4) - regexp_parser (2.2.1) - reverse_markdown (2.1.1) - nokogiri - rexml (3.2.5) - rubocop (1.25.1) + rake (13.2.1) + rbi (0.2.1) + prism (~> 1.0) + sorbet-runtime (>= 0.5.9204) + redis (5.3.0) + redis-client (>= 0.22.0) + redis-client (0.22.2) + connection_pool + redis-namespace (1.11.0) + redis (>= 4) + regexp_parser (2.9.2) + rubocop (1.68.0) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.1, < 2.0) + regexp_parser (>= 2.4, < 3.0) + rubocop-ast (>= 1.32.2, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.2) - parser (>= 3.0.1.1) - ruby-progressbar (1.11.0) - solargraph (0.44.3) - backport (~> 1.2) - benchmark - bundler (>= 1.17.2) - diff-lcs (~> 1.4) - e2mmap - jaro_winkler (~> 1.5) - kramdown (~> 2.3) - kramdown-parser-gfm (~> 1.1) - parser (~> 3.0) - reverse_markdown (>= 1.0.5, < 3) - rubocop (>= 0.52) - thor (~> 1.0) - tilt (~> 2.0) - yard (~> 0.9, >= 0.9.24) - thor (1.2.1) - tilt (2.0.10) - unicode-display_width (2.1.0) - webrick (1.7.0) - yard (0.9.27) - webrick (~> 1.7.0) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.36.1) + parser (>= 3.3.1.0) + rubocop-espago (1.1.5) + rubocop + rubocop-sorbet (0.8.7) + rubocop (>= 1) + ruby-progressbar (1.13.0) + sorbet (0.5.11647) + sorbet-static (= 0.5.11647) + sorbet-runtime (0.5.11647) + sorbet-static (0.5.11647-aarch64-linux) + sorbet-static (0.5.11647-universal-darwin) + sorbet-static (0.5.11647-x86_64-linux) + sorbet-static-and-runtime (0.5.11647) + sorbet (= 0.5.11647) + sorbet-runtime (= 0.5.11647) + spoom (1.5.0) + erubi (>= 1.10.0) + prism (>= 0.28.0) + sorbet-static-and-runtime (>= 0.5.10187) + thor (>= 0.19.2) + tapioca (0.16.4) + 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) + unicode-display_width (2.6.0) + yard (0.9.37) + yard-sorbet (0.9.0) + sorbet-runtime + yard PLATFORMS - ruby + aarch64-linux + universal-darwin + x86_64-linux DEPENDENCIES - bundler - bundler-audit - byebug + byebug (~> 11.1) minitest (~> 5.0) - rake (~> 12.0) - redis - redis-namespace - rubocop + rake (~> 13.0) + redis (~> 5.3) + redis-namespace (~> 1.11) + rubocop-espago (~> 1.0) + rubocop-sorbet (~> 0.8) simple_feature_flags! - solargraph + sorbet (>= 0.5) + tapioca (> 0.13) BUNDLED WITH - 2.1.4 + 2.5.22 diff --git a/Rakefile b/Rakefile index 8ca97e1..4caa98e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,12 +1,12 @@ # frozen_string_literal: true -require "bundler/gem_tasks" -require "rake/testtask" +require 'bundler/gem_tasks' +require 'rake/testtask' Rake::TestTask.new(:test) do |t| - t.libs << "test" - t.libs << "lib" - t.test_files = FileList["test/**/*_test.rb"] + t.libs << 'test' + t.libs << 'lib' + t.test_files = FileList['test/**/*_test.rb'] end task default: :test diff --git a/bin/tapioca b/bin/tapioca new file mode 100755 index 0000000..a6ae757 --- /dev/null +++ b/bin/tapioca @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +# +# This file was generated by Bundler. +# +# The application 'tapioca' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +bundle_binstub = File.expand_path("bundle", __dir__) + +if File.file?(bundle_binstub) + if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") + load(bundle_binstub) + else + abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + end +end + +require "rubygems" +require "bundler/setup" + +load Gem.bin_path("tapioca", "tapioca") diff --git a/bin/test b/bin/test new file mode 100755 index 0000000..510b715 --- /dev/null +++ b/bin/test @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' +set -vx + +bundle exec rubocop --parallel --color +bundle exec srb tc +bundle exec rake test diff --git a/lib/example_files/config/initializers/simple_feature_flags.rb b/lib/example_files/config/initializers/simple_feature_flags.rb index ffa4dd9..6d609f2 100644 --- a/lib/example_files/config/initializers/simple_feature_flags.rb +++ b/lib/example_files/config/initializers/simple_feature_flags.rb @@ -1,13 +1,14 @@ # frozen_string_literal: true + # Redis has 16 DBs (0 to 15) FEATURE_FLAGS = if ::Rails.env.test? # Use RamStorage in tests to make them faster - ::SimpleFeatureFlags::RamStorage.new("#{::Rails.root.to_s}/config/simple_feature_flags.yml") + ::SimpleFeatureFlags::RamStorage.new("#{::Rails.root}/config/simple_feature_flags.yml") else - redis = ::Redis.new(host: '127.0.0.1', port: 6379, db: 0) + redis = ::Redis.new(host: '127.0.0.1', port: 6379, db: 0) # rubocop:disable Style/IpAddresses # We recommend using the `redis-namespace` gem to avoid key conflicts with Sidekiq or Resque # redis = ::Redis::Namespace.new(:simple_feature_flags, redis: redis) - ::SimpleFeatureFlags::RedisStorage.new(redis, "#{::Rails.root.to_s}/config/simple_feature_flags.yml") + ::SimpleFeatureFlags::RedisStorage.new(redis, "#{::Rails.root}/config/simple_feature_flags.yml") end diff --git a/lib/simple_feature_flags.rb b/lib/simple_feature_flags.rb index 033807c..c038254 100644 --- a/lib/simple_feature_flags.rb +++ b/lib/simple_feature_flags.rb @@ -1,17 +1,23 @@ +# typed: true # frozen_string_literal: true require 'json' +require 'sorbet-runtime' -Dir[File.expand_path('simple_feature_flags/*.rb', __dir__)].sort.each { |file| require file } +Dir[File.expand_path('simple_feature_flags/*.rb', __dir__)].each { |file| require file } +# Tha main namespace of the `simple_feature_flags` gem. module SimpleFeatureFlags + extend T::Sig + NOT_PRESENT = ::Object.new.freeze - UI_GEM = 'simple_feature_flags-ui' - UI_CLASS_NAME = '::SimpleFeatureFlags::Ui' - WEB_UI_CLASS_NAME = '::SimpleFeatureFlags::Ui::Web' + UI_GEM = T.let('simple_feature_flags-ui', String) + UI_CLASS_NAME = T.let('::SimpleFeatureFlags::Ui', String) + WEB_UI_CLASS_NAME = T.let('::SimpleFeatureFlags::Ui::Web', String) - ACTIVE_GLOBALLY = ::Set['globally', :globally, 'true', true].freeze - ACTIVE_PARTIALLY = ::Set['partially', :partially].freeze + ACTIVE_GLOBALLY = T.let(::Set['globally', :globally, 'true', true].freeze, + T::Set[T.any(String, Symbol, T::Boolean, NilClass)],) + ACTIVE_PARTIALLY = T.let(::Set['partially', :partially].freeze, T::Set[T.any(String, Symbol, T::Boolean, NilClass)]) class NoSuchCommandError < StandardError; end @@ -19,9 +25,15 @@ class IncorrectWorkingDirectoryError < StandardError; end class FlagNotDefinedError < StandardError; end - CONFIG = Configuration.new + CONFIG = T.let(Configuration.new, Configuration) + + class << self + extend T::Sig - def self.configure(&block) - block.call(CONFIG) + sig { params(block: T.proc.params(arg0: Configuration).void).returns(Configuration) } + def configure(&block) + block.call(CONFIG) + CONFIG + end end end diff --git a/lib/simple_feature_flags/base_storage.rb b/lib/simple_feature_flags/base_storage.rb new file mode 100644 index 0000000..dc92222 --- /dev/null +++ b/lib/simple_feature_flags/base_storage.rb @@ -0,0 +1,296 @@ +# typed: true +# frozen_string_literal: true + +require 'yaml' + +module SimpleFeatureFlags + # Abstract class for all storage adapters. + class BaseStorage + extend T::Sig + extend T::Helpers + + abstract! + + # Path to the file with feature flags + sig { abstract.returns(String) } + def file; end + + sig { abstract.returns(T::Array[String]) } + def mandatory_flags; end + + # Checks whether the flag is active. Returns `true`, `false`, `:globally` or `:partially` + sig { abstract.params(feature: T.any(Symbol, String)).returns(T.any(Symbol, T::Boolean)) } + def active(feature); end + + # Checks whether the flag is active. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def active?(feature); end + + # Checks whether the flag is inactive. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def inactive?(feature); end + + # Checks whether the flag is active globally, for every object. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def active_globally?(feature); end + + # Checks whether the flag is inactive globally, for every object. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def inactive_globally?(feature); end + + # Checks whether the flag is active partially, only for certain objects. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def active_partially?(feature); end + + # Checks whether the flag is inactive partially, only for certain objects. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def inactive_partially?(feature); end + + # Checks whether the flag is active for the given object. + sig do + abstract + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + ) + .returns(T::Boolean) + end + def active_for?(feature, object, object_id_method: :id); end + + # Checks whether the flag is inactive for the given object. + sig do + abstract + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + ) + .returns(T::Boolean) + end + def inactive_for?(feature, object, object_id_method: :id); end + + # Checks whether the flag exists. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def exists?(feature); end + + # Returns the description of the flag if it exists. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T.nilable(String)) } + def description(feature); end + + # Calls the given block if the flag is active. + sig do + abstract + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_active(feature, &block); end + + # Calls the given block if the flag is inactive. + sig do + abstract + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_inactive(feature, &block); end + + # Calls the given block if the flag is active globally. + sig do + abstract + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_active_globally(feature, &block); end + + # Calls the given block if the flag is inactive globally. + sig do + abstract + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_inactive_globally(feature, &block); end + + # Calls the given block if the flag is active partially. + sig do + abstract + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_active_partially(feature, &block); end + + # Calls the given block if the flag is inactive partially. + sig do + abstract + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_inactive_partially(feature, &block); end + + # Calls the given block if the flag is active for the given object. + sig do + abstract + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + block: T.proc.void, + ).void + end + def when_active_for(feature, object, object_id_method: CONFIG.default_id_method, &block); end + + # Calls the given block if the flag is inactive for the given object. + sig do + abstract + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + block: T.proc.void, + ).void + end + def when_inactive_for(feature, object, object_id_method: CONFIG.default_id_method, &block); end + + # Activates the given flag. Returns `false` if it does not exist. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def activate(feature); end + + # Activates the given flag globally. Returns `false` if it does not exist. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def activate_globally(feature); end + + # Activates the given flag partially. Returns `false` if it does not exist. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def activate_partially(feature); end + + # Activates the given flag for the given objects. Returns `false` if it does not exist. + sig do + abstract + .params( + feature: T.any(Symbol, String), + objects: Object, + object_id_method: Symbol, + ).void + end + def activate_for(feature, *objects, object_id_method: CONFIG.default_id_method); end + + # Activates the given flag for the given objects and sets the flag as partially active. + # Returns `false` if it does not exist. + sig do + abstract + .params( + feature: T.any(Symbol, String), + objects: Object, + object_id_method: Symbol, + ).void + end + def activate_for!(feature, *objects, object_id_method: CONFIG.default_id_method); end + + # Deactivates the given flag for all objects. + # Resets the list of objects that this flag has been turned on for. + # Returns `false` if it does not exist. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def deactivate!(feature); end + + # Deactivates the given flag globally. + # Does not reset the list of objects that this flag has been turned on for. + # Returns `false` if it does not exist. + sig { abstract.params(feature: T.any(Symbol, String)).returns(T::Boolean) } + def deactivate(feature); end + + # Returns a hash of Objects that the given flag is turned on for. + # The keys are class/model names, values are arrays of IDs of instances/records. + # + # looks like this: + # + # { "Page" => [25, 89], "Book" => [152] } + # + sig do + abstract + .params(feature: T.any(Symbol, String)) + .returns(T::Hash[String, T::Array[Object]]) + end + def active_objects(feature); end + + # Deactivates the given flag for the given objects. Returns `false` if it does not exist. + sig do + abstract + .params( + feature: T.any(Symbol, String), + objects: Object, + object_id_method: Symbol, + ).void + end + def deactivate_for(feature, *objects, object_id_method: CONFIG.default_id_method); end + + # Returns the data of the flag in a hash. + sig do + abstract + .params( + feature: T.any(Symbol, String), + ).returns(T.nilable(T::Hash[String, T.anything])) + end + def get(feature); end + + # Adds the given feature flag. + sig do + abstract + .params( + feature: T.any(Symbol, String), + description: String, + active: T.any(String, Symbol, T::Boolean, NilClass), + ).returns(T.nilable(T::Hash[String, T.anything])) + end + def add(feature, description, active = 'false'); end + + # Removes the given feature flag. + # Returns its data or nil if it does not exist. + sig do + abstract + .params( + feature: T.any(Symbol, String), + ).returns(T.nilable(T::Hash[String, T.anything])) + end + def remove(feature); end + + # Returns the data of all feature flags. + sig do + abstract.returns(T::Array[T::Hash[String, T.anything]]) + end + def all; end + + private + + sig { params(objects: T::Array[Object], object_id_method: Symbol).returns(T::Hash[String, T::Array[Object]]) } + def objects_to_hash(objects, object_id_method: CONFIG.default_id_method) + objects.group_by { |ob| ob.class.to_s } + .transform_values { |arr| arr.map(&object_id_method) } + end + + sig { void } + def import_flags_from_file + changes = YAML.load_file(file) + changes = { mandatory: [], remove: [] } unless changes.is_a? ::Hash + + changes[:mandatory].each do |el| + mandatory_flags << el['name'] + add(el['name'], el['description'], el['active']) + end + + changes[:remove].each do |el| + remove(el) + end + end + end +end diff --git a/lib/simple_feature_flags/cli.rb b/lib/simple_feature_flags/cli.rb index 204e8b3..31fd8ad 100644 --- a/lib/simple_feature_flags/cli.rb +++ b/lib/simple_feature_flags/cli.rb @@ -1,7 +1,9 @@ +# typed: true # frozen_string_literal: true module SimpleFeatureFlags + # Handles the CLI module Cli; end end -Dir[File.expand_path('cli/*.rb', __dir__)].sort.each { |file| require file } +Dir[File.expand_path('cli/*.rb', __dir__)].each { |file| require file } diff --git a/lib/simple_feature_flags/cli/command.rb b/lib/simple_feature_flags/cli/command.rb index dcb5417..7725ec8 100644 --- a/lib/simple_feature_flags/cli/command.rb +++ b/lib/simple_feature_flags/cli/command.rb @@ -1,9 +1,11 @@ +# typed: true # frozen_string_literal: true module SimpleFeatureFlags module Cli + # Contains CLI commands module Command; end end end -Dir[File.expand_path('command/*.rb', __dir__)].sort.each { |file| require file } +Dir[File.expand_path('command/*.rb', __dir__)].each { |file| require file } diff --git a/lib/simple_feature_flags/cli/command/generate.rb b/lib/simple_feature_flags/cli/command/generate.rb index afe9aa5..7564263 100644 --- a/lib/simple_feature_flags/cli/command/generate.rb +++ b/lib/simple_feature_flags/cli/command/generate.rb @@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true require 'fileutils' @@ -5,15 +6,21 @@ module SimpleFeatureFlags module Cli module Command + # Implements the `generate` CLI command class Generate - CONFIG_FILE = 'simple_feature_flags.yml' + extend T::Sig + CONFIG_FILE = T.let('simple_feature_flags.yml', String) + + sig { returns(Options) } attr_reader :options + sig { params(options: Options).void } def initialize(options) @options = options end + sig { void } def run if options.rails generate_for_rails @@ -29,10 +36,11 @@ def run private + sig { void } def generate_for_rails ::FileUtils.cp_r example_config_dir, destination_dir - puts "Generated:" + puts 'Generated:' puts '----------' puts "- #{::File.join(destination_dir, 'config')}" print_dir_tree(example_config_dir, 1) @@ -62,21 +70,30 @@ def generate_for_rails system 'bundle' end + sig do + params( + file_path: String, + regexp: Regexp, + block: T.proc.params(arg0: String).returns(String), + ).void + end def file_gsub(file_path, regexp, &block) new_content = File.read(file_path).gsub(regexp, &block) - File.open(file_path, 'wb') { |file| file.write(new_content) } + File.binwrite(file_path, new_content) end + sig { params(file_path: String, line: String).void } def file_append(file_path, line) new_content = File.read(file_path) new_content = "#{new_content}\n#{line}\n" - File.open(file_path, 'wb') { |file| file.write(new_content) } + File.binwrite(file_path, new_content) end + sig { params(dir: String, embed_level: Integer).void } def print_dir_tree(dir, embed_level = 0) padding = ' ' * (embed_level * 2) - children = ::Dir.new(dir).entries.reject { |el| /^\.{1,2}$/ =~ el } + children = ::Dir.new(dir).entries.grep_v(/^\.{1,2}$/) children.each do |child| child_dir = ::File.join(dir, child) @@ -88,32 +105,42 @@ def print_dir_tree(dir, embed_level = 0) end end + sig { returns String } def initializer_file ::File.join(destination_dir, 'config', 'initializers', 'simple_feature_flags.rb') end + sig { returns String } def gemfile ::File.join(destination_dir, 'Gemfile') end + sig { returns String } def routes_rb ::File.join(destination_dir, 'config', 'routes.rb') end + sig { returns String } def example_config_dir ::File.join(::File.expand_path(__dir__), '..', '..', '..', 'example_files', 'config') end + sig { returns String } def example_config_file ::File.join(example_config_dir, CONFIG_FILE) end + sig { returns String } def destination_dir - raise IncorrectWorkingDirectoryError, "You should enter the main directory of your Rails project!" if options.rails && !::Dir.new(::Dir.pwd).entries.include?('config') + if options.rails && !::Dir.new(::Dir.pwd).entries.include?('config') + raise IncorrectWorkingDirectoryError, + 'You should enter the main directory of your Rails project!' + end ::Dir.pwd end + sig { returns String } def destination_file @destination_file ||= ::File.join(destination_dir, CONFIG_FILE) end diff --git a/lib/simple_feature_flags/cli/options.rb b/lib/simple_feature_flags/cli/options.rb index 54863b2..9742a34 100644 --- a/lib/simple_feature_flags/cli/options.rb +++ b/lib/simple_feature_flags/cli/options.rb @@ -1,15 +1,31 @@ +# typed: true # frozen_string_literal: true require 'optparse' module SimpleFeatureFlags module Cli + # Parses CLI options. class Options - attr_reader :opt_parser, :generate, :help, :rails, :ui + extend T::Sig + sig { returns(OptionParser) } + attr_reader :opt_parser + + sig { returns(T::Boolean) } + attr_reader :generate + + sig { returns(T::Boolean) } + attr_reader :rails + + sig { returns(T::Boolean) } + attr_reader :ui + + sig { params(args: T::Array[String]).void } def initialize(args) - @rails = true - @ui = false + @rails = T.let(true, T::Boolean) + @ui = T.let(false, T::Boolean) + @generate = T.let(false, T::Boolean) @opt_parser = ::OptionParser.new do |opts| opts.banner = 'Usage: simple_feature_flags [options]' diff --git a/lib/simple_feature_flags/cli/runner.rb b/lib/simple_feature_flags/cli/runner.rb index 78e1362..6b33867 100644 --- a/lib/simple_feature_flags/cli/runner.rb +++ b/lib/simple_feature_flags/cli/runner.rb @@ -1,20 +1,28 @@ +# typed: true # frozen_string_literal: true module SimpleFeatureFlags module Cli + # Runs CLI commands class Runner + extend T::Sig + + sig { returns(Options) } attr_reader :options + sig { params(args: T::Array[String]).void } def initialize(args = ARGV) @options = Options.new(args) end + sig { void } def run - command_class = if @options.generate - ::SimpleFeatureFlags::Cli::Command::Generate - else - raise NoSuchCommandError, 'No such command!' - end + command_class = + if @options.generate + ::SimpleFeatureFlags::Cli::Command::Generate + else + raise NoSuchCommandError, 'No such command!' + end command_class.new(options).run end diff --git a/lib/simple_feature_flags/configuration.rb b/lib/simple_feature_flags/configuration.rb index 3eb7ba8..29abe22 100644 --- a/lib/simple_feature_flags/configuration.rb +++ b/lib/simple_feature_flags/configuration.rb @@ -1,9 +1,15 @@ +# typed: true # frozen_string_literal: true module SimpleFeatureFlags + # The main configuration object of the library. class Configuration + extend T::Sig + + sig { returns(Symbol) } attr_accessor :default_id_method + sig { void } def initialize @default_id_method = :id end diff --git a/lib/simple_feature_flags/ram_storage.rb b/lib/simple_feature_flags/ram_storage.rb index 7d7dfcb..d667e99 100644 --- a/lib/simple_feature_flags/ram_storage.rb +++ b/lib/simple_feature_flags/ram_storage.rb @@ -1,20 +1,31 @@ +# typed: true # frozen_string_literal: true require 'yaml' module SimpleFeatureFlags - class RamStorage - attr_reader :file, :mandatory_flags, :flags + # Stores feature flags in memory. + class RamStorage < BaseStorage + sig { override.returns(String) } + attr_reader :file + sig { override.returns(T::Array[String]) } + attr_reader :mandatory_flags + + sig { returns(T::Hash[Symbol, T::Hash[String, Object]]) } + attr_reader :flags + + sig { params(file: String).void } def initialize(file) @file = file - @redis = redis @mandatory_flags = [] @flags = {} import_flags_from_file end + # Checks whether the flag is active. Returns `true`, `false`, `:globally` or `:partially` + sig { override.params(feature: T.any(Symbol, String)).returns(T.any(Symbol, T::Boolean)) } def active(feature) case flags.dig(feature.to_sym, 'active') when 'globally', :globally @@ -23,38 +34,60 @@ def active(feature) :partially when 'true', true true - when 'false', false + else false end end + # Checks whether the flag is active. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def active?(feature) return true if active(feature) false end + # Checks whether the flag is inactive. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def inactive?(feature) !active?(feature) end + # Checks whether the flag is active globally, for every object. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def active_globally?(feature) - ACTIVE_GLOBALLY.include? flags.dig(feature.to_sym, 'active') + ACTIVE_GLOBALLY.include? T.unsafe(flags.dig(feature.to_sym, 'active')) end + # Checks whether the flag is inactive globally, for every object. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def inactive_globally?(feature) !active_globally?(feature) end + # Checks whether the flag is active partially, only for certain objects. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def active_partially?(feature) - ACTIVE_PARTIALLY.include? flags.dig(feature.to_sym, 'active') + ACTIVE_PARTIALLY.include? T.unsafe(flags.dig(feature.to_sym, 'active')) end + # Checks whether the flag is inactive partially, only for certain objects. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def inactive_partially?(feature) !active_partially?(feature) end - def active_for?(feature, object, object_id_method = CONFIG.default_id_method) + # Checks whether the flag is active for the given object. + sig do + override + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + ) + .returns(T::Boolean) + end + def active_for?(feature, object, object_id_method: CONFIG.default_id_method) return false unless active?(feature) return true if active_globally?(feature) @@ -66,137 +99,275 @@ def active_for?(feature, object, object_id_method = CONFIG.default_id_method) active_ids.include? object.public_send(object_id_method) end - def inactive_for?(feature, object, object_id_method = CONFIG.default_id_method) - !active_for?(feature, object, object_id_method) + # Checks whether the flag is inactive for the given object. + sig do + override + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + ) + .returns(T::Boolean) + end + def inactive_for?(feature, object, object_id_method: CONFIG.default_id_method) + !active_for?(feature, object, object_id_method: object_id_method) end + # Checks whether the flag exists. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def exists?(feature) return false if [nil, ''].include? flags[feature.to_sym] true end + # Returns the description of the flag if it exists. + sig { override.params(feature: T.any(Symbol, String)).returns(T.nilable(String)) } def description(feature) - flags.dig(feature.to_sym, 'description') + T.unsafe(flags.dig(feature.to_sym, 'description')) end - def when_active(feature) + # Calls the given block if the flag is active. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_active(feature, &block) return unless active?(feature) - yield + block.call end - def when_inactive(feature) + # Calls the given block if the flag is inactive. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_inactive(feature, &block) return unless inactive?(feature) - yield + block.call end - def when_active_globally(feature) + # Calls the given block if the flag is active globally. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_active_globally(feature, &block) return unless active_globally?(feature) - yield + block.call end - def when_inactive_globally(feature) + # Calls the given block if the flag is inactive globally. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_inactive_globally(feature, &block) return unless inactive_globally?(feature) - yield + block.call end - def when_active_partially(feature) + # Calls the given block if the flag is active partially. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_active_partially(feature, &block) return unless active_partially?(feature) - yield + block.call end - def when_inactive_partially(feature) + # Calls the given block if the flag is inactive partially. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_inactive_partially(feature, &block) return unless inactive_partially?(feature) - yield + block.call end - def when_active_for(feature, object, object_id_method = CONFIG.default_id_method) - return unless active_for?(feature, object, object_id_method) + # Calls the given block if the flag is active for the given object. + sig do + override + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + block: T.proc.void, + ).void + end + def when_active_for(feature, object, object_id_method: CONFIG.default_id_method, &block) + return unless active_for?(feature, object, object_id_method: object_id_method) - yield + block.call end - def when_inactive_for(feature, object, object_id_method = CONFIG.default_id_method) - return unless inactive_for?(feature, object, object_id_method) + # Calls the given block if the flag is inactive for the given object. + sig do + override + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + block: T.proc.void, + ).void + end + def when_inactive_for(feature, object, object_id_method: CONFIG.default_id_method, &block) + return unless inactive_for?(feature, object, object_id_method: object_id_method) - yield + block.call end + # Activates the given flag. Returns `false` if it does not exist. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def activate(feature) return false unless exists?(feature) - flags[feature.to_sym]['active'] = 'globally' + flag = T.must flags[feature.to_sym] + flag['active'] = 'globally' true end alias activate_globally activate + # Activates the given flag partially. Returns `false` if it does not exist. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def activate_partially(feature) return false unless exists?(feature) - flags[feature.to_sym]['active'] = 'partially' + flag = T.must flags[feature.to_sym] + flag['active'] = 'partially' true end - def activate_for(feature, objects, object_id_method = CONFIG.default_id_method) + # Activates the given flag for the given objects. Returns `false` if it does not exist. + sig do + override + .params( + feature: T.any(Symbol, String), + objects: Object, + object_id_method: Symbol, + ).void + end + def activate_for(feature, *objects, object_id_method: CONFIG.default_id_method) return false unless exists?(feature) - objects = [objects] unless objects.is_a? ::Array - to_activate_hash = objects_to_hash(objects, object_id_method) + to_activate_hash = objects_to_hash(objects, object_id_method: object_id_method) active_objects_hash = active_objects(feature) to_activate_hash.each do |klass, ids| (active_objects_hash[klass] = ids) && next unless active_objects_hash[klass] - active_objects_hash[klass].concat(ids).uniq!.sort! + active_objects_hash[klass]&.concat(ids)&.uniq!&.sort! # rubocop:disable Style/SafeNavigationChainLength end - flags[feature.to_sym]['active_for_objects'] = active_objects_hash + flag = T.must flags[feature.to_sym] + flag['active_for_objects'] = active_objects_hash true end - def activate_for!(feature, objects, object_id_method = CONFIG.default_id_method) - return false unless activate_for(feature, objects, object_id_method) + # Activates the given flag for the given objects and sets the flag as partially active. + # Returns `false` if it does not exist. + sig do + override + .params( + feature: T.any(Symbol, String), + objects: Object, + object_id_method: Symbol, + ).void + end + def activate_for!(feature, *objects, object_id_method: CONFIG.default_id_method) + return false unless T.unsafe(self).activate_for(feature, *objects, object_id_method: object_id_method) activate_partially(feature) end + # Deactivates the given flag for all objects. + # Resets the list of objects that this flag has been turned on for. + # Returns `false` if it does not exist. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def deactivate!(feature) return false unless exists?(feature) - flags[feature.to_sym]['active'] = 'false' - flags[feature.to_sym]['active_for_objects'] = nil + flag = T.must flags[feature.to_sym] + flag['active'] = 'false' + flag['active_for_objects'] = nil true end + # Deactivates the given flag globally. + # Does not reset the list of objects that this flag has been turned on for. + # Returns `false` if it does not exist. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def deactivate(feature) return false unless exists?(feature) - flags[feature.to_sym]['active'] = 'false' + flag = T.must flags[feature.to_sym] + flag['active'] = 'false' true end + # Returns a hash of Objects that the given flag is turned on for. + # The keys are class/model names, values are arrays of IDs of instances/records. + # + # looks like this: + # + # { "Page" => [25, 89], "Book" => [152] } + # + sig do + override + .params(feature: T.any(Symbol, String)) + .returns(T::Hash[String, T::Array[Object]]) + end def active_objects(feature) - flags.dig(feature.to_sym, 'active_for_objects') || {} + T.unsafe(flags.dig(feature.to_sym, 'active_for_objects')) || {} end - def deactivate_for(feature, objects, object_id_method = CONFIG.default_id_method) + # Deactivates the given flag for the given objects. Returns `false` if it does not exist. + sig do + override + .params( + feature: T.any(Symbol, String), + objects: Object, + object_id_method: Symbol, + ).void + end + def deactivate_for(feature, *objects, object_id_method: CONFIG.default_id_method) return false unless exists?(feature) active_objects_hash = active_objects(feature) - objects_to_deactivate_hash = objects_to_hash(objects, object_id_method) + objects_to_deactivate_hash = objects_to_hash(objects, object_id_method: object_id_method) objects_to_deactivate_hash.each do |klass, ids_to_remove| active_ids = active_objects_hash[klass] @@ -205,22 +376,39 @@ def deactivate_for(feature, objects, object_id_method = CONFIG.default_id_method active_ids.reject! { |id| ids_to_remove.include? id } end - flags[feature.to_sym]['active_for_objects'] = active_objects_hash + flag = T.must flags[feature.to_sym] + flag['active_for_objects'] = active_objects_hash true end + # Returns the data of the flag in a hash. + sig do + override + .params( + feature: T.any(Symbol, String), + ).returns(T.nilable(T::Hash[String, T.anything])) + end def get(feature) return unless exists?(feature) - hash = flags[feature.to_sym] - hash['mandatory'] = mandatory_flags.include?(feature.to_s) + flag = T.must flags[feature.to_sym] + flag['mandatory'] = mandatory_flags.include?(feature.to_s) - hash + flag end + # Adds the given feature flag. + sig do + override + .params( + feature: T.any(Symbol, String), + description: String, + active: T.any(String, Symbol, T::Boolean, NilClass), + ).returns(T.nilable(T::Hash[String, T.anything])) + end def add(feature, description, active = 'false') - return false if exists?(feature) + return if exists?(feature) active = if ACTIVE_GLOBALLY.include?(active) 'globally' @@ -231,16 +419,24 @@ def add(feature, description, active = 'false') end hash = { - 'name' => feature.to_s, - 'active' => active, - 'description' => description + 'name' => feature.to_s, + 'active' => active, + 'description' => description, } flags[feature.to_sym] = hash end + # Removes the given feature flag. + # Returns its data or nil if it does not exist. + sig do + override + .params( + feature: T.any(Symbol, String), + ).returns(T.nilable(T::Hash[String, T.anything])) + end def remove(feature) - return false unless exists?(feature) + return unless exists?(feature) removed = get(feature) flags.delete(feature.to_sym) @@ -248,40 +444,18 @@ def remove(feature) removed end + # Returns the data of all feature flags. + sig do + override.returns(T::Array[T::Hash[String, T.anything]]) + end def all hashes = [] - flags.each do |key, _val| + flags.each_key do |key| hashes << get(key) end hashes end - - def redis; end - - def namespaced_redis; end - - private - - def objects_to_hash(objects, object_id_method = CONFIG.default_id_method) - objects = [objects] unless objects.is_a? ::Array - - objects.group_by { |ob| ob.class.to_s }.transform_values { |arr| arr.map(&object_id_method) } - end - - def import_flags_from_file - changes = YAML.load_file(file) - changes = { mandatory: [], remove: [] } unless changes.is_a? ::Hash - - changes[:mandatory].each do |el| - mandatory_flags << el['name'] - add(el['name'], el['description'], el['active']) - end - - changes[:remove].each do |el| - remove(el) - end - end end end diff --git a/lib/simple_feature_flags/redis_storage.rb b/lib/simple_feature_flags/redis_storage.rb index 89e4910..165f51d 100644 --- a/lib/simple_feature_flags/redis_storage.rb +++ b/lib/simple_feature_flags/redis_storage.rb @@ -1,11 +1,21 @@ +# typed: true # frozen_string_literal: true require 'yaml' module SimpleFeatureFlags - class RedisStorage - attr_reader :file, :redis, :mandatory_flags + # Stores feature flags in Redis. + class RedisStorage < BaseStorage + sig { override.returns(String) } + attr_reader :file + sig { override.returns(T::Array[String]) } + attr_reader :mandatory_flags + + sig { returns(T.any(::Redis, ::Redis::Namespace)) } + attr_reader :redis + + sig { params(redis: T.any(::Redis, ::Redis::Namespace), file: String).void } def initialize(redis, file) @file = file @redis = redis @@ -14,46 +24,70 @@ def initialize(redis, file) import_flags_from_file end + # Checks whether the flag is active. Returns `true`, `false`, `:globally` or `:partially` + sig { override.params(feature: T.any(Symbol, String)).returns(T.any(Symbol, T::Boolean)) } def active(feature) case redis.hget(feature.to_s, 'active') when 'globally' :globally when 'partially' :partially - when 'true' + when 'true', true true - when 'false' + else false end end + # Checks whether the flag is active. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def active?(feature) return true if active(feature) false end + # Checks whether the flag is inactive. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def inactive?(feature) !active?(feature) end + # Checks whether the flag is active globally, for every object. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def active_globally?(feature) ACTIVE_GLOBALLY.include? redis.hget(feature.to_s, 'active') end + # Checks whether the flag is inactive globally, for every object. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def inactive_globally?(feature) !active_globally?(feature) end + # Checks whether the flag is active partially, only for certain objects. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def active_partially?(feature) ACTIVE_PARTIALLY.include? redis.hget(feature.to_s, 'active') end + # Checks whether the flag is inactive partially, only for certain objects. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def inactive_partially?(feature) !active_partially?(feature) end - def active_for?(feature, object, object_id_method = CONFIG.default_id_method) + # Checks whether the flag is active for the given object. + sig do + override + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + ) + .returns(T::Boolean) + end + def active_for?(feature, object, object_id_method: CONFIG.default_id_method) return false unless active?(feature) return true if active_globally?(feature) @@ -65,68 +99,152 @@ def active_for?(feature, object, object_id_method = CONFIG.default_id_method) active_ids.include? object.public_send(object_id_method) end - def inactive_for?(feature, object, object_id_method = CONFIG.default_id_method) - !active_for?(feature, object, object_id_method) + # Checks whether the flag is inactive for the given object. + sig do + override + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + ) + .returns(T::Boolean) + end + def inactive_for?(feature, object, object_id_method: CONFIG.default_id_method) + !active_for?(feature, object, object_id_method: object_id_method) end + # Checks whether the flag exists. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def exists?(feature) return false if [nil, ''].include? redis.hget(feature.to_s, 'name') true end + # Returns the description of the flag if it exists. + sig { override.params(feature: T.any(Symbol, String)).returns(T.nilable(String)) } def description(feature) redis.hget(feature.to_s, 'description') end - def when_active(feature) + # Calls the given block if the flag is active. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_active(feature, &block) return unless active?(feature) - yield + block.call end - def when_inactive(feature) + # Calls the given block if the flag is inactive. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_inactive(feature, &block) return unless inactive?(feature) - yield + block.call end - def when_active_globally(feature) + # Calls the given block if the flag is active globally. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_active_globally(feature, &block) return unless active_globally?(feature) - yield + block.call end - def when_inactive_globally(feature) + # Calls the given block if the flag is inactive globally. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_inactive_globally(feature, &block) return unless inactive_globally?(feature) - yield + block.call end - def when_active_partially(feature) + # Calls the given block if the flag is active partially. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_active_partially(feature, &block) return unless active_partially?(feature) - yield + block.call end - def when_inactive_partially(feature) + # Calls the given block if the flag is inactive partially. + sig do + override + .params( + feature: T.any(Symbol, String), + block: T.proc.void, + ).void + end + def when_inactive_partially(feature, &block) return unless inactive_partially?(feature) - yield + block.call end - def when_active_for(feature, object, object_id_method = CONFIG.default_id_method) - return unless active_for?(feature, object, object_id_method) + # Calls the given block if the flag is active for the given object. + sig do + override + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + block: T.proc.void, + ).void + end + def when_active_for(feature, object, object_id_method: CONFIG.default_id_method, &block) + return unless active_for?(feature, object, object_id_method: object_id_method) - yield + block.call end - def when_inactive_for(feature, object, object_id_method = CONFIG.default_id_method) - return unless inactive_for?(feature, object, object_id_method) + # Calls the given block if the flag is inactive for the given object. + sig do + override + .params( + feature: T.any(Symbol, String), + object: Object, + object_id_method: Symbol, + block: T.proc.void, + ).void + end + def when_inactive_for(feature, object, object_id_method: CONFIG.default_id_method, &block) + return unless inactive_for?(feature, object, object_id_method: object_id_method) - yield + block.call end + # Activates the given flag. Returns `false` if it does not exist. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def activate(feature) return false unless exists?(feature) @@ -137,6 +255,8 @@ def activate(feature) alias activate_globally activate + # Activates the given flag partially. Returns `false` if it does not exist. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def activate_partially(feature) return false unless exists?(feature) @@ -145,17 +265,25 @@ def activate_partially(feature) true end - def activate_for(feature, objects, object_id_method = CONFIG.default_id_method) + # Activates the given flag for the given objects. Returns `false` if it does not exist. + sig do + override + .params( + feature: T.any(Symbol, String), + objects: Object, + object_id_method: Symbol, + ).void + end + def activate_for(feature, *objects, object_id_method: CONFIG.default_id_method) return false unless exists?(feature) - objects = [objects] unless objects.is_a? ::Array - to_activate_hash = objects_to_hash(objects, object_id_method) + to_activate_hash = objects_to_hash(objects, object_id_method: object_id_method) active_objects_hash = active_objects(feature) to_activate_hash.each do |klass, ids| (active_objects_hash[klass] = ids) && next unless active_objects_hash[klass] - active_objects_hash[klass].concat(ids).uniq!.sort! + active_objects_hash[klass]&.concat(ids)&.uniq!&.sort! # rubocop:disable Style/SafeNavigationChainLength end redis.hset(feature.to_s, 'active_for_objects', active_objects_hash.to_json) @@ -163,12 +291,26 @@ def activate_for(feature, objects, object_id_method = CONFIG.default_id_method) true end - def activate_for!(feature, objects, object_id_method = CONFIG.default_id_method) - return false unless activate_for(feature, objects, object_id_method) + # Activates the given flag for the given objects and sets the flag as partially active. + # Returns `false` if it does not exist. + sig do + override + .params( + feature: T.any(Symbol, String), + objects: Object, + object_id_method: Symbol, + ).void + end + def activate_for!(feature, *objects, object_id_method: CONFIG.default_id_method) + return false unless T.unsafe(self).activate_for(feature, *objects, object_id_method: object_id_method) activate_partially(feature) end + # Deactivates the given flag for all objects. + # Resets the list of objects that this flag has been turned on for. + # Returns `false` if it does not exist. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def deactivate!(feature) return false unless exists?(feature) @@ -178,6 +320,10 @@ def deactivate!(feature) true end + # Deactivates the given flag globally. + # Does not reset the list of objects that this flag has been turned on for. + # Returns `false` if it does not exist. + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def deactivate(feature) return false unless exists?(feature) @@ -186,18 +332,39 @@ def deactivate(feature) true end + # Returns a hash of Objects that the given flag is turned on for. + # The keys are class/model names, values are arrays of IDs of instances/records. + # + # looks like this: + # + # { "Page" => [25, 89], "Book" => [152] } + # + sig do + override + .params(feature: T.any(Symbol, String)) + .returns(T::Hash[String, T::Array[Object]]) + end def active_objects(feature) ::JSON.parse(redis.hget(feature.to_s, 'active_for_objects').to_s) rescue ::JSON::ParserError {} end - def deactivate_for(feature, objects, object_id_method = CONFIG.default_id_method) + # Deactivates the given flag for the given objects. Returns `false` if it does not exist. + sig do + override + .params( + feature: T.any(Symbol, String), + objects: Object, + object_id_method: Symbol, + ).void + end + def deactivate_for(feature, *objects, object_id_method: CONFIG.default_id_method) return false unless exists?(feature) active_objects_hash = active_objects(feature) - objects_to_deactivate_hash = objects_to_hash(objects, object_id_method) + objects_to_deactivate_hash = objects_to_hash(objects, object_id_method: object_id_method) objects_to_deactivate_hash.each do |klass, ids_to_remove| active_ids = active_objects_hash[klass] @@ -211,18 +378,38 @@ def deactivate_for(feature, objects, object_id_method = CONFIG.default_id_method true end + # Returns the data of the flag in a hash. + sig do + override + .params( + feature: T.any(Symbol, String), + ).returns(T.nilable(T::Hash[String, T.anything])) + end def get(feature) return unless exists?(feature) hash = redis.hgetall(feature.to_s) hash['mandatory'] = mandatory_flags.include?(feature.to_s) - hash['active_for_objects'] = ::JSON.parse(hash['active_for_objects']) rescue {} + hash['active_for_objects'] = begin + ::JSON.parse(hash['active_for_objects']) + rescue StandardError + {} + end hash end + # Adds the given feature flag. + sig do + override + .params( + feature: T.any(Symbol, String), + description: String, + active: T.any(String, Symbol, T::Boolean, NilClass), + ).returns(T.nilable(T::Hash[String, T.anything])) + end def add(feature, description, active = 'false') - return false if exists?(feature) + return if exists?(feature) active = if ACTIVE_GLOBALLY.include?(active) 'globally' @@ -233,17 +420,25 @@ def add(feature, description, active = 'false') end hash = { - 'name' => feature.to_s, - 'active' => active, - 'description' => description + 'name' => feature.to_s, + 'active' => active, + 'description' => description, } redis.hset(feature.to_s, hash) hash end + # Removes the given feature flag. + # Returns its data or nil if it does not exist. + sig do + override + .params( + feature: T.any(Symbol, String), + ).returns(T.nilable(T::Hash[String, T.anything])) + end def remove(feature) - return false unless exists?(feature) + return unless exists?(feature) removed = get(feature) redis.del(feature.to_s) @@ -251,10 +446,14 @@ def remove(feature) removed end + # Returns the data of all feature flags. + sig do + override.returns(T::Array[T::Hash[String, T.anything]]) + end def all keys = [] hashes = [] - redis.scan_each(match: "*") do |key| + redis.scan_each(match: '*') do |key| next if keys.include?(key) keys << key @@ -264,30 +463,12 @@ def all hashes end + sig { returns(T.nilable(Redis::Namespace)) } def namespaced_redis - redis - end + r = redis + return unless r.is_a?(Redis::Namespace) - private - - def objects_to_hash(objects, object_id_method = CONFIG.default_id_method) - objects = [objects] unless objects.is_a? ::Array - - objects.group_by { |ob| ob.class.to_s }.transform_values { |arr| arr.map(&object_id_method) } - end - - def import_flags_from_file - changes = ::YAML.load_file(file) - changes = { mandatory: [], remove: [] } unless changes.is_a? ::Hash - - changes[:mandatory].each do |el| - mandatory_flags << el['name'] - add(el['name'], el['description'], el['active']) - end - - changes[:remove].each do |el| - remove(el) - end + r end end end diff --git a/lib/simple_feature_flags/test_ram_storage.rb b/lib/simple_feature_flags/test_ram_storage.rb index 81b1eeb..a1c6b75 100644 --- a/lib/simple_feature_flags/test_ram_storage.rb +++ b/lib/simple_feature_flags/test_ram_storage.rb @@ -1,9 +1,15 @@ +# typed: true # frozen_string_literal: true module SimpleFeatureFlags + # Used in tests class TestRamStorage < RamStorage + sig { override.params(feature: T.any(Symbol, String)).returns(T::Boolean) } def active?(feature) - raise(FlagNotDefinedError, "Feature Flag `#{feature}` is not defined as mandatory in #{file}") unless mandatory_flags.include?(feature.to_s) + unless mandatory_flags.include?(feature.to_s) + raise(FlagNotDefinedError, + "Feature Flag `#{feature}` is not defined as mandatory in #{file}",) + end super end diff --git a/lib/simple_feature_flags/version.rb b/lib/simple_feature_flags/version.rb index bc8e0a2..15ee4c0 100644 --- a/lib/simple_feature_flags/version.rb +++ b/lib/simple_feature_flags/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module SimpleFeatureFlags - VERSION = "1.2.0" + VERSION = '1.3.0' end diff --git a/simple_feature_flags.gemspec b/simple_feature_flags.gemspec index f7123db..453e0e1 100644 --- a/simple_feature_flags.gemspec +++ b/simple_feature_flags.gemspec @@ -3,36 +3,31 @@ require_relative 'lib/simple_feature_flags/version' ::Gem::Specification.new do |spec| - spec.name = "simple_feature_flags" + spec.name = 'simple_feature_flags' spec.version = ::SimpleFeatureFlags::VERSION - spec.authors = ["Espago", "Mateusz Drewniak"] - spec.email = ["m.drewniak@espago.com"] + spec.authors = ['Espago', 'Mateusz Drewniak'] + spec.email = ['m.drewniak@espago.com'] - spec.summary = "Simple feature flag functionality for your Ruby/Rails/Sinatra app!" - spec.description = "A simple Ruby gem which lets you dynamically enable/disable parts of your code using Redis or your server's RAM!" - spec.homepage = "https://github.com/espago/simple_feature_flags" - spec.license = "MIT" - spec.required_ruby_version = ::Gem::Requirement.new(">= 2.5.0") + spec.summary = 'Simple feature flag functionality for your Ruby/Rails/Sinatra app!' + spec.description = <<~DESC + A simple Ruby gem which lets you dynamically enable/disable parts of your code using Redis or your server's RAM! + DESC + spec.homepage = 'https://github.com/espago/simple_feature_flags' + spec.license = 'MIT' + spec.required_ruby_version = '>= 3.1.0' - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = "https://github.com/espago/simple_feature_flags" + spec.metadata['homepage_uri'] = spec.homepage + spec.metadata['source_code_uri'] = 'https://github.com/espago/simple_feature_flags' # Specify which files should be added to the gem when it is released. # The `git ls-files -z` loads the files in the RubyGem that have been added into git. spec.files = ::Dir.chdir(::File.expand_path(__dir__)) do - `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } + `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|sorbet)/}) } end - spec.bindir = "exe" + spec.bindir = 'exe' spec.executables = ['simple_feature_flags'] - spec.require_paths = ["lib"] + spec.require_paths = ['lib'] - spec.add_development_dependency 'bundler' - spec.add_development_dependency 'bundler-audit' - spec.add_development_dependency 'byebug' - spec.add_development_dependency 'minitest', '~> 5.0' - spec.add_development_dependency 'rake', '~> 12.0' - spec.add_development_dependency 'redis' - spec.add_development_dependency 'redis-namespace' - spec.add_development_dependency 'rubocop' - spec.add_development_dependency 'solargraph' + spec.add_dependency 'sorbet-runtime', '> 0.5' + spec.metadata['rubygems_mfa_required'] = 'true' end diff --git a/sorbet/config b/sorbet/config new file mode 100644 index 0000000..983d2f1 --- /dev/null +++ b/sorbet/config @@ -0,0 +1,4 @@ +--dir +. +--ignore=tmp/ +--ignore=vendor/ diff --git a/sorbet/rbi/annotations/.gitattributes b/sorbet/rbi/annotations/.gitattributes new file mode 100644 index 0000000..d2eacd2 --- /dev/null +++ b/sorbet/rbi/annotations/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-vendored=true diff --git a/sorbet/rbi/annotations/minitest.rbi b/sorbet/rbi/annotations/minitest.rbi new file mode 100644 index 0000000..64a8928 --- /dev/null +++ b/sorbet/rbi/annotations/minitest.rbi @@ -0,0 +1,119 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module Minitest::Assertions + sig { params(test: T.anything, msg: T.anything).returns(TrueClass) } + def assert(test, msg = nil); end + + sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_empty(obj, msg = nil); end + + sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) } + def assert_equal(exp, act, msg = nil); end + + sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) } + def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end + + sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) } + def assert_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end + + sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_includes(collection, obj, msg = nil); end + + sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_instance_of(cls, obj, msg = nil); end + + sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_kind_of(cls, obj, msg = nil); end + + sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(MatchData) } + def assert_match(matcher, obj, msg = nil); end + + sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) } + def assert_nil(obj, msg = nil); end + + sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) } + def assert_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end + + sig { params(stdout: T.nilable(T.any(String, Regexp)), stderr: T.nilable(T.any(String, Regexp)), block: T.proc.void).returns(T::Boolean) } + def assert_output(stdout = nil, stderr = nil, &block); end + + sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) } + def assert_path_exists(path, msg = nil); end + + sig { params(block: T.proc.void).returns(TrueClass) } + def assert_pattern(&block); end + + sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) } + def assert_predicate(o1, op, msg = nil); end + + sig { params(exp: NilClass, block: T.proc.void).returns(StandardError) } + sig { type_parameters(:T).params(exp: T.any(T::Class[T.type_parameter(:T)], Regexp, String), block: T.proc.void).returns(T.type_parameter(:T)) } + def assert_raises(*exp, &block); end + + sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) } + def assert_respond_to(obj, meth, msg = nil, include_all: false); end + + sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) } + def assert_same(exp, act, msg = nil); end + + sig { params(send_ary: T::Array[T.anything], m: T.anything).returns(T::Boolean) } + def assert_send(send_ary, m = nil); end + + sig { params(block: T.proc.void).returns(T::Boolean) } + def assert_silent(&block); end + + sig { params(sym: Symbol, msg: T.anything, block: T.proc.void).returns(T.anything) } + def assert_throws(sym, msg = nil, &block); end + + sig { params(test: T.anything, msg: T.anything).returns(TrueClass) } + def refute(test, msg = nil); end + + sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_empty(obj, msg = nil); end + + sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) } + def refute_equal(exp, act, msg = nil); end + + sig { params(exp: T.anything, act: T.anything, delta: Numeric, msg: T.anything).returns(TrueClass) } + def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = nil); end + + sig { params(a: T.anything, b: T.anything, epsilon: Numeric, msg: T.anything).returns(TrueClass) } + def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = nil); end + + sig { params(collection: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_includes(collection, obj, msg = nil); end + + sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_instance_of(cls, obj, msg = nil); end + + sig { params(cls: T.anything, obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_kind_of(cls, obj, msg = nil); end + + sig { params(matcher: T.any(String, Regexp), obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_match(matcher, obj, msg = nil); end + + sig { params(obj: T.anything, msg: T.anything).returns(TrueClass) } + def refute_nil(obj, msg = nil); end + + sig { params(block: T.proc.void).returns(TrueClass) } + def refute_pattern(&block); end + + sig { params(o1: T.anything, op: T.any(Symbol, String), o2: T.anything, msg: T.anything).returns(TrueClass) } + def refute_operator(o1, op, o2 = T.unsafe(nil), msg = nil); end + + sig { params(path: T.any(String, Pathname), msg: T.anything).returns(TrueClass) } + def refute_path_exists(path, msg = nil); end + + sig { params(o1: T.anything, op: T.any(String, Symbol), msg: T.anything).returns(TrueClass) } + def refute_predicate(o1, op, msg = nil); end + + sig { params(obj: T.anything, meth: T.any(String, Symbol), msg: T.anything, include_all: T::Boolean).returns(TrueClass) } + def refute_respond_to(obj, meth, msg = nil, include_all: false); end + + sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) } + def refute_same(exp, act, msg = nil); end +end diff --git a/sorbet/rbi/annotations/rainbow.rbi b/sorbet/rbi/annotations/rainbow.rbi new file mode 100644 index 0000000..0d2cb4e --- /dev/null +++ b/sorbet/rbi/annotations/rainbow.rbi @@ -0,0 +1,269 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This file was pulled from a central RBI files repository. +# Please run `bin/tapioca annotations` to update it. + +module Rainbow + # @shim: https://github.com/sickill/rainbow/blob/master/lib/rainbow.rb#L10-L12 + sig { returns(T::Boolean) } + attr_accessor :enabled + + class Color + sig { returns(Symbol) } + attr_reader :ground + + sig { params(ground: Symbol, values: T.any([Integer], [Integer, Integer, Integer])).returns(Color) } + def self.build(ground, values); end + + sig { params(hex: String).returns([Integer, Integer, Integer]) } + def self.parse_hex_color(hex); end + + class Indexed < Rainbow::Color + sig { returns(Integer) } + attr_reader :num + + sig { params(ground: Symbol, num: Integer).void } + def initialize(ground, num); end + + sig { returns(T::Array[Integer]) } + def codes; end + end + + class Named < Rainbow::Color::Indexed + NAMES = T.let(nil, T::Hash[Symbol, Integer]) + + sig { params(ground: Symbol, name: Symbol).void } + def initialize(ground, name); end + + sig { returns(T::Array[Symbol]) } + def self.color_names; end + + sig { returns(String) } + def self.valid_names; end + end + + class RGB < Rainbow::Color::Indexed + sig { returns(Integer) } + attr_reader :r, :g, :b + + sig { params(ground: Symbol, values: Integer).void } + def initialize(ground, *values); end + + sig { returns(T::Array[Integer]) } + def codes; end + + sig { params(value: Numeric).returns(Integer) } + def self.to_ansi_domain(value); end + end + + class X11Named < Rainbow::Color::RGB + include Rainbow::X11ColorNames + + sig { params(ground: Symbol, name: Symbol).void } + def initialize(ground, name); end + + sig { returns(T::Array[Symbol]) } + def self.color_names; end + + sig { returns(String) } + def self.valid_names; end + end + end + + sig { returns(Wrapper) } + def self.global; end + + sig { returns(T::Boolean) } + def self.enabled; end + + sig { params(value: T::Boolean).returns(T::Boolean) } + def self.enabled=(value); end + + sig { params(string: String).returns(String) } + def self.uncolor(string); end + + class NullPresenter < String + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def color(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def foreground(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def fg(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def background(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(NullPresenter) } + def bg(*values); end + + sig { returns(NullPresenter) } + def reset; end + + sig { returns(NullPresenter) } + def bright; end + + sig { returns(NullPresenter) } + def faint; end + + sig { returns(NullPresenter) } + def italic; end + + sig { returns(NullPresenter) } + def underline; end + + sig { returns(NullPresenter) } + def blink; end + + sig { returns(NullPresenter) } + def inverse; end + + sig { returns(NullPresenter) } + def hide; end + + sig { returns(NullPresenter) } + def cross_out; end + + sig { returns(NullPresenter) } + def black; end + + sig { returns(NullPresenter) } + def red; end + + sig { returns(NullPresenter) } + def green; end + + sig { returns(NullPresenter) } + def yellow; end + + sig { returns(NullPresenter) } + def blue; end + + sig { returns(NullPresenter) } + def magenta; end + + sig { returns(NullPresenter) } + def cyan; end + + sig { returns(NullPresenter) } + def white; end + + sig { returns(NullPresenter) } + def bold; end + + sig { returns(NullPresenter) } + def dark; end + + sig { returns(NullPresenter) } + def strike; end + end + + class Presenter < String + TERM_EFFECTS = T.let(nil, T::Hash[Symbol, Integer]) + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def color(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def foreground(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def fg(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def background(*values); end + + sig { params(values: T.any([Integer], [Integer, Integer, Integer])).returns(Presenter) } + def bg(*values); end + + sig { returns(Presenter) } + def reset; end + + sig { returns(Presenter) } + def bright; end + + sig { returns(Presenter) } + def faint; end + + sig { returns(Presenter) } + def italic; end + + sig { returns(Presenter) } + def underline; end + + sig { returns(Presenter) } + def blink; end + + sig { returns(Presenter) } + def inverse; end + + sig { returns(Presenter) } + def hide; end + + sig { returns(Presenter) } + def cross_out; end + + sig { returns(Presenter) } + def black; end + + sig { returns(Presenter) } + def red; end + + sig { returns(Presenter) } + def green; end + + sig { returns(Presenter) } + def yellow; end + + sig { returns(Presenter) } + def blue; end + + sig { returns(Presenter) } + def magenta; end + + sig { returns(Presenter) } + def cyan; end + + sig { returns(Presenter) } + def white; end + + sig { returns(Presenter) } + def bold; end + + sig { returns(Presenter) } + def dark; end + + sig { returns(Presenter) } + def strike; end + end + + class StringUtils + sig { params(string: String, codes: T::Array[Integer]).returns(String) } + def self.wrap_with_sgr(string, codes); end + + sig { params(string: String).returns(String) } + def self.uncolor(string); end + end + + VERSION = T.let(nil, String) + + class Wrapper + sig { returns(T::Boolean) } + attr_accessor :enabled + + sig { params(enabled: T::Boolean).void } + def initialize(enabled = true); end + + sig { params(string: String).returns(T.any(Rainbow::Presenter, Rainbow::NullPresenter)) } + def wrap(string); end + end + + module X11ColorNames + NAMES = T.let(nil, T::Hash[Symbol, [Integer, Integer, Integer]]) + end +end + +sig { params(string: String).returns(Rainbow::Presenter) } +def Rainbow(string); end diff --git a/sorbet/rbi/gems/.gitattributes b/sorbet/rbi/gems/.gitattributes new file mode 100644 index 0000000..d9bb82a --- /dev/null +++ b/sorbet/rbi/gems/.gitattributes @@ -0,0 +1 @@ +**/*.rbi linguist-generated=true diff --git a/sorbet/rbi/gems/ast@2.4.2.rbi b/sorbet/rbi/gems/ast@2.4.2.rbi new file mode 100644 index 0000000..e0ae88e --- /dev/null +++ b/sorbet/rbi/gems/ast@2.4.2.rbi @@ -0,0 +1,585 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ast` gem. +# Please instead update this file by running `bin/tapioca gem ast`. + + +# {AST} is a library for manipulating abstract syntax trees. +# +# It embraces immutability; each AST node is inherently frozen at +# creation, and updating a child node requires recreating that node +# and its every parent, recursively. +# This is a design choice. It does create some pressure on +# garbage collector, but completely eliminates all concurrency +# and aliasing problems. +# +# See also {AST::Node}, {AST::Processor::Mixin} and {AST::Sexp} for +# additional recommendations and design patterns. +# +# source://ast//lib/ast.rb#13 +module AST; end + +# Node is an immutable class, instances of which represent abstract +# syntax tree nodes. It combines semantic information (i.e. anything +# that affects the algorithmic properties of a program) with +# meta-information (line numbers or compiler intermediates). +# +# Notes on inheritance +# ==================== +# +# The distinction between semantics and metadata is important. Complete +# semantic information should be contained within just the {#type} and +# {#children} of a Node instance; in other words, if an AST was to be +# stripped of all meta-information, it should remain a valid AST which +# could be successfully processed to yield a result with the same +# algorithmic properties. +# +# Thus, Node should never be inherited in order to define methods which +# affect or return semantic information, such as getters for `class_name`, +# `superclass` and `body` in the case of a hypothetical `ClassNode`. The +# correct solution is to use a generic Node with a {#type} of `:class` +# and three children. See also {Processor} for tips on working with such +# ASTs. +# +# On the other hand, Node can and should be inherited to define +# application-specific metadata (see also {#initialize}) or customize the +# printing format. It is expected that an application would have one or two +# such classes and use them across the entire codebase. +# +# The rationale for this pattern is extensibility and maintainability. +# Unlike static ones, dynamic languages do not require the presence of a +# predefined, rigid structure, nor does it improve dispatch efficiency, +# and while such a structure can certainly be defined, it does not add +# any value but incurs a maintaining cost. +# For example, extending the AST even with a transformation-local +# temporary node type requires making globally visible changes to +# the codebase. +# +# source://ast//lib/ast/node.rb#40 +class AST::Node + # Constructs a new instance of Node. + # + # The arguments `type` and `children` are converted with `to_sym` and + # `to_a` respectively. Additionally, the result of converting `children` + # is frozen. While mutating the arguments is generally considered harmful, + # the most common case is to pass an array literal to the constructor. If + # your code does not expect the argument to be frozen, use `#dup`. + # + # The `properties` hash is passed to {#assign_properties}. + # + # @return [Node] a new instance of Node + # + # source://ast//lib/ast/node.rb#72 + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 + def +(array); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 + def <<(element); end + + # Compares `self` to `other`, possibly converting with `to_ast`. Only + # `type` and `children` are compared; metadata is deliberately ignored. + # + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#153 + def ==(other); end + + # Appends `element` to `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#177 + def append(element); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 + def children; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 + def clone; end + + # Concatenates `array` with `children` and returns the resulting node. + # + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#168 + def concat(array); end + + # Enables matching for Node, where type is the first element + # and the children are remaining items. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#253 + def deconstruct; end + + # Nodes are already frozen, so there is no harm in returning the + # current node as opposed to initializing from scratch and freezing + # another one. + # + # @return self + # + # source://ast//lib/ast/node.rb#115 + def dup; end + + # Test if other object is equal to + # + # @param other [Object] + # @return [Boolean] + # + # source://ast//lib/ast/node.rb#85 + def eql?(other); end + + # Returns the precomputed hash value for this node + # + # @return [Fixnum] + # + # source://ast//lib/ast/node.rb#61 + def hash; end + + # Converts `self` to a s-expression ruby string. + # The code return will recreate the node, using the sexp module s() + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#211 + def inspect(indent = T.unsafe(nil)); end + + # Returns the children of this node. + # The returned value is frozen. + # The to_a alias is useful for decomposing nodes concisely. + # For example: + # + # node = s(:gasgn, :$foo, s(:integer, 1)) + # var_name, value = *node + # p var_name # => :$foo + # p value # => (integer 1) + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#56 + def to_a; end + + # @return [AST::Node] self + # + # source://ast//lib/ast/node.rb#229 + def to_ast; end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 + def to_s(indent = T.unsafe(nil)); end + + # Converts `self` to a pretty-printed s-expression. + # + # @param indent [Integer] Base indentation level. + # @return [String] + # + # source://ast//lib/ast/node.rb#187 + def to_sexp(indent = T.unsafe(nil)); end + + # Converts `self` to an Array where the first element is the type as a Symbol, + # and subsequent elements are the same representation of its children. + # + # @return [Array] + # + # source://ast//lib/ast/node.rb#237 + def to_sexp_array; end + + # Returns the type of this node. + # + # @return [Symbol] + # + # source://ast//lib/ast/node.rb#43 + def type; end + + # Returns a new instance of Node where non-nil arguments replace the + # corresponding fields of `self`. + # + # For example, `Node.new(:foo, [ 1, 2 ]).updated(:bar)` would yield + # `(bar 1 2)`, and `Node.new(:foo, [ 1, 2 ]).updated(nil, [])` would + # yield `(foo)`. + # + # If the resulting node would be identical to `self`, does nothing. + # + # @param type [Symbol, nil] + # @param children [Array, nil] + # @param properties [Hash, nil] + # @return [AST::Node] + # + # source://ast//lib/ast/node.rb#133 + def updated(type = T.unsafe(nil), children = T.unsafe(nil), properties = T.unsafe(nil)); end + + protected + + # By default, each entry in the `properties` hash is assigned to + # an instance variable in this instance of Node. A subclass should define + # attribute readers for such variables. The values passed in the hash + # are not frozen or whitelisted; such behavior can also be implemented + # by subclassing Node and overriding this method. + # + # @return [nil] + # + # source://ast//lib/ast/node.rb#98 + def assign_properties(properties); end + + # Returns `@type` with all underscores replaced by dashes. This allows + # to write symbol literals without quotes in Ruby sources and yet have + # nicely looking s-expressions. + # + # @return [String] + # + # source://ast//lib/ast/node.rb#264 + def fancy_type; end + + private + + def original_dup; end +end + +# This class includes {AST::Processor::Mixin}; however, it is +# deprecated, since the module defines all of the behaviors that +# the processor includes. Any new libraries should use +# {AST::Processor::Mixin} instead of subclassing this. +# +# @deprecated Use {AST::Processor::Mixin} instead. +# +# source://ast//lib/ast/processor.rb#8 +class AST::Processor + include ::AST::Processor::Mixin +end + +# The processor module is a module which helps transforming one +# AST into another. In a nutshell, the {#process} method accepts +# a {Node} and dispatches it to a handler corresponding to its +# type, and returns a (possibly) updated variant of the node. +# +# The processor module has a set of associated design patterns. +# They are best explained with a concrete example. Let's define a +# simple arithmetic language and an AST format for it: +# +# Terminals (AST nodes which do not have other AST nodes inside): +# +# * `(integer )`, +# +# Nonterminals (AST nodes with other nodes as children): +# +# * `(add )`, +# * `(multiply )`, +# * `(divide )`, +# * `(negate )`, +# * `(store )`: stores value of `` +# into a variable named ``, +# * `(load )`: loads value of a variable named +# ``, +# * `(each ...)`: computes each of the ``s and +# prints the result. +# +# All AST nodes have the same Ruby class, and therefore they don't +# know how to traverse themselves. (A solution which dynamically +# checks the type of children is possible, but is slow and +# error-prone.) So, a class including the module which knows how +# to traverse the entire tree should be defined. Such classes +# have a handler for each nonterminal node which recursively +# processes children nodes: +# +# require 'ast' +# +# class ArithmeticsProcessor +# include AST::Processor::Mixin +# # This method traverses any binary operators such as (add) +# # or (multiply). +# def process_binary_op(node) +# # Children aren't decomposed automatically; it is +# # suggested to use Ruby multiple assignment expansion, +# # as it is very convenient here. +# left_expr, right_expr = *node +# +# # AST::Node#updated won't change node type if nil is +# # passed as a first argument, which allows to reuse the +# # same handler for multiple node types using `alias' +# # (below). +# node.updated(nil, [ +# process(left_expr), +# process(right_expr) +# ]) +# end +# alias_method :on_add, :process_binary_op +# alias_method :on_multiply, :process_binary_op +# alias_method :on_divide, :process_binary_op +# +# def on_negate(node) +# # It is also possible to use #process_all for more +# # compact code if every child is a Node. +# node.updated(nil, process_all(node)) +# end +# +# def on_store(node) +# expr, variable_name = *node +# +# # Note that variable_name is not a Node and thus isn't +# # passed to #process. +# node.updated(nil, [ +# process(expr), +# variable_name +# ]) +# end +# +# # (load) is effectively a terminal node, and so it does +# # not need an explicit handler, as the following is the +# # default behavior. Essentially, for any nodes that don't +# # have a defined handler, the node remains unchanged. +# def on_load(node) +# nil +# end +# +# def on_each(node) +# node.updated(nil, process_all(node)) +# end +# end +# +# Let's test our ArithmeticsProcessor: +# +# include AST::Sexp +# expr = s(:add, s(:integer, 2), s(:integer, 2)) +# +# p ArithmeticsProcessor.new.process(expr) == expr # => true +# +# As expected, it does not change anything at all. This isn't +# actually very useful, so let's now define a Calculator, which +# will compute the expression values: +# +# # This Processor folds nonterminal nodes and returns an +# # (integer) terminal node. +# class ArithmeticsCalculator < ArithmeticsProcessor +# def compute_op(node) +# # First, node children are processed and then unpacked +# # to local variables. +# nodes = process_all(node) +# +# if nodes.all? { |node| node.type == :integer } +# # If each of those nodes represents a literal, we can +# # fold this node! +# values = nodes.map { |node| node.children.first } +# AST::Node.new(:integer, [ +# yield(values) +# ]) +# else +# # Otherwise, we can just leave the current node in the +# # tree and only update it with processed children +# # nodes, which can be partially folded. +# node.updated(nil, nodes) +# end +# end +# +# def on_add(node) +# compute_op(node) { |left, right| left + right } +# end +# +# def on_multiply(node) +# compute_op(node) { |left, right| left * right } +# end +# end +# +# Let's check: +# +# p ArithmeticsCalculator.new.process(expr) # => (integer 4) +# +# Excellent, the calculator works! Now, a careful reader could +# notice that the ArithmeticsCalculator does not know how to +# divide numbers. What if we pass an expression with division to +# it? +# +# expr_with_division = \ +# s(:add, +# s(:integer, 1), +# s(:divide, +# s(:add, s(:integer, 8), s(:integer, 4)), +# s(:integer, 3))) # 1 + (8 + 4) / 3 +# +# folded_expr_with_division = ArithmeticsCalculator.new.process(expr_with_division) +# p folded_expr_with_division +# # => (add +# # (integer 1) +# # (divide +# # (integer 12) +# # (integer 3))) +# +# As you can see, the expression was folded _partially_: the inner +# `(add)` node which could be computed was folded to +# `(integer 12)`, the `(divide)` node is left as-is because there +# is no computing handler for it, and the root `(add)` node was +# also left as it is because some of its children were not +# literals. +# +# Note that this partial folding is only possible because the +# _data_ format, i.e. the format in which the computed values of +# the nodes are represented, is the same as the AST itself. +# +# Let's extend our ArithmeticsCalculator class further. +# +# class ArithmeticsCalculator +# def on_divide(node) +# compute_op(node) { |left, right| left / right } +# end +# +# def on_negate(node) +# # Note how #compute_op works regardless of the operator +# # arity. +# compute_op(node) { |value| -value } +# end +# end +# +# Now, let's apply our renewed ArithmeticsCalculator to a partial +# result of previous evaluation: +# +# p ArithmeticsCalculator.new.process(expr_with_division) # => (integer 5) +# +# Five! Excellent. This is also pretty much how CRuby 1.8 executed +# its programs. +# +# Now, let's do some automated bug searching. Division by zero is +# an error, right? So if we could detect that someone has divided +# by zero before the program is even run, that could save some +# debugging time. +# +# class DivisionByZeroVerifier < ArithmeticsProcessor +# class VerificationFailure < Exception; end +# +# def on_divide(node) +# # You need to process the children to handle nested divisions +# # such as: +# # (divide +# # (integer 1) +# # (divide (integer 1) (integer 0)) +# left, right = process_all(node) +# +# if right.type == :integer && +# right.children.first == 0 +# raise VerificationFailure, "Ouch! This code divides by zero." +# end +# end +# +# def divides_by_zero?(ast) +# process(ast) +# false +# rescue VerificationFailure +# true +# end +# end +# +# nice_expr = \ +# s(:divide, +# s(:add, s(:integer, 10), s(:integer, 2)), +# s(:integer, 4)) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(nice_expr) +# # => false. Good. +# +# bad_expr = \ +# s(:add, s(:integer, 10), +# s(:divide, s(:integer, 1), s(:integer, 0))) +# +# p DivisionByZeroVerifier.new.divides_by_zero?(bad_expr) +# # => true. WHOOPS. DO NOT RUN THIS. +# +# Of course, this won't detect more complex cases... unless you +# use some partial evaluation before! The possibilites are +# endless. Have fun. +# +# source://ast//lib/ast/processor/mixin.rb#240 +module AST::Processor::Mixin + # Default handler. Does nothing. + # + # @param node [AST::Node] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#284 + def handler_missing(node); end + + # Dispatches `node`. If a node has type `:foo`, then a handler + # named `on_foo` is invoked with one argument, the `node`; if + # there isn't such a handler, {#handler_missing} is invoked + # with the same argument. + # + # If the handler returns `nil`, `node` is returned; otherwise, + # the return value of the handler is passed along. + # + # @param node [AST::Node, nil] + # @return [AST::Node, nil] + # + # source://ast//lib/ast/processor/mixin.rb#251 + def process(node); end + + # {#process}es each node from `nodes` and returns an array of + # results. + # + # @param nodes [Array] + # @return [Array] + # + # source://ast//lib/ast/processor/mixin.rb#274 + def process_all(nodes); end +end + +# This simple module is very useful in the cases where one needs +# to define deeply nested ASTs from Ruby code, for example, in +# tests. It should be used like this: +# +# describe YourLanguage::AST do +# include Sexp +# +# it "should correctly parse expressions" do +# YourLanguage.parse("1 + 2 * 3").should == +# s(:add, +# s(:integer, 1), +# s(:multiply, +# s(:integer, 2), +# s(:integer, 3))) +# end +# end +# +# This way the amount of boilerplate code is greatly reduced. +# +# source://ast//lib/ast/sexp.rb#20 +module AST::Sexp + # Creates a {Node} with type `type` and children `children`. + # Note that the resulting node is of the type AST::Node and not a + # subclass. + # This would not pose a problem with comparisons, as {Node#==} + # ignores metadata. + # + # source://ast//lib/ast/sexp.rb#26 + def s(type, *children); end +end diff --git a/sorbet/rbi/gems/byebug@11.1.3.rbi b/sorbet/rbi/gems/byebug@11.1.3.rbi new file mode 100644 index 0000000..895f870 --- /dev/null +++ b/sorbet/rbi/gems/byebug@11.1.3.rbi @@ -0,0 +1,37 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `byebug` gem. +# Please instead update this file by running `bin/tapioca gem byebug`. + + +# Reopen main module to define the library version +# +# source://byebug//lib/byebug/attacher.rb#6 +module Byebug + class << self + # Starts byebug, and stops at the first line of user's code. + # + # source://byebug//lib/byebug/attacher.rb#10 + def attach; end + + # source://byebug//lib/byebug/attacher.rb#21 + def spawn(host = T.unsafe(nil), port = T.unsafe(nil)); end + end +end + +# Adds a `byebug` method to the Kernel module. +# +# Dropping a `byebug` call anywhere in your code, you get a debug prompt. +# +# source://byebug//lib/byebug/attacher.rb#34 +module Kernel + # source://byebug//lib/byebug/attacher.rb#35 + def byebug; end + + # source://byebug//lib/byebug/attacher.rb#35 + def debugger; end + + # source://byebug//lib/byebug/attacher.rb#41 + def remote_byebug(host = T.unsafe(nil), port = T.unsafe(nil)); end +end diff --git a/sorbet/rbi/gems/connection_pool@2.4.1.rbi b/sorbet/rbi/gems/connection_pool@2.4.1.rbi new file mode 100644 index 0000000..5632a4c --- /dev/null +++ b/sorbet/rbi/gems/connection_pool@2.4.1.rbi @@ -0,0 +1,274 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `connection_pool` gem. +# Please instead update this file by running `bin/tapioca gem connection_pool`. + + +# Generic connection pool class for sharing a limited number of objects or network connections +# among many threads. Note: pool elements are lazily created. +# +# Example usage with block (faster): +# +# @pool = ConnectionPool.new { Redis.new } +# @pool.with do |redis| +# redis.lpop('my-list') if redis.llen('my-list') > 0 +# end +# +# Using optional timeout override (for that single invocation) +# +# @pool.with(timeout: 2.0) do |redis| +# redis.lpop('my-list') if redis.llen('my-list') > 0 +# end +# +# Example usage replacing an existing connection (slower): +# +# $redis = ConnectionPool.wrap { Redis.new } +# +# def do_work +# $redis.lpop('my-list') if $redis.llen('my-list') > 0 +# end +# +# Accepts the following options: +# - :size - number of connections to pool, defaults to 5 +# - :timeout - amount of time to wait for a connection if none currently available, defaults to 5 seconds +# - :auto_reload_after_fork - automatically drop all connections after fork, defaults to true +# +# source://connection_pool//lib/connection_pool/version.rb#1 +class ConnectionPool + # @raise [ArgumentError] + # @return [ConnectionPool] a new instance of ConnectionPool + # + # source://connection_pool//lib/connection_pool.rb#90 + def initialize(options = T.unsafe(nil), &block); end + + # Automatically drop all connections after fork + # + # source://connection_pool//lib/connection_pool.rb#166 + def auto_reload_after_fork; end + + # Number of pool entries available for checkout at this instant. + # + # source://connection_pool//lib/connection_pool.rb#169 + def available; end + + # source://connection_pool//lib/connection_pool.rb#129 + def checkin(force: T.unsafe(nil)); end + + # source://connection_pool//lib/connection_pool.rb#119 + def checkout(options = T.unsafe(nil)); end + + # Reloads the ConnectionPool by passing each connection to +block+ and then + # removing it the pool. Subsequent checkouts will create new connections as + # needed. + # + # source://connection_pool//lib/connection_pool.rb#159 + def reload(&block); end + + # Shuts down the ConnectionPool by passing each connection to +block+ and + # then removing it from the pool. Attempting to checkout a connection after + # shutdown will raise +ConnectionPool::PoolShuttingDownError+. + # + # source://connection_pool//lib/connection_pool.rb#150 + def shutdown(&block); end + + # Size of this connection pool + # + # source://connection_pool//lib/connection_pool.rb#164 + def size; end + + # source://connection_pool//lib/connection_pool.rb#105 + def then(options = T.unsafe(nil)); end + + # source://connection_pool//lib/connection_pool.rb#105 + def with(options = T.unsafe(nil)); end + + class << self + # source://connection_pool//lib/connection_pool.rb#52 + def after_fork; end + + # source://connection_pool//lib/connection_pool.rb#44 + def wrap(options, &block); end + end +end + +# source://connection_pool//lib/connection_pool.rb#42 +ConnectionPool::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# source://connection_pool//lib/connection_pool.rb#5 +class ConnectionPool::Error < ::RuntimeError; end + +# source://connection_pool//lib/connection_pool.rb#70 +module ConnectionPool::ForkTracker + # source://connection_pool//lib/connection_pool.rb#71 + def _fork; end +end + +# source://connection_pool//lib/connection_pool.rb#49 +ConnectionPool::INSTANCES = T.let(T.unsafe(nil), ObjectSpace::WeakMap) + +# source://connection_pool//lib/connection_pool.rb#7 +class ConnectionPool::PoolShuttingDownError < ::ConnectionPool::Error; end + +# Examples: +# +# ts = TimedStack.new(1) { MyConnection.new } +# +# # fetch a connection +# conn = ts.pop +# +# # return a connection +# ts.push conn +# +# conn = ts.pop +# ts.pop timeout: 5 +# #=> raises ConnectionPool::TimeoutError after 5 seconds +# +# source://connection_pool//lib/connection_pool/timed_stack.rb#20 +class ConnectionPool::TimedStack + # Creates a new pool with +size+ connections that are created from the given + # +block+. + # + # @return [TimedStack] a new instance of TimedStack + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#27 + def initialize(size = T.unsafe(nil), &block); end + + # Returns +obj+ to the stack. +options+ is ignored in TimedStack but may be + # used by subclasses that extend TimedStack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#41 + def <<(obj, options = T.unsafe(nil)); end + + # Returns +true+ if there are no available connections. + # + # @return [Boolean] + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#104 + def empty?; end + + # The number of connections available on the stack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#111 + def length; end + + # Returns the value of attribute max. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#21 + def max; end + + # Retrieves a connection from the stack. If a connection is available it is + # immediately returned. If no connection is available within the given + # timeout a ConnectionPool::TimeoutError is raised. + # + # +:timeout+ is the only checked entry in +options+ and is preferred over + # the +timeout+ argument (which will be removed in a future release). Other + # options may be used by subclasses that extend TimedStack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#63 + def pop(timeout = T.unsafe(nil), options = T.unsafe(nil)); end + + # Returns +obj+ to the stack. +options+ is ignored in TimedStack but may be + # used by subclasses that extend TimedStack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#41 + def push(obj, options = T.unsafe(nil)); end + + # Shuts down the TimedStack by passing each connection to +block+ and then + # removing it from the pool. Attempting to checkout a connection after + # shutdown will raise +ConnectionPool::PoolShuttingDownError+ unless + # +:reload+ is +true+. + # + # @raise [ArgumentError] + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#89 + def shutdown(reload: T.unsafe(nil), &block); end + + private + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must returns true if a connection is available on the stack. + # + # @return [Boolean] + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#126 + def connection_stored?(options = T.unsafe(nil)); end + + # source://connection_pool//lib/connection_pool/timed_stack.rb#117 + def current_time; end + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must return a connection from the stack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#135 + def fetch_connection(options = T.unsafe(nil)); end + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must shut down all connections on the stack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#144 + def shutdown_connections(options = T.unsafe(nil)); end + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must return +obj+ to the stack. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#157 + def store_connection(obj, options = T.unsafe(nil)); end + + # This is an extension point for TimedStack and is called with a mutex. + # + # This method must create a connection if and only if the total number of + # connections allowed has not been met. + # + # source://connection_pool//lib/connection_pool/timed_stack.rb#167 + def try_create(options = T.unsafe(nil)); end +end + +# source://connection_pool//lib/connection_pool.rb#9 +class ConnectionPool::TimeoutError < ::Timeout::Error; end + +# source://connection_pool//lib/connection_pool/version.rb#2 +ConnectionPool::VERSION = T.let(T.unsafe(nil), String) + +# source://connection_pool//lib/connection_pool/wrapper.rb#2 +class ConnectionPool::Wrapper < ::BasicObject + # @return [Wrapper] a new instance of Wrapper + # + # source://connection_pool//lib/connection_pool/wrapper.rb#5 + def initialize(options = T.unsafe(nil), &block); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#35 + def method_missing(name, *args, **kwargs, &block); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#25 + def pool_available; end + + # source://connection_pool//lib/connection_pool/wrapper.rb#17 + def pool_shutdown(&block); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#21 + def pool_size; end + + # @return [Boolean] + # + # source://connection_pool//lib/connection_pool/wrapper.rb#29 + def respond_to?(id, *args); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#13 + def with(&block); end + + # source://connection_pool//lib/connection_pool/wrapper.rb#9 + def wrapped_pool; end +end + +# source://connection_pool//lib/connection_pool/wrapper.rb#3 +ConnectionPool::Wrapper::METHODS = T.let(T.unsafe(nil), Array) + +module Process + extend ::RedisClient::PIDCache::CoreExt + extend ::ConnectionPool::ForkTracker +end diff --git a/sorbet/rbi/gems/erubi@1.13.0.rbi b/sorbet/rbi/gems/erubi@1.13.0.rbi new file mode 100644 index 0000000..16d45fa --- /dev/null +++ b/sorbet/rbi/gems/erubi@1.13.0.rbi @@ -0,0 +1,150 @@ +# 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 '::String.new'). + # +:bufvar+ :: The variable name to use for the buffer variable, as a string. + # +:chain_appends+ :: Whether to chain << calls to the buffer variable. Offers better + # performance, but can cause issues when the buffer variable is reassigned during + # template rendering (default +false+). + # +:ensure+ :: Wrap the template in a begin/ensure block restoring the previous value of bufvar. + # +:escapefunc+ :: The function to use for escaping, as a string (default: '::Erubi.h'). + # +:escape+ :: Whether to make <%= escape by default, and <%== not escape by default. + # +:escape_html+ :: Same as +:escape+, with lower priority. + # +:filename+ :: The filename for the template. + # the resulting source code. Note this may cause problems if you are wrapping the resulting + # source code in other code, because the magic comment only has an effect at the beginning of + # the file, and having the magic comment later in the file can trigger warnings. + # +:freeze_template_literals+ :: Whether to suffix all literal strings for template code with .freeze + # (default: +true+ on Ruby 2.1+, +false+ on Ruby 2.0 and older). + # Can be set to +false+ on Ruby 2.3+ when frozen string literals are enabled + # in order to improve performance. + # +:literal_prefix+ :: The prefix to output when using escaped tag delimiters (default '<%'). + # +:literal_postfix+ :: The postfix to output when using escaped tag delimiters (default '%>'). + # +:outvar+ :: Same as +:bufvar+, with lower priority. + # +:postamble+ :: The postamble for the template, by default returns the resulting source code. + # +:preamble+ :: The preamble for the template, by default initializes the buffer variable. + # +:regexp+ :: The regexp to use for scanning. + # +:src+ :: The initial value to use for the source code, an empty string by default. + # +:trim+ :: Whether to trim leading and trailing whitespace, true by default. + # + # @return [Engine] a new instance of Engine + # + # source://erubi//lib/erubi.rb#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/sorbet/rbi/gems/json@2.8.2.rbi b/sorbet/rbi/gems/json@2.8.2.rbi new file mode 100644 index 0000000..c3ee2e4 --- /dev/null +++ b/sorbet/rbi/gems/json@2.8.2.rbi @@ -0,0 +1,1901 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `json` gem. +# Please instead update this file by running `bin/tapioca gem json`. + + +# Extends any Class to include _json_creatable?_ method. +# +# source://json//lib/json/common.rb#868 +class Class < ::Module + # Returns true if this class can be used to create an instance + # from a serialised JSON string. The class has to implement a class + # method _json_create_ that expects a hash as first parameter. The hash + # should include the required data. + # + # @return [Boolean] + # + # source://json//lib/json/common.rb#873 + def json_creatable?; end +end + +# = JavaScript \Object Notation (\JSON) +# +# \JSON is a lightweight data-interchange format. +# +# A \JSON value is one of the following: +# - Double-quoted text: "foo". +# - Number: +1+, +1.0+, +2.0e2+. +# - Boolean: +true+, +false+. +# - Null: +null+. +# - \Array: an ordered list of values, enclosed by square brackets: +# ["foo", 1, 1.0, 2.0e2, true, false, null] +# +# - \Object: a collection of name/value pairs, enclosed by curly braces; +# each name is double-quoted text; +# the values may be any \JSON values: +# {"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null} +# +# A \JSON array or object may contain nested arrays, objects, and scalars +# to any depth: +# {"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]} +# [{"foo": 0, "bar": 1}, ["baz", 2]] +# +# == Using \Module \JSON +# +# To make module \JSON available in your code, begin with: +# require 'json' +# +# All examples here assume that this has been done. +# +# === Parsing \JSON +# +# You can parse a \String containing \JSON data using +# either of two methods: +# - JSON.parse(source, opts) +# - JSON.parse!(source, opts) +# +# where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# The difference between the two methods +# is that JSON.parse! omits some checks +# and may not be safe for some +source+ data; +# use it only for data from trusted sources. +# Use the safer method JSON.parse for less trusted sources. +# +# ==== Parsing \JSON Arrays +# +# When +source+ is a \JSON array, JSON.parse by default returns a Ruby \Array: +# json = '["foo", 1, 1.0, 2.0e2, true, false, null]' +# ruby = JSON.parse(json) +# ruby # => ["foo", 1, 1.0, 200.0, true, false, nil] +# ruby.class # => Array +# +# The \JSON array may contain nested arrays, objects, and scalars +# to any depth: +# json = '[{"foo": 0, "bar": 1}, ["baz", 2]]' +# JSON.parse(json) # => [{"foo"=>0, "bar"=>1}, ["baz", 2]] +# +# ==== Parsing \JSON \Objects +# +# When the source is a \JSON object, JSON.parse by default returns a Ruby \Hash: +# json = '{"a": "foo", "b": 1, "c": 1.0, "d": 2.0e2, "e": true, "f": false, "g": null}' +# ruby = JSON.parse(json) +# ruby # => {"a"=>"foo", "b"=>1, "c"=>1.0, "d"=>200.0, "e"=>true, "f"=>false, "g"=>nil} +# ruby.class # => Hash +# +# The \JSON object may contain nested arrays, objects, and scalars +# to any depth: +# json = '{"foo": {"bar": 1, "baz": 2}, "bat": [0, 1, 2]}' +# JSON.parse(json) # => {"foo"=>{"bar"=>1, "baz"=>2}, "bat"=>[0, 1, 2]} +# +# ==== Parsing \JSON Scalars +# +# When the source is a \JSON scalar (not an array or object), +# JSON.parse returns a Ruby scalar. +# +# \String: +# ruby = JSON.parse('"foo"') +# ruby # => 'foo' +# ruby.class # => String +# \Integer: +# ruby = JSON.parse('1') +# ruby # => 1 +# ruby.class # => Integer +# \Float: +# ruby = JSON.parse('1.0') +# ruby # => 1.0 +# ruby.class # => Float +# ruby = JSON.parse('2.0e2') +# ruby # => 200 +# ruby.class # => Float +# Boolean: +# ruby = JSON.parse('true') +# ruby # => true +# ruby.class # => TrueClass +# ruby = JSON.parse('false') +# ruby # => false +# ruby.class # => FalseClass +# Null: +# ruby = JSON.parse('null') +# ruby # => nil +# ruby.class # => NilClass +# +# ==== Parsing Options +# +# ====== Input Options +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth allowed; +# defaults to +100+; specify +false+ to disable depth checking. +# +# With the default, +false+: +# source = '[0, [1, [2, [3]]]]' +# ruby = JSON.parse(source) +# ruby # => [0, [1, [2, [3]]]] +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.parse(source, {max_nesting: 1}) +# Bad value: +# # Raises TypeError (wrong argument type Symbol (expected Fixnum)): +# JSON.parse(source, {max_nesting: :foo}) +# +# --- +# +# Option +allow_nan+ (boolean) specifies whether to allow +# NaN, Infinity, and MinusInfinity in +source+; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::ParserError (225: unexpected token at '[NaN]'): +# JSON.parse('[NaN]') +# # Raises JSON::ParserError (232: unexpected token at '[Infinity]'): +# JSON.parse('[Infinity]') +# # Raises JSON::ParserError (248: unexpected token at '[-Infinity]'): +# JSON.parse('[-Infinity]') +# Allow: +# source = '[NaN, Infinity, -Infinity]' +# ruby = JSON.parse(source, {allow_nan: true}) +# ruby # => [NaN, Infinity, -Infinity] +# +# ====== Output Options +# +# Option +symbolize_names+ (boolean) specifies whether returned \Hash keys +# should be Symbols; +# defaults to +false+ (use Strings). +# +# With the default, +false+: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} +# Use Symbols: +# ruby = JSON.parse(source, {symbolize_names: true}) +# ruby # => {:a=>"foo", :b=>1.0, :c=>true, :d=>false, :e=>nil} +# +# --- +# +# Option +object_class+ (\Class) specifies the Ruby class to be used +# for each \JSON object; +# defaults to \Hash. +# +# With the default, \Hash: +# source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' +# ruby = JSON.parse(source) +# ruby.class # => Hash +# Use class \OpenStruct: +# ruby = JSON.parse(source, {object_class: OpenStruct}) +# ruby # => # +# +# --- +# +# Option +array_class+ (\Class) specifies the Ruby class to be used +# for each \JSON array; +# defaults to \Array. +# +# With the default, \Array: +# source = '["foo", 1.0, true, false, null]' +# ruby = JSON.parse(source) +# ruby.class # => Array +# Use class \Set: +# ruby = JSON.parse(source, {array_class: Set}) +# ruby # => # +# +# --- +# +# Option +create_additions+ (boolean) specifies whether to use \JSON additions in parsing. +# See {\JSON Additions}[#module-JSON-label-JSON+Additions]. +# +# === Generating \JSON +# +# To generate a Ruby \String containing \JSON data, +# use method JSON.generate(source, opts), where +# - +source+ is a Ruby object. +# - +opts+ is a \Hash object containing options +# that control both input allowed and output formatting. +# +# ==== Generating \JSON from Arrays +# +# When the source is a Ruby \Array, JSON.generate returns +# a \String containing a \JSON array: +# ruby = [0, 's', :foo] +# json = JSON.generate(ruby) +# json # => '[0,"s","foo"]' +# +# The Ruby \Array array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = [0, [1, 2], {foo: 3, bar: 4}] +# json = JSON.generate(ruby) +# json # => '[0,[1,2],{"foo":3,"bar":4}]' +# +# ==== Generating \JSON from Hashes +# +# When the source is a Ruby \Hash, JSON.generate returns +# a \String containing a \JSON object: +# ruby = {foo: 0, bar: 's', baz: :bat} +# json = JSON.generate(ruby) +# json # => '{"foo":0,"bar":"s","baz":"bat"}' +# +# The Ruby \Hash array may contain nested arrays, hashes, and scalars +# to any depth: +# ruby = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} +# json = JSON.generate(ruby) +# json # => '{"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"}' +# +# ==== Generating \JSON from Other Objects +# +# When the source is neither an \Array nor a \Hash, +# the generated \JSON data depends on the class of the source. +# +# When the source is a Ruby \Integer or \Float, JSON.generate returns +# a \String containing a \JSON number: +# JSON.generate(42) # => '42' +# JSON.generate(0.42) # => '0.42' +# +# When the source is a Ruby \String, JSON.generate returns +# a \String containing a \JSON string (with double-quotes): +# JSON.generate('A string') # => '"A string"' +# +# When the source is +true+, +false+ or +nil+, JSON.generate returns +# a \String containing the corresponding \JSON token: +# JSON.generate(true) # => 'true' +# JSON.generate(false) # => 'false' +# JSON.generate(nil) # => 'null' +# +# When the source is none of the above, JSON.generate returns +# a \String containing a \JSON string representation of the source: +# JSON.generate(:foo) # => '"foo"' +# JSON.generate(Complex(0, 0)) # => '"0+0i"' +# JSON.generate(Dir.new('.')) # => '"#"' +# +# ==== Generating Options +# +# ====== Input Options +# +# Option +allow_nan+ (boolean) specifies whether +# +NaN+, +Infinity+, and -Infinity may be generated; +# defaults to +false+. +# +# With the default, +false+: +# # Raises JSON::GeneratorError (920: NaN not allowed in JSON): +# JSON.generate(JSON::NaN) +# # Raises JSON::GeneratorError (917: Infinity not allowed in JSON): +# JSON.generate(JSON::Infinity) +# # Raises JSON::GeneratorError (917: -Infinity not allowed in JSON): +# JSON.generate(JSON::MinusInfinity) +# +# Allow: +# ruby = [Float::NaN, Float::Infinity, Float::MinusInfinity] +# JSON.generate(ruby, allow_nan: true) # => '[NaN,Infinity,-Infinity]' +# +# --- +# +# Option +max_nesting+ (\Integer) specifies the maximum nesting depth +# in +obj+; defaults to +100+. +# +# With the default, +100+: +# obj = [[[[[[0]]]]]] +# JSON.generate(obj) # => '[[[[[[0]]]]]]' +# +# Too deep: +# # Raises JSON::NestingError (nesting of 2 is too deep): +# JSON.generate(obj, max_nesting: 2) +# +# ====== Escaping Options +# +# Options +script_safe+ (boolean) specifies wether '\u2028', '\u2029' +# and '/' should be escaped as to make the JSON object safe to interpolate in script +# tags. +# +# Options +ascii_only+ (boolean) specifies wether all characters outside the ASCII range +# should be escaped. +# +# ====== Output Options +# +# The default formatting options generate the most compact +# \JSON data, all on one line and with no whitespace. +# +# You can use these formatting options to generate +# \JSON data in a more open format, using whitespace. +# See also JSON.pretty_generate. +# +# - Option +array_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON array; defaults to the empty \String, ''. +# - Option +object_nl+ (\String) specifies a string (usually a newline) +# to be inserted after each \JSON object; defaults to the empty \String, ''. +# - Option +indent+ (\String) specifies the string (usually spaces) to be +# used for indentation; defaults to the empty \String, ''; +# defaults to the empty \String, ''; +# has no effect unless options +array_nl+ or +object_nl+ specify newlines. +# - Option +space+ (\String) specifies a string (usually a space) to be +# inserted after the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# - Option +space_before+ (\String) specifies a string (usually a space) to be +# inserted before the colon in each \JSON object's pair; +# defaults to the empty \String, ''. +# +# In this example, +obj+ is used first to generate the shortest +# \JSON data (no whitespace), then again with all formatting options +# specified: +# +# obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} +# json = JSON.generate(obj) +# puts 'Compact:', json +# opts = { +# array_nl: "\n", +# object_nl: "\n", +# indent: ' ', +# space_before: ' ', +# space: ' ' +# } +# puts 'Open:', JSON.generate(obj, opts) +# +# Output: +# Compact: +# {"foo":["bar","baz"],"bat":{"bam":0,"bad":1}} +# Open: +# { +# "foo" : [ +# "bar", +# "baz" +# ], +# "bat" : { +# "bam" : 0, +# "bad" : 1 +# } +# } +# +# == \JSON Additions +# +# When you "round trip" a non-\String object from Ruby to \JSON and back, +# you have a new \String, instead of the object you began with: +# ruby0 = Range.new(0, 2) +# json = JSON.generate(ruby0) +# json # => '0..2"' +# ruby1 = JSON.parse(json) +# ruby1 # => '0..2' +# ruby1.class # => String +# +# You can use \JSON _additions_ to preserve the original object. +# The addition is an extension of a ruby class, so that: +# - \JSON.generate stores more information in the \JSON string. +# - \JSON.parse, called with option +create_additions+, +# uses that information to create a proper Ruby object. +# +# This example shows a \Range being generated into \JSON +# and parsed back into Ruby, both without and with +# the addition for \Range: +# ruby = Range.new(0, 2) +# # This passage does not use the addition for Range. +# json0 = JSON.generate(ruby) +# ruby0 = JSON.parse(json0) +# # This passage uses the addition for Range. +# require 'json/add/range' +# json1 = JSON.generate(ruby) +# ruby1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <<~EOT +# Generated JSON: +# Without addition: #{json0} (#{json0.class}) +# With addition: #{json1} (#{json1.class}) +# Parsed JSON: +# Without addition: #{ruby0.inspect} (#{ruby0.class}) +# With addition: #{ruby1.inspect} (#{ruby1.class}) +# EOT +# puts display +# +# This output shows the different results: +# Generated JSON: +# Without addition: "0..2" (String) +# With addition: {"json_class":"Range","a":[0,2,false]} (String) +# Parsed JSON: +# Without addition: "0..2" (String) +# With addition: 0..2 (Range) +# +# The \JSON module includes additions for certain classes. +# You can also craft custom additions. +# See {Custom \JSON Additions}[#module-JSON-label-Custom+JSON+Additions]. +# +# === Built-in Additions +# +# The \JSON module includes additions for certain classes. +# To use an addition, +require+ its source: +# - BigDecimal: require 'json/add/bigdecimal' +# - Complex: require 'json/add/complex' +# - Date: require 'json/add/date' +# - DateTime: require 'json/add/date_time' +# - Exception: require 'json/add/exception' +# - OpenStruct: require 'json/add/ostruct' +# - Range: require 'json/add/range' +# - Rational: require 'json/add/rational' +# - Regexp: require 'json/add/regexp' +# - Set: require 'json/add/set' +# - Struct: require 'json/add/struct' +# - Symbol: require 'json/add/symbol' +# - Time: require 'json/add/time' +# +# To reduce punctuation clutter, the examples below +# show the generated \JSON via +puts+, rather than the usual +inspect+, +# +# \BigDecimal: +# require 'json/add/bigdecimal' +# ruby0 = BigDecimal(0) # 0.0 +# json = JSON.generate(ruby0) # {"json_class":"BigDecimal","b":"27:0.0"} +# ruby1 = JSON.parse(json, create_additions: true) # 0.0 +# ruby1.class # => BigDecimal +# +# \Complex: +# require 'json/add/complex' +# ruby0 = Complex(1+0i) # 1+0i +# json = JSON.generate(ruby0) # {"json_class":"Complex","r":1,"i":0} +# ruby1 = JSON.parse(json, create_additions: true) # 1+0i +# ruby1.class # Complex +# +# \Date: +# require 'json/add/date' +# ruby0 = Date.today # 2020-05-02 +# json = JSON.generate(ruby0) # {"json_class":"Date","y":2020,"m":5,"d":2,"sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 +# ruby1.class # Date +# +# \DateTime: +# require 'json/add/date_time' +# ruby0 = DateTime.now # 2020-05-02T10:38:13-05:00 +# json = JSON.generate(ruby0) # {"json_class":"DateTime","y":2020,"m":5,"d":2,"H":10,"M":38,"S":13,"of":"-5/24","sg":2299161.0} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02T10:38:13-05:00 +# ruby1.class # DateTime +# +# \Exception (and its subclasses including \RuntimeError): +# require 'json/add/exception' +# ruby0 = Exception.new('A message') # A message +# json = JSON.generate(ruby0) # {"json_class":"Exception","m":"A message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # A message +# ruby1.class # Exception +# ruby0 = RuntimeError.new('Another message') # Another message +# json = JSON.generate(ruby0) # {"json_class":"RuntimeError","m":"Another message","b":null} +# ruby1 = JSON.parse(json, create_additions: true) # Another message +# ruby1.class # RuntimeError +# +# \OpenStruct: +# require 'json/add/ostruct' +# ruby0 = OpenStruct.new(name: 'Matz', language: 'Ruby') # # +# json = JSON.generate(ruby0) # {"json_class":"OpenStruct","t":{"name":"Matz","language":"Ruby"}} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # OpenStruct +# +# \Range: +# require 'json/add/range' +# ruby0 = Range.new(0, 2) # 0..2 +# json = JSON.generate(ruby0) # {"json_class":"Range","a":[0,2,false]} +# ruby1 = JSON.parse(json, create_additions: true) # 0..2 +# ruby1.class # Range +# +# \Rational: +# require 'json/add/rational' +# ruby0 = Rational(1, 3) # 1/3 +# json = JSON.generate(ruby0) # {"json_class":"Rational","n":1,"d":3} +# ruby1 = JSON.parse(json, create_additions: true) # 1/3 +# ruby1.class # Rational +# +# \Regexp: +# require 'json/add/regexp' +# ruby0 = Regexp.new('foo') # (?-mix:foo) +# json = JSON.generate(ruby0) # {"json_class":"Regexp","o":0,"s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # (?-mix:foo) +# ruby1.class # Regexp +# +# \Set: +# require 'json/add/set' +# ruby0 = Set.new([0, 1, 2]) # # +# json = JSON.generate(ruby0) # {"json_class":"Set","a":[0,1,2]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Set +# +# \Struct: +# require 'json/add/struct' +# Customer = Struct.new(:name, :address) # Customer +# ruby0 = Customer.new("Dave", "123 Main") # # +# json = JSON.generate(ruby0) # {"json_class":"Customer","v":["Dave","123 Main"]} +# ruby1 = JSON.parse(json, create_additions: true) # # +# ruby1.class # Customer +# +# \Symbol: +# require 'json/add/symbol' +# ruby0 = :foo # foo +# json = JSON.generate(ruby0) # {"json_class":"Symbol","s":"foo"} +# ruby1 = JSON.parse(json, create_additions: true) # foo +# ruby1.class # Symbol +# +# \Time: +# require 'json/add/time' +# ruby0 = Time.now # 2020-05-02 11:28:26 -0500 +# json = JSON.generate(ruby0) # {"json_class":"Time","s":1588436906,"n":840560000} +# ruby1 = JSON.parse(json, create_additions: true) # 2020-05-02 11:28:26 -0500 +# ruby1.class # Time +# +# +# === Custom \JSON Additions +# +# In addition to the \JSON additions provided, +# you can craft \JSON additions of your own, +# either for Ruby built-in classes or for user-defined classes. +# +# Here's a user-defined class +Foo+: +# class Foo +# attr_accessor :bar, :baz +# def initialize(bar, baz) +# self.bar = bar +# self.baz = baz +# end +# end +# +# Here's the \JSON addition for it: +# # Extend class Foo with JSON addition. +# class Foo +# # Serialize Foo object with its class name and arguments +# def to_json(*args) +# { +# JSON.create_id => self.class.name, +# 'a' => [ bar, baz ] +# }.to_json(*args) +# end +# # Deserialize JSON string by constructing new Foo object with arguments. +# def self.json_create(object) +# new(*object['a']) +# end +# end +# +# Demonstration: +# require 'json' +# # This Foo object has no custom addition. +# foo0 = Foo.new(0, 1) +# json0 = JSON.generate(foo0) +# obj0 = JSON.parse(json0) +# # Lood the custom addition. +# require_relative 'foo_addition' +# # This foo has the custom addition. +# foo1 = Foo.new(0, 1) +# json1 = JSON.generate(foo1) +# obj1 = JSON.parse(json1, create_additions: true) +# # Make a nice display. +# display = <<~EOT +# Generated JSON: +# Without custom addition: #{json0} (#{json0.class}) +# With custom addition: #{json1} (#{json1.class}) +# Parsed JSON: +# Without custom addition: #{obj0.inspect} (#{obj0.class}) +# With custom addition: #{obj1.inspect} (#{obj1.class}) +# EOT +# puts display +# +# Output: +# +# Generated JSON: +# Without custom addition: "#" (String) +# With custom addition: {"json_class":"Foo","a":[0,1]} (String) +# Parsed JSON: +# Without custom addition: "#" (String) +# With custom addition: # (Foo) +# +# source://json//lib/json/version.rb#3 +module JSON + private + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//lib/json/common.rb#772 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//lib/json/common.rb#313 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#313 + def fast_unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also JSON.fast_generate, JSON.pretty_generate. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//lib/json/common.rb#285 + def generate(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # If you must use it, use JSON.unsafe_load instead to make it clear. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#691 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # source://json//lib/json/common.rb#234 + def load_file(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//lib/json/common.rb#245 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # source://json//lib/json/common.rb#816 + def merge_dump_options(opts, strict: T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//lib/json/common.rb#204 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//lib/json/common.rb#219 + def parse!(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//lib/json/common.rb#358 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#358 + def pretty_unparse(obj, opts = T.unsafe(nil)); end + + # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ + # + # source://json//lib/json/common.rb#717 + def recurse_proc(result, &proc); end + + # source://json//lib/json/common.rb#691 + def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + # + # source://json//lib/json/common.rb#285 + def unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.unsafe_load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.unsafe_load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.unsafe_load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.unsafe_load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.unsafe_load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.unsafe_load + # ruby = JSON.unsafe_load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#537 + def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + class << self + # :call-seq: + # JSON[object] -> new_array or new_string + # + # If +object+ is a \String, + # calls JSON.parse with +object+ and +opts+ (see method #parse): + # json = '[0, 1, null]' + # JSON[json]# => [0, 1, nil] + # + # Otherwise, calls JSON.generate with +object+ and +opts+ (see method #generate): + # ruby = [0, 1, nil] + # JSON[ruby] # => '[0,1,null]' + # + # source://json//lib/json/common.rb#23 + def [](object, opts = T.unsafe(nil)); end + + # source://json//lib/json/common.rb#80 + def create_fast_state; end + + # Returns the current create identifier. + # See also JSON.create_id=. + # + # source://json//lib/json/common.rb#115 + def create_id; end + + # Sets create identifier, which is used to decide if the _json_create_ + # hook of a class should be called; initial value is +json_class+: + # JSON.create_id # => 'json_class' + # + # source://json//lib/json/common.rb#109 + def create_id=(new_value); end + + # source://json//lib/json/common.rb#90 + def create_pretty_state; end + + # Return the constant located at _path_. The format of _path_ has to be + # either ::A::B::C or A::B::C. In any case, A has to be located at the top + # level (absolute namespace path?). If there doesn't exist a constant at + # the given path, an ArgumentError is raised. + # + # source://json//lib/json/common.rb#50 + def deep_const_get(path); end + + # :call-seq: + # JSON.dump(obj, io = nil, limit = nil) + # + # Dumps +obj+ as a \JSON string, i.e. calls generate on the object and returns the result. + # + # The default options can be changed via method JSON.dump_default_options. + # + # - Argument +io+, if given, should respond to method +write+; + # the \JSON \String is written to +io+, and +io+ is returned. + # If +io+ is not given, the \JSON \String is returned. + # - Argument +limit+, if given, is passed to JSON.generate as option +max_nesting+. + # + # --- + # + # When argument +io+ is not given, returns the \JSON \String generated from +obj+: + # obj = {foo: [0, 1], bar: {baz: 2, bat: 3}, bam: :bad} + # json = JSON.dump(obj) + # json # => "{\"foo\":[0,1],\"bar\":{\"baz\":2,\"bat\":3},\"bam\":\"bad\"}" + # + # When argument +io+ is given, writes the \JSON \String to +io+ and returns +io+: + # path = 't.json' + # File.open(path, 'w') do |file| + # JSON.dump(obj, file) + # end # => # + # puts File.read(path) + # Output: + # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} + # + # source://json//lib/json/common.rb#772 + def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end + + # Sets or returns the default options for the JSON.dump method. + # Initially: + # opts = JSON.dump_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true} + # + # source://json//lib/json/common.rb#738 + def dump_default_options; end + + # Sets or returns the default options for the JSON.dump method. + # Initially: + # opts = JSON.dump_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true} + # + # source://json//lib/json/common.rb#738 + def dump_default_options=(_arg0); end + + # :call-seq: + # JSON.fast_generate(obj, opts) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # By default, generates \JSON data without checking + # for circular references in +obj+ (option +max_nesting+ set to +false+, disabled). + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises SystemStackError (stack level too deep): + # JSON.fast_generate(a) + # + # source://json//lib/json/common.rb#313 + def fast_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#313 + def fast_unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.generate(obj, opts = nil) -> new_string + # + # Returns a \String containing the generated \JSON data. + # + # See also JSON.fast_generate, JSON.pretty_generate. + # + # Argument +obj+ is the Ruby object to be converted to \JSON. + # + # Argument +opts+, if given, contains a \Hash of options for the generation. + # See {Generating Options}[#module-JSON-label-Generating+Options]. + # + # --- + # + # When +obj+ is an \Array, returns a \String containing a \JSON array: + # obj = ["foo", 1.0, true, false, nil] + # json = JSON.generate(obj) + # json # => '["foo",1.0,true,false,null]' + # + # When +obj+ is a \Hash, returns a \String containing a \JSON object: + # obj = {foo: 0, bar: 's', baz: :bat} + # json = JSON.generate(obj) + # json # => '{"foo":0,"bar":"s","baz":"bat"}' + # + # For examples of generating from other Ruby objects, see + # {Generating \JSON from Other Objects}[#module-JSON-label-Generating+JSON+from+Other+Objects]. + # + # --- + # + # Raises an exception if any formatting option is not a \String. + # + # Raises an exception if +obj+ contains circular references: + # a = []; b = []; a.push(b); b.push(a) + # # Raises JSON::NestingError (nesting of 100 is too deep): + # JSON.generate(a) + # + # source://json//lib/json/common.rb#285 + def generate(obj, opts = T.unsafe(nil)); end + + # Returns the JSON generator module that is used by JSON. + # + # source://json//lib/json/common.rb#100 + def generator; end + + # Set the module _generator_ to be used by JSON. + # + # source://json//lib/json/common.rb#57 + def generator=(generator); end + + # Encodes string using String.encode. + # + # source://json//lib/json/common.rb#812 + def iconv(to, from, string); end + + # :call-seq: + # JSON.load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # If you must use it, use JSON.unsafe_load instead to make it clear. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.load + # ruby = JSON.load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#691 + def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or returns default options for the JSON.load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#402 + def load_default_options; end + + # Sets or returns default options for the JSON.load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#402 + def load_default_options=(_arg0); end + + # :call-seq: + # JSON.load_file(path, opts={}) -> object + # + # Calls: + # parse(File.read(path), opts) + # + # See method #parse. + # + # source://json//lib/json/common.rb#234 + def load_file(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.load_file!(path, opts = {}) + # + # Calls: + # JSON.parse!(File.read(path, opts)) + # + # See method #parse! + # + # source://json//lib/json/common.rb#245 + def load_file!(filespec, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse(source, opts) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # Argument +source+ contains the \String to be parsed. + # + # Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # + # --- + # + # When +source+ is a \JSON array, returns a Ruby \Array: + # source = '["foo", 1.0, true, false, null]' + # ruby = JSON.parse(source) + # ruby # => ["foo", 1.0, true, false, nil] + # ruby.class # => Array + # + # When +source+ is a \JSON object, returns a Ruby \Hash: + # source = '{"a": "foo", "b": 1.0, "c": true, "d": false, "e": null}' + # ruby = JSON.parse(source) + # ruby # => {"a"=>"foo", "b"=>1.0, "c"=>true, "d"=>false, "e"=>nil} + # ruby.class # => Hash + # + # For examples of parsing for all \JSON data types, see + # {Parsing \JSON}[#module-JSON-label-Parsing+JSON]. + # + # Parses nested JSON objects: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # ruby = JSON.parse(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # Raises an exception if +source+ is not valid JSON: + # # Raises JSON::ParserError (783: unexpected token at ''): + # JSON.parse('') + # + # source://json//lib/json/common.rb#204 + def parse(source, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.parse!(source, opts) -> object + # + # Calls + # parse(source, opts) + # with +source+ and possibly modified +opts+. + # + # Differences from JSON.parse: + # - Option +max_nesting+, if not provided, defaults to +false+, + # which disables checking for nesting depth. + # - Option +allow_nan+, if not provided, defaults to +true+. + # + # source://json//lib/json/common.rb#219 + def parse!(source, opts = T.unsafe(nil)); end + + # Returns the JSON parser class that is used by JSON. + # + # source://json//lib/json/common.rb#37 + def parser; end + + # Set the JSON parser class _parser_ to be used by JSON. + # + # source://json//lib/json/common.rb#40 + def parser=(parser); end + + # :call-seq: + # JSON.pretty_generate(obj, opts = nil) -> new_string + # + # Arguments +obj+ and +opts+ here are the same as + # arguments +obj+ and +opts+ in JSON.generate. + # + # Default options are: + # { + # indent: ' ', # Two spaces + # space: ' ', # One space + # array_nl: "\n", # Newline + # object_nl: "\n" # Newline + # } + # + # Example: + # obj = {foo: [:bar, :baz], bat: {bam: 0, bad: 1}} + # json = JSON.pretty_generate(obj) + # puts json + # Output: + # { + # "foo": [ + # "bar", + # "baz" + # ], + # "bat": { + # "bam": 0, + # "bad": 1 + # } + # } + # + # source://json//lib/json/common.rb#358 + def pretty_generate(obj, opts = T.unsafe(nil)); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and later delete them. + # + # source://json//lib/json/common.rb#358 + def pretty_unparse(obj, opts = T.unsafe(nil)); end + + # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ + # + # source://json//lib/json/common.rb#717 + def recurse_proc(result, &proc); end + + # source://json//lib/json/common.rb#691 + def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or Returns the JSON generator state class that is used by JSON. + # + # source://json//lib/json/common.rb#103 + def state; end + + # Sets or Returns the JSON generator state class that is used by JSON. + # + # source://json//lib/json/common.rb#103 + def state=(_arg0); end + + # :stopdoc: + # I want to deprecate these later, so I'll first be silent about them, and + # later delete them. + # + # source://json//lib/json/common.rb#285 + def unparse(obj, opts = T.unsafe(nil)); end + + # :call-seq: + # JSON.unsafe_load(source, proc = nil, options = {}) -> object + # + # Returns the Ruby objects created by parsing the given +source+. + # + # - Argument +source+ must be, or be convertible to, a \String: + # - If +source+ responds to instance method +to_str+, + # source.to_str becomes the source. + # - If +source+ responds to instance method +to_io+, + # source.to_io.read becomes the source. + # - If +source+ responds to instance method +read+, + # source.read becomes the source. + # - If both of the following are true, source becomes the \String 'null': + # - Option +allow_blank+ specifies a truthy value. + # - The source, as defined above, is +nil+ or the empty \String ''. + # - Otherwise, +source+ remains the source. + # - Argument +proc+, if given, must be a \Proc that accepts one argument. + # It will be called recursively with each result (depth-first order). + # See details below. + # BEWARE: This method is meant to serialise data from trusted user input, + # like from your own database server or clients under your control, it could + # be dangerous to allow untrusted users to pass JSON sources into it. + # - Argument +opts+, if given, contains a \Hash of options for the parsing. + # See {Parsing Options}[#module-JSON-label-Parsing+Options]. + # The default options can be changed via method JSON.unsafe_load_default_options=. + # + # --- + # + # When no +proc+ is given, modifies +source+ as above and returns the result of + # parse(source, opts); see #parse. + # + # Source for following examples: + # source = <<~JSON + # { + # "name": "Dave", + # "age" :40, + # "hats": [ + # "Cattleman's", + # "Panama", + # "Tophat" + # ] + # } + # JSON + # + # Load a \String: + # ruby = JSON.unsafe_load(source) + # ruby # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load an \IO object: + # require 'stringio' + # object = JSON.unsafe_load(StringIO.new(source)) + # object # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # Load a \File object: + # path = 't.json' + # File.write(path, source) + # File.open(path) do |file| + # JSON.unsafe_load(file) + # end # => {"name"=>"Dave", "age"=>40, "hats"=>["Cattleman's", "Panama", "Tophat"]} + # + # --- + # + # When +proc+ is given: + # - Modifies +source+ as above. + # - Gets the +result+ from calling parse(source, opts). + # - Recursively calls proc(result). + # - Returns the final result. + # + # Example: + # require 'json' + # + # # Some classes for the example. + # class Base + # def initialize(attributes) + # @attributes = attributes + # end + # end + # class User < Base; end + # class Account < Base; end + # class Admin < Base; end + # # The JSON source. + # json = <<-EOF + # { + # "users": [ + # {"type": "User", "username": "jane", "email": "jane@example.com"}, + # {"type": "User", "username": "john", "email": "john@example.com"} + # ], + # "accounts": [ + # {"account": {"type": "Account", "paid": true, "account_id": "1234"}}, + # {"account": {"type": "Account", "paid": false, "account_id": "1235"}} + # ], + # "admins": {"type": "Admin", "password": "0wn3d"} + # } + # EOF + # # Deserializer method. + # def deserialize_obj(obj, safe_types = %w(User Account Admin)) + # type = obj.is_a?(Hash) && obj["type"] + # safe_types.include?(type) ? Object.const_get(type).new(obj) : obj + # end + # # Call to JSON.unsafe_load + # ruby = JSON.unsafe_load(json, proc {|obj| + # case obj + # when Hash + # obj.each {|k, v| obj[k] = deserialize_obj v } + # when Array + # obj.map! {|v| deserialize_obj v } + # end + # }) + # pp ruby + # Output: + # {"users"=> + # [#"User", "username"=>"jane", "email"=>"jane@example.com"}>, + # #"User", "username"=>"john", "email"=>"john@example.com"}>], + # "accounts"=> + # [{"account"=> + # #"Account", "paid"=>true, "account_id"=>"1234"}>}, + # {"account"=> + # #"Account", "paid"=>false, "account_id"=>"1235"}>}], + # "admins"=> + # #"Admin", "password"=>"0wn3d"}>} + # + # source://json//lib/json/common.rb#537 + def unsafe_load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end + + # Sets or returns default options for the JSON.unsafe_load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#388 + def unsafe_load_default_options; end + + # Sets or returns default options for the JSON.unsafe_load method. + # Initially: + # opts = JSON.load_default_options + # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} + # + # source://json//lib/json/common.rb#388 + def unsafe_load_default_options=(_arg0); end + + private + + # source://json//lib/json/common.rb#816 + def merge_dump_options(opts, strict: T.unsafe(nil)); end + end +end + +# source://json//lib/json/ext/generator/state.rb#6 +class JSON::Ext::Generator::State + # call-seq: new(opts = {}) + # + # Instantiates a new State object, configured by _opts_. + # + # _opts_ can have the following keys: + # + # * *indent*: a string used to indent levels (default: ''), + # * *space*: a string that is put after, a : or , delimiter (default: ''), + # * *space_before*: a string that is put before a : pair delimiter (default: ''), + # * *object_nl*: a string that is put at the end of a JSON object (default: ''), + # * *array_nl*: a string that is put at the end of a JSON array (default: ''), + # * *allow_nan*: true if NaN, Infinity, and -Infinity should be + # generated, otherwise an exception is thrown, if these values are + # encountered. This options defaults to false. + # * *ascii_only*: true if only ASCII characters should be generated. This + # option defaults to false. + # * *buffer_initial_length*: sets the initial length of the generator's + # internal buffer. + # + # @return [State] a new instance of State + # + # source://json//lib/json/ext/generator/state.rb#25 + def initialize(opts = T.unsafe(nil)); end + + # call-seq: [](name) + # + # Returns the value returned by method +name+. + # + # source://json//lib/json/ext/generator/state.rb#83 + def [](name); end + + # call-seq: []=(name, value) + # + # Sets the attribute name to value. + # + # source://json//lib/json/ext/generator/state.rb#95 + def []=(name, value); end + + # call-seq: configure(opts) + # + # Configure this State instance with the Hash _opts_, and return + # itself. + # + # source://json//lib/json/ext/generator/state.rb#35 + def configure(opts); end + + # call-seq: configure(opts) + # + # Configure this State instance with the Hash _opts_, and return + # itself. + # + # source://json//lib/json/ext/generator/state.rb#35 + def merge(opts); end + + # call-seq: to_h + # + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + # + # source://json//lib/json/ext/generator/state.rb#54 + def to_h; end + + # call-seq: to_h + # + # Returns the configuration instance variables as a hash, that can be + # passed to the configure method. + # + # source://json//lib/json/ext/generator/state.rb#54 + def to_hash; end +end + +# source://json//lib/json/generic_object.rb#9 +class JSON::GenericObject < ::OpenStruct + # source://json//lib/json/generic_object.rb#67 + def as_json(*_arg0); end + + # source://json//lib/json/generic_object.rb#51 + def to_hash; end + + # source://json//lib/json/generic_object.rb#71 + def to_json(*a); end + + # source://json//lib/json/generic_object.rb#63 + def |(other); end + + class << self + # source://json//lib/json/generic_object.rb#45 + def dump(obj, *args); end + + # source://json//lib/json/generic_object.rb#25 + def from_hash(object); end + + # Sets the attribute json_creatable + # + # @param value the value to set the attribute json_creatable to. + # + # source://json//lib/json/generic_object.rb#17 + def json_creatable=(_arg0); end + + # @return [Boolean] + # + # source://json//lib/json/generic_object.rb#13 + def json_creatable?; end + + # source://json//lib/json/generic_object.rb#19 + def json_create(data); end + + # source://json//lib/json/generic_object.rb#40 + def load(source, proc = T.unsafe(nil), opts = T.unsafe(nil)); end + end +end + +# The base exception for JSON errors. +# +# source://json//lib/json/common.rb#126 +class JSON::JSONError < ::StandardError + class << self + # source://json//lib/json/common.rb#127 + def wrap(exception); end + end +end + +# source://json//lib/json/common.rb#8 +JSON::NOT_SET = T.let(T.unsafe(nil), Object) + +# source://json//lib/json/common.rb#43 +JSON::Parser = JSON::Ext::Parser + +# source://json//lib/json/common.rb#72 +JSON::State = JSON::Ext::Generator::State + +# For backwards compatibility +# +# source://json//lib/json/common.rb#148 +JSON::UnparserError = JSON::GeneratorError + +# source://json//lib/json/common.rb#826 +module Kernel + private + + # If _object_ is string-like, parse the string and return the parsed result as + # a Ruby data structure. Otherwise, generate a JSON text from the Ruby data + # structure object and return it. + # + # The _opts_ argument is passed through to generate/parse respectively. See + # generate and parse for their documentation. + # + # source://json//lib/json/common.rb#853 + def JSON(object, *args); end + + # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in + # one line. + # + # source://json//lib/json/common.rb#831 + def j(*objs); end + + # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with + # indentation and over many lines. + # + # source://json//lib/json/common.rb#840 + def jj(*objs); end +end diff --git a/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi new file mode 100644 index 0000000..5f91e74 --- /dev/null +++ b/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `language_server-protocol` gem. +# Please instead update this file by running `bin/tapioca gem language_server-protocol`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/minitest@5.25.1.rbi b/sorbet/rbi/gems/minitest@5.25.1.rbi new file mode 100644 index 0000000..bc0cba2 --- /dev/null +++ b/sorbet/rbi/gems/minitest@5.25.1.rbi @@ -0,0 +1,1546 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `minitest` gem. +# Please instead update this file by running `bin/tapioca gem minitest`. + + +# :include: README.rdoc +# +# source://minitest//lib/minitest/parallel.rb#1 +module Minitest + class << self + # Internal run method. Responsible for telling all Runnable + # sub-classes to run. + # + # source://minitest//lib/minitest.rb#322 + def __run(reporter, options); end + + # A simple hook allowing you to run a block of code after everything + # is done running. Eg: + # + # Minitest.after_run { p $debugging_info } + # + # source://minitest//lib/minitest.rb#96 + def after_run(&block); end + + # source://minitest//lib/minitest.rb#19 + def allow_fork; end + + # source://minitest//lib/minitest.rb#19 + def allow_fork=(_arg0); end + + # Registers Minitest to run at process exit + # + # source://minitest//lib/minitest.rb#69 + def autorun; end + + # source://minitest//lib/minitest.rb#19 + def backtrace_filter; end + + # source://minitest//lib/minitest.rb#19 + def backtrace_filter=(_arg0); end + + # source://minitest//lib/minitest.rb#18 + def cattr_accessor(name); end + + # source://minitest//lib/minitest.rb#1215 + def clock_time; end + + # source://minitest//lib/minitest.rb#302 + def empty_run!(options); end + + # source://minitest//lib/minitest.rb#19 + def extensions; end + + # source://minitest//lib/minitest.rb#19 + def extensions=(_arg0); end + + # source://minitest//lib/minitest.rb#335 + def filter_backtrace(bt); end + + # source://minitest//lib/minitest.rb#19 + def info_signal; end + + # source://minitest//lib/minitest.rb#19 + def info_signal=(_arg0); end + + # source://minitest//lib/minitest.rb#124 + def init_plugins(options); end + + # source://minitest//lib/minitest.rb#108 + def load_plugins; end + + # source://minitest//lib/minitest.rb#19 + def parallel_executor; end + + # source://minitest//lib/minitest.rb#19 + def parallel_executor=(_arg0); end + + # source://minitest//lib/minitest.rb#142 + def process_args(args = T.unsafe(nil)); end + + # Register a plugin to be used. Does NOT require / load it. + # + # source://minitest//lib/minitest.rb#103 + def register_plugin(name_or_mod); end + + # source://minitest//lib/minitest.rb#19 + def reporter; end + + # source://minitest//lib/minitest.rb#19 + def reporter=(_arg0); end + + # This is the top-level run method. Everything starts from here. It + # tells each Runnable sub-class to run, and each of those are + # responsible for doing whatever they do. + # + # The overall structure of a run looks like this: + # + # Minitest.autorun + # Minitest.run(args) + # Minitest.load_plugins + # Minitest.process_args + # Minitest.init_plugins + # Minitest.__run(reporter, options) + # Runnable.runnables.each + # runnable_klass.run(reporter, options) + # self.runnable_methods.each + # self.run_one_method(self, runnable_method, reporter) + # Minitest.run_one_method(klass, runnable_method) + # klass.new(runnable_method).run + # + # source://minitest//lib/minitest.rb#268 + def run(args = T.unsafe(nil)); end + + # source://minitest//lib/minitest.rb#1206 + def run_one_method(klass, method_name); end + + # source://minitest//lib/minitest.rb#19 + def seed; end + + # source://minitest//lib/minitest.rb#19 + def seed=(_arg0); end + end +end + +# Defines the API for Reporters. Subclass this and override whatever +# you want. Go nuts. +# +# source://minitest//lib/minitest.rb#686 +class Minitest::AbstractReporter + # @return [AbstractReporter] a new instance of AbstractReporter + # + # source://minitest//lib/minitest.rb#688 + def initialize; end + + # Did this run pass? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#723 + def passed?; end + + # About to start running a test. This allows a reporter to show + # that it is starting or that we are in the middle of a test run. + # + # source://minitest//lib/minitest.rb#702 + def prerecord(klass, name); end + + # Output and record the result of the test. Call + # {result#result_code}[rdoc-ref:Runnable#result_code] to get the + # result character string. Stores the result of the run if the run + # did not pass. + # + # source://minitest//lib/minitest.rb#711 + def record(result); end + + # Outputs the summary of the run. + # + # source://minitest//lib/minitest.rb#717 + def report; end + + # Starts reporting on the run. + # + # source://minitest//lib/minitest.rb#695 + def start; end + + # source://minitest//lib/minitest.rb#727 + def synchronize(&block); end +end + +# Represents run failures. +# +# source://minitest//lib/minitest.rb#1019 +class Minitest::Assertion < ::Exception + # source://minitest//lib/minitest.rb#1022 + def error; end + + # Where was this run before an assertion was raised? + # + # source://minitest//lib/minitest.rb#1029 + def location; end + + # source://minitest//lib/minitest.rb#1037 + def result_code; end + + # source://minitest//lib/minitest.rb#1041 + def result_label; end +end + +# source://minitest//lib/minitest.rb#1020 +Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) + +# Minitest Assertions. All assertion methods accept a +msg+ which is +# printed if the assertion fails. +# +# Protocol: Nearly everything here boils up to +assert+, which +# expects to be able to increment an instance accessor named +# +assertions+. This is not provided by Assertions and must be +# provided by the thing including Assertions. See Minitest::Runnable +# for an example. +# +# source://minitest//lib/minitest/assertions.rb#16 +module Minitest::Assertions + # source://minitest//lib/minitest/assertions.rb#181 + def _synchronize; end + + # source://minitest//lib/minitest/assertions.rb#194 + def _where; end + + # Fails unless +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#171 + def assert(test, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#188 + def assert_empty(obj, msg = T.unsafe(nil)); end + + # Fails unless exp == act printing the difference between + # the two, if possible. + # + # If there is no visible difference but the assertion fails, you + # should suspect that your #== is buggy, or your inspect output is + # missing crucial details. For nicer structural diffing, set + # Minitest::Test.make_my_diffs_pretty! + # + # For floats use assert_in_delta. + # + # See also: Minitest::Assertions.diff + # + # source://minitest//lib/minitest/assertions.rb#214 + def assert_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ + # of each other. + # + # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 + # + # source://minitest//lib/minitest/assertions.rb#235 + def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails unless +exp+ and +act+ have a relative + # error less than +epsilon+. + # + # source://minitest//lib/minitest/assertions.rb#247 + def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails unless +collection+ includes +obj+. + # + # source://minitest//lib/minitest/assertions.rb#254 + def assert_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is an instance of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#265 + def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is a kind of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#276 + def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails unless +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#287 + def assert_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails unless +obj+ is nil + # + # source://minitest//lib/minitest/assertions.rb#299 + def assert_nil(obj, msg = T.unsafe(nil)); end + + # For testing with binary operators. Eg: + # + # assert_operator 5, :<=, 4 + # + # source://minitest//lib/minitest/assertions.rb#309 + def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if stdout or stderr do not output the expected results. + # Pass in nil if you don't care about that streams output. Pass in + # "" if you require it to be silent. Pass in a regexp if you want + # to pattern match. + # + # assert_output(/hey/) { method_with_output } + # + # NOTE: this uses #capture_io, not #capture_subprocess_io. + # + # See also: #assert_silent + # + # source://minitest//lib/minitest/assertions.rb#327 + def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end + + # Fails unless +path+ exists. + # + # source://minitest//lib/minitest/assertions.rb#351 + def assert_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # assert_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # # fail "length mismatch (given 3, expected 1)" + # assert_pattern { [1,2,3] => [Integer] } + # + # The bare => pattern will raise a NoMatchingPatternError on failure, which would + # normally be counted as a test error. This assertion rescues NoMatchingPatternError and + # generates a test failure. Any other exception will be raised as normal and generate a test + # error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#370 + def assert_pattern; end + + # For testing with predicates. Eg: + # + # assert_predicate str, :empty? + # + # This is really meant for specs and is front-ended by assert_operator: + # + # str.must_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#391 + def assert_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails unless the block raises one of +exp+. Returns the + # exception matched so you can check the message, attributes, etc. + # + # +exp+ takes an optional message on the end to help explain + # failures and defaults to StandardError if no exception class is + # passed. Eg: + # + # assert_raises(CustomError) { method_with_custom_error } + # + # With custom error message: + # + # assert_raises(CustomError, 'This should have raised CustomError') { method_with_custom_error } + # + # Using the returned object: + # + # error = assert_raises(CustomError) do + # raise CustomError, 'This is really bad' + # end + # + # assert_equal 'This is really bad', error.message + # + # source://minitest//lib/minitest/assertions.rb#418 + def assert_raises(*exp); end + + # Fails unless +obj+ responds to +meth+. + # include_all defaults to false to match Object#respond_to? + # + # source://minitest//lib/minitest/assertions.rb#450 + def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails unless +exp+ and +act+ are #equal? + # + # source://minitest//lib/minitest/assertions.rb#460 + def assert_same(exp, act, msg = T.unsafe(nil)); end + + # +send_ary+ is a receiver, message and arguments. + # + # Fails unless the call returns a true value + # + # source://minitest//lib/minitest/assertions.rb#473 + def assert_send(send_ary, m = T.unsafe(nil)); end + + # Fails if the block outputs anything to stderr or stdout. + # + # See also: #assert_output + # + # source://minitest//lib/minitest/assertions.rb#488 + def assert_silent; end + + # Fails unless the block throws +sym+ + # + # source://minitest//lib/minitest/assertions.rb#497 + def assert_throws(sym, msg = T.unsafe(nil)); end + + # Captures $stdout and $stderr into strings: + # + # out, err = capture_io do + # puts "Some info" + # warn "You did a bad thing" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: For efficiency, this method uses StringIO and does not + # capture IO for subprocesses. Use #capture_subprocess_io for + # that. + # + # source://minitest//lib/minitest/assertions.rb#538 + def capture_io; end + + # Captures $stdout and $stderr into strings, using Tempfile to + # ensure that subprocess IO is captured as well. + # + # out, err = capture_subprocess_io do + # system "echo Some info" + # system "echo You did a bad thing 1>&2" + # end + # + # assert_match %r%info%, out + # assert_match %r%bad%, err + # + # NOTE: This method is approximately 10x slower than #capture_io so + # only use it when you need to test the output of a subprocess. + # + # source://minitest//lib/minitest/assertions.rb#571 + def capture_subprocess_io; end + + # Returns a diff between +exp+ and +act+. If there is no known + # diff command or if it doesn't make sense to diff the output + # (single line, short output), then it simply returns a basic + # comparison between the two. + # + # See +things_to_diff+ for more info. + # + # source://minitest//lib/minitest/assertions.rb#57 + def diff(exp, act); end + + # Returns details for exception +e+ + # + # source://minitest//lib/minitest/assertions.rb#603 + def exception_details(e, msg); end + + # Fails after a given date (in the local time zone). This allows + # you to put time-bombs in your tests if you need to keep + # something around until a later date lest you forget about it. + # + # source://minitest//lib/minitest/assertions.rb#619 + def fail_after(y, m, d, msg); end + + # Fails with +msg+. + # + # source://minitest//lib/minitest/assertions.rb#626 + def flunk(msg = T.unsafe(nil)); end + + # Returns a proc that will output +msg+ along with the default message. + # + # source://minitest//lib/minitest/assertions.rb#634 + def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end + + # This returns a human-readable version of +obj+. By default + # #inspect is called. You can override this to use #pretty_inspect + # if you want. + # + # See Minitest::Test.make_my_diffs_pretty! + # + # source://minitest//lib/minitest/assertions.rb#127 + def mu_pp(obj); end + + # This returns a diff-able more human-readable version of +obj+. + # This differs from the regular mu_pp because it expands escaped + # newlines and makes hex-values (like object_ids) generic. This + # uses mu_pp to do the first pass and then cleans it up. + # + # source://minitest//lib/minitest/assertions.rb#145 + def mu_pp_for_diff(obj); end + + # used for counting assertions + # + # source://minitest//lib/minitest/assertions.rb#645 + def pass(_msg = T.unsafe(nil)); end + + # Fails if +test+ is truthy. + # + # source://minitest//lib/minitest/assertions.rb#652 + def refute(test, msg = T.unsafe(nil)); end + + # Fails if +obj+ is empty. + # + # source://minitest//lib/minitest/assertions.rb#660 + def refute_empty(obj, msg = T.unsafe(nil)); end + + # Fails if exp == act. + # + # For floats use refute_in_delta. + # + # source://minitest//lib/minitest/assertions.rb#671 + def refute_equal(exp, act, msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. + # + # refute_in_delta Math::PI, (22.0 / 7.0) + # + # source://minitest//lib/minitest/assertions.rb#683 + def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end + + # For comparing Floats. Fails if +exp+ and +act+ have a relative error + # less than +epsilon+. + # + # source://minitest//lib/minitest/assertions.rb#695 + def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +collection+ includes +obj+. + # + # source://minitest//lib/minitest/assertions.rb#702 + def refute_includes(collection, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is an instance of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#713 + def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is a kind of +cls+. + # + # source://minitest//lib/minitest/assertions.rb#723 + def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end + + # Fails if +matcher+ =~ +obj+. + # + # source://minitest//lib/minitest/assertions.rb#731 + def refute_match(matcher, obj, msg = T.unsafe(nil)); end + + # Fails if +obj+ is nil. + # + # source://minitest//lib/minitest/assertions.rb#741 + def refute_nil(obj, msg = T.unsafe(nil)); end + + # Fails if +o1+ is not +op+ +o2+. Eg: + # + # refute_operator 1, :>, 2 #=> pass + # refute_operator 1, :<, 2 #=> fail + # + # source://minitest//lib/minitest/assertions.rb#776 + def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end + + # Fails if +path+ exists. + # + # source://minitest//lib/minitest/assertions.rb#785 + def refute_path_exists(path, msg = T.unsafe(nil)); end + + # For testing with pattern matching (only supported with Ruby 3.0 and later) + # + # # pass + # refute_pattern { [1,2,3] => [String] } + # + # # fail "NoMatchingPatternError expected, but nothing was raised." + # refute_pattern { [1,2,3] => [Integer, Integer, Integer] } + # + # This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any + # other exceptions will be raised as normal and generate a test error. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest/assertions.rb#758 + def refute_pattern; end + + # For testing with predicates. + # + # refute_predicate str, :empty? + # + # This is really meant for specs and is front-ended by refute_operator: + # + # str.wont_be :empty? + # + # source://minitest//lib/minitest/assertions.rb#799 + def refute_predicate(o1, op, msg = T.unsafe(nil)); end + + # Fails if +obj+ responds to the message +meth+. + # include_all defaults to false to match Object#respond_to? + # + # source://minitest//lib/minitest/assertions.rb#808 + def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end + + # Fails if +exp+ is the same (by object identity) as +act+. + # + # source://minitest//lib/minitest/assertions.rb#817 + def refute_same(exp, act, msg = T.unsafe(nil)); end + + # Skips the current run. If run in verbose-mode, the skipped run + # gets listed at the end of the run but doesn't cause a failure + # exit code. + # + # @raise [Minitest::Skip] + # + # source://minitest//lib/minitest/assertions.rb#830 + def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end + + # Skips the current run until a given date (in the local time + # zone). This allows you to put some fixes on hold until a later + # date, but still holds you accountable and prevents you from + # forgetting it. + # + # source://minitest//lib/minitest/assertions.rb#842 + def skip_until(y, m, d, msg); end + + # Was this testcase skipped? Meant for #teardown. + # + # @return [Boolean] + # + # source://minitest//lib/minitest/assertions.rb#851 + def skipped?; end + + # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. + # + # Criterion: + # + # 1. Strings include newlines or escaped newlines, but not both. + # 2. or: String lengths are > 30 characters. + # 3. or: Strings are equal to each other (but maybe different encodings?). + # 4. and: we found a diff executable. + # + # source://minitest//lib/minitest/assertions.rb#102 + def things_to_diff(exp, act); end + + class << self + # Returns the diff command to use in #diff. Tries to intelligently + # figure out what diff to use. + # + # source://minitest//lib/minitest/assertions.rb#27 + def diff; end + + # Set the diff command to use in #diff. + # + # source://minitest//lib/minitest/assertions.rb#45 + def diff=(o); end + end +end + +# source://minitest//lib/minitest/assertions.rb#199 +Minitest::Assertions::E = T.let(T.unsafe(nil), String) + +# source://minitest//lib/minitest/assertions.rb#17 +Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) + +# The standard backtrace filter for minitest. +# +# See Minitest.backtrace_filter=. +# +# source://minitest//lib/minitest.rb#1174 +class Minitest::BacktraceFilter + # @return [BacktraceFilter] a new instance of BacktraceFilter + # + # source://minitest//lib/minitest.rb#1183 + def initialize(regexp = T.unsafe(nil)); end + + # Filter +bt+ to something useful. Returns the whole thing if + # $DEBUG (ruby) or $MT_DEBUG (env). + # + # source://minitest//lib/minitest.rb#1191 + def filter(bt); end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # source://minitest//lib/minitest.rb#1181 + def regexp; end + + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. + # + # source://minitest//lib/minitest.rb#1181 + def regexp=(_arg0); end +end + +# source://minitest//lib/minitest.rb#1176 +Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) + +# Dispatch to multiple reporters as one. +# +# source://minitest//lib/minitest.rb#968 +class Minitest::CompositeReporter < ::Minitest::AbstractReporter + # @return [CompositeReporter] a new instance of CompositeReporter + # + # source://minitest//lib/minitest.rb#974 + def initialize(*reporters); end + + # Add another reporter to the mix. + # + # source://minitest//lib/minitest.rb#986 + def <<(reporter); end + + # source://minitest//lib/minitest.rb#979 + def io; end + + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#990 + def passed?; end + + # source://minitest//lib/minitest.rb#998 + def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#1005 + def record(result); end + + # source://minitest//lib/minitest.rb#1011 + def report; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#972 + def reporters; end + + # The list of reporters to dispatch to. + # + # source://minitest//lib/minitest.rb#972 + def reporters=(_arg0); end + + # source://minitest//lib/minitest.rb#994 + def start; end +end + +# Compresses backtraces. +# +# source://minitest//lib/minitest/compress.rb#5 +module Minitest::Compress + # Takes a backtrace (array of strings) and compresses repeating + # cycles in it to make it more readable. + # + # source://minitest//lib/minitest/compress.rb#11 + def compress(orig); end +end + +# Provides a simple set of guards that you can use in your tests +# to skip execution if it is not applicable. These methods are +# mixed into Test as both instance and class methods so you +# can use them inside or outside of the test methods. +# +# def test_something_for_mri +# skip "bug 1234" if jruby? +# # ... +# end +# +# if windows? then +# # ... lots of test methods ... +# end +# +# source://minitest//lib/minitest.rb#1118 +module Minitest::Guard + # Is this running on jruby? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1123 + def jruby?(platform = T.unsafe(nil)); end + + # Is this running on maglev? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1130 + def maglev?(platform = T.unsafe(nil)); end + + # Is this running on mri? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1140 + def mri?(platform = T.unsafe(nil)); end + + # Is this running on macOS? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1147 + def osx?(platform = T.unsafe(nil)); end + + # Is this running on rubinius? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1154 + def rubinius?(platform = T.unsafe(nil)); end + + # Is this running on windows? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#1164 + def windows?(platform = T.unsafe(nil)); end +end + +# source://minitest//lib/minitest/parallel.rb#2 +module Minitest::Parallel; end + +# The engine used to run multiple tests in parallel. +# +# source://minitest//lib/minitest/parallel.rb#7 +class Minitest::Parallel::Executor + # Create a parallel test executor of with +size+ workers. + # + # @return [Executor] a new instance of Executor + # + # source://minitest//lib/minitest/parallel.rb#17 + def initialize(size); end + + # Add a job to the queue + # + # source://minitest//lib/minitest/parallel.rb#43 + def <<(work); end + + # Shuts down the pool of workers by signalling them to quit and + # waiting for them all to finish what they're currently working + # on. + # + # source://minitest//lib/minitest/parallel.rb#50 + def shutdown; end + + # The size of the pool of workers. + # + # source://minitest//lib/minitest/parallel.rb#12 + def size; end + + # Start the executor + # + # source://minitest//lib/minitest/parallel.rb#26 + def start; end +end + +# source://minitest//lib/minitest/parallel.rb#56 +module Minitest::Parallel::Test + # source://minitest//lib/minitest/parallel.rb#57 + def _synchronize; end +end + +# source://minitest//lib/minitest/parallel.rb#59 +module Minitest::Parallel::Test::ClassMethods + # source://minitest//lib/minitest/parallel.rb#60 + def run_one_method(klass, method_name, reporter); end + + # source://minitest//lib/minitest/parallel.rb#64 + def test_order; end +end + +# A very simple reporter that prints the "dots" during the run. +# +# This is added to the top-level CompositeReporter at the start of +# the run. If you want to change the output of minitest via a +# plugin, pull this out of the composite and replace it with your +# own. +# +# source://minitest//lib/minitest.rb#758 +class Minitest::ProgressReporter < ::Minitest::Reporter + # source://minitest//lib/minitest.rb#759 + def prerecord(klass, name); end + + # source://minitest//lib/minitest.rb#766 + def record(result); end +end + +# Shared code for anything that can get passed to a Reporter. See +# Minitest::Test & Minitest::Result. +# +# source://minitest//lib/minitest.rb#580 +module Minitest::Reportable + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#602 + def class_name; end + + # Did this run error? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#623 + def error?; end + + # The location identifier of this test. Depends on a method + # existing called class_name. + # + # source://minitest//lib/minitest.rb#597 + def location; end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#587 + def passed?; end + + # Returns ".", "F", or "E" based on the result of the run. + # + # source://minitest//lib/minitest.rb#609 + def result_code; end + + # Was this run skipped? + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#616 + def skipped?; end +end + +# source://minitest//lib/minitest.rb#591 +Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) + +# source://minitest//lib/minitest.rb#734 +class Minitest::Reporter < ::Minitest::AbstractReporter + # @return [Reporter] a new instance of Reporter + # + # source://minitest//lib/minitest.rb#743 + def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end + + # The IO used to report. + # + # source://minitest//lib/minitest.rb#736 + def io; end + + # The IO used to report. + # + # source://minitest//lib/minitest.rb#736 + def io=(_arg0); end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#741 + def options; end + + # Command-line options for this run. + # + # source://minitest//lib/minitest.rb#741 + def options=(_arg0); end +end + +# This represents a test result in a clean way that can be +# marshalled over a wire. Tests can do anything they want to the +# test instance and can create conditions that cause Marshal.dump to +# blow up. By using Result.from(a_test) you can be reasonably sure +# that the test result can be marshalled. +# +# source://minitest//lib/minitest.rb#635 +class Minitest::Result < ::Minitest::Runnable + include ::Minitest::Reportable + + # source://minitest//lib/minitest.rb#669 + def class_name; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#644 + def klass; end + + # The class name of the test result. + # + # source://minitest//lib/minitest.rb#644 + def klass=(_arg0); end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#649 + def source_location; end + + # The location of the test method. + # + # source://minitest//lib/minitest.rb#649 + def source_location=(_arg0); end + + # source://minitest//lib/minitest.rb#673 + def to_s; end + + class << self + # Create a new test result from a Runnable instance. + # + # source://minitest//lib/minitest.rb#654 + def from(runnable); end + end +end + +# re-open +# +# source://minitest//lib/minitest.rb#348 +class Minitest::Runnable + # @return [Runnable] a new instance of Runnable + # + # source://minitest//lib/minitest.rb#511 + def initialize(name); end + + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#352 + def assertions; end + + # Number of assertions executed in this run. + # + # source://minitest//lib/minitest.rb#352 + def assertions=(_arg0); end + + # source://minitest//lib/minitest.rb#507 + def failure; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#357 + def failures; end + + # An assertion raised during the run, if any. + # + # source://minitest//lib/minitest.rb#357 + def failures=(_arg0); end + + # source://minitest//lib/minitest.rb#493 + def marshal_dump; end + + # source://minitest//lib/minitest.rb#503 + def marshal_load(ary); end + + # Metadata you attach to the test results that get sent to the reporter. + # + # Lazily initializes to a hash, to keep memory down. + # + # NOTE: this data *must* be plain (read: marshal-able) data! + # Hashes! Arrays! Strings! + # + # source://minitest//lib/minitest.rb#526 + def metadata; end + + # Sets metadata, mainly used for +Result.from+. + # + # source://minitest//lib/minitest.rb#533 + def metadata=(_arg0); end + + # Returns true if metadata exists. + # + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#538 + def metadata?; end + + # Name of the run. + # + # source://minitest//lib/minitest.rb#375 + def name; end + + # Set the name of the run. + # + # source://minitest//lib/minitest.rb#382 + def name=(o); end + + # Did this run pass? + # + # Note: skipped runs are not considered passing, but they don't + # cause the process to exit non-zero. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#555 + def passed?; end + + # Returns a single character string to print based on the result + # of the run. One of ".", "F", + # "E" or "S". + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#564 + def result_code; end + + # Runs a single method. Needs to return self. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#545 + def run; end + + # Was this run skipped? See #passed? for more information. + # + # @raise [NotImplementedError] + # @return [Boolean] + # + # source://minitest//lib/minitest.rb#571 + def skipped?; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#362 + def time; end + + # The time it took to run. + # + # source://minitest//lib/minitest.rb#362 + def time=(_arg0); end + + # source://minitest//lib/minitest.rb#364 + def time_it; end + + class << self + # source://minitest//lib/minitest.rb#1225 + def inherited(klass); end + + # Returns all instance methods matching the pattern +re+. + # + # source://minitest//lib/minitest.rb#389 + def methods_matching(re); end + + # source://minitest//lib/minitest.rb#463 + def on_signal(name, action); end + + # source://minitest//lib/minitest.rb#393 + def reset; end + + # Responsible for running all runnable methods in a given class, + # each in its own instance. Each instance is passed to the + # reporter to record. + # + # source://minitest//lib/minitest.rb#404 + def run(reporter, options = T.unsafe(nil)); end + + # Runs a single method and has the reporter record the result. + # This was considered internal API but is factored out of run so + # that subclasses can specialize the running of an individual + # test. See Minitest::ParallelTest::ClassMethods for an example. + # + # source://minitest//lib/minitest.rb#444 + def run_one_method(klass, method_name, reporter); end + + # Each subclass of Runnable is responsible for overriding this + # method to return all runnable methods. See #methods_matching. + # + # @raise [NotImplementedError] + # + # source://minitest//lib/minitest.rb#480 + def runnable_methods; end + + # Returns all subclasses of Runnable. + # + # source://minitest//lib/minitest.rb#487 + def runnables; end + + # Defines the order to run tests (:random by default). Override + # this or use a convenience method to change it for your tests. + # + # source://minitest//lib/minitest.rb#453 + def test_order; end + + # source://minitest//lib/minitest.rb#457 + def with_info_handler(reporter, &block); end + end +end + +# source://minitest//lib/minitest.rb#461 +Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) + +# Assertion raised when skipping a run. +# +# source://minitest//lib/minitest.rb#1049 +class Minitest::Skip < ::Minitest::Assertion + # source://minitest//lib/minitest.rb#1050 + def result_label; end +end + +# A reporter that gathers statistics about a test run. Does not do +# any IO because meant to be used as a parent class for a reporter +# that does. +# +# If you want to create an entirely different type of output (eg, +# CI, HTML, etc), this is the place to start. +# +# Example: +# +# class JenkinsCIReporter < StatisticsReporter +# def report +# super # Needed to calculate some statistics +# +# print " {}) +# +# source://parser//lib/parser/context.rb#18 +class Parser::Context + # @return [Context] a new instance of Context + # + # source://parser//lib/parser/context.rb#29 + def initialize; end + + # source://parser//lib/parser/context.rb#43 + def in_argdef; end + + # source://parser//lib/parser/context.rb#43 + def in_argdef=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_block; end + + # source://parser//lib/parser/context.rb#43 + def in_block=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_class; end + + # source://parser//lib/parser/context.rb#43 + def in_class=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_def; end + + # source://parser//lib/parser/context.rb#43 + def in_def=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_defined; end + + # source://parser//lib/parser/context.rb#43 + def in_defined=(_arg0); end + + # @return [Boolean] + # + # source://parser//lib/parser/context.rb#45 + def in_dynamic_block?; end + + # source://parser//lib/parser/context.rb#43 + def in_kwarg; end + + # source://parser//lib/parser/context.rb#43 + def in_kwarg=(_arg0); end + + # source://parser//lib/parser/context.rb#43 + def in_lambda; end + + # source://parser//lib/parser/context.rb#43 + def in_lambda=(_arg0); end + + # source://parser//lib/parser/context.rb#33 + def reset; end +end + +# source://parser//lib/parser/context.rb#19 +Parser::Context::FLAGS = T.let(T.unsafe(nil), Array) + +# Stack that holds names of current arguments, +# i.e. while parsing +# def m1(a = (def m2(b = def m3(c = 1); end); end)); end +# ^ +# stack is [:a, :b, :c] +# +# Emulates `p->cur_arg` in MRI's parse.y +# +# @api private +# +# source://parser//lib/parser/current_arg_stack.rb#14 +class Parser::CurrentArgStack + # @api private + # @return [CurrentArgStack] a new instance of CurrentArgStack + # + # source://parser//lib/parser/current_arg_stack.rb#17 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/current_arg_stack.rb#22 + def empty?; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#34 + def pop; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#26 + def push(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#38 + def reset; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#30 + def set(value); end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#15 + def stack; end + + # @api private + # + # source://parser//lib/parser/current_arg_stack.rb#42 + def top; end +end + +# @api private +# +# source://parser//lib/parser/deprecation.rb#7 +module Parser::Deprecation + # @api private + # + # source://parser//lib/parser/deprecation.rb#9 + def warn_of_deprecation; end + + # @api private + # + # source://parser//lib/parser/deprecation.rb#8 + def warned_of_deprecation=(_arg0); end +end + +# @api public +# +# source://parser//lib/parser/diagnostic.rb#31 +class Parser::Diagnostic + # @api public + # @param level [Symbol] + # @param reason [Symbol] + # @param arguments [Hash] + # @param location [Parser::Source::Range] + # @param highlights [Array] + # @return [Diagnostic] a new instance of Diagnostic + # + # source://parser//lib/parser/diagnostic.rb#49 + def initialize(level, reason, arguments, location, highlights = T.unsafe(nil)); end + + # @api public + # @return [Symbol] extended arguments that describe the error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def arguments; end + + # Supplementary error-related source ranges. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#40 + def highlights; end + + # @api public + # @return [Symbol] diagnostic level + # @see LEVELS + # + # source://parser//lib/parser/diagnostic.rb#39 + def level; end + + # Main error-related source range. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#40 + def location; end + + # @api public + # @return [String] the rendered message. + # + # source://parser//lib/parser/diagnostic.rb#69 + def message; end + + # @api public + # @return [Symbol] reason for error + # @see Parser::MESSAGES + # + # source://parser//lib/parser/diagnostic.rb#39 + def reason; end + + # Renders the diagnostic message as a clang-like diagnostic. + # + # @api public + # @example + # diagnostic.render # => + # # [ + # # "(fragment:0):1:5: error: unexpected token $end", + # # "foo +", + # # " ^" + # # ] + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#86 + def render; end + + private + + # If necessary, shrink a `Range` so as to include only the first line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#142 + def first_line_only(range); end + + # If necessary, shrink a `Range` so as to include only the last line. + # + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/diagnostic.rb#155 + def last_line_only(range); end + + # Renders one source line in clang diagnostic style, with highlights. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/diagnostic.rb#110 + def render_line(range, ellipsis = T.unsafe(nil), range_end = T.unsafe(nil)); end +end + +# source://parser//lib/parser/diagnostic/engine.rb#36 +class Parser::Diagnostic::Engine + # source://parser//lib/parser/diagnostic/engine.rb#45 + def initialize(consumer = T.unsafe(nil)); end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal; end + + # source://parser//lib/parser/diagnostic/engine.rb#39 + def all_errors_are_fatal=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer; end + + # source://parser//lib/parser/diagnostic/engine.rb#37 + def consumer=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings; end + + # source://parser//lib/parser/diagnostic/engine.rb#40 + def ignore_warnings=(_arg0); end + + # source://parser//lib/parser/diagnostic/engine.rb#64 + def process(diagnostic); end + + protected + + # source://parser//lib/parser/diagnostic/engine.rb#86 + def ignore?(diagnostic); end + + # source://parser//lib/parser/diagnostic/engine.rb#97 + def raise?(diagnostic); end +end + +# Collection of the available diagnostic levels. +# +# @api public +# @return [Array] +# +# source://parser//lib/parser/diagnostic.rb#37 +Parser::Diagnostic::LEVELS = T.let(T.unsafe(nil), Array) + +# line 3 "lib/parser/lexer.rl" +# +# === BEFORE YOU START === +# +# Read the Ruby Hacking Guide chapter 11, available in English at +# http://whitequark.org/blog/2013/04/01/ruby-hacking-guide-ch-11-finite-state-lexer/ +# +# Remember two things about Ragel scanners: +# +# 1) Longest match wins. +# +# 2) If two matches have the same length, the first +# in source code wins. +# +# General rules of making Ragel and Bison happy: +# +# * `p` (position) and `@te` contain the index of the character +# they're pointing to ("current"), plus one. `@ts` contains the index +# of the corresponding character. The code for extracting matched token is: +# +# @source_buffer.slice(@ts...@te) +# +# * If your input is `foooooooobar` and the rule is: +# +# 'f' 'o'+ +# +# the result will be: +# +# foooooooobar +# ^ ts=0 ^ p=te=9 +# +# * A Ragel lexer action should not emit more than one token, unless +# you know what you are doing. +# +# * All Ragel commands (fnext, fgoto, ...) end with a semicolon. +# +# * If an action emits the token and transitions to another state, use +# these Ragel commands: +# +# emit($whatever) +# fnext $next_state; fbreak; +# +# If you perform `fgoto` in an action which does not emit a token nor +# rewinds the stream pointer, the parser's side-effectful, +# context-sensitive lookahead actions will break in a hard to detect +# and debug way. +# +# * If an action does not emit a token: +# +# fgoto $next_state; +# +# * If an action features lookbehind, i.e. matches characters with the +# intent of passing them to another action: +# +# p = @ts - 1 +# fgoto $next_state; +# +# or, if the lookbehind consists of a single character: +# +# fhold; fgoto $next_state; +# +# * Ragel merges actions. So, if you have `e_lparen = '(' %act` and +# `c_lparen = '('` and a lexer action `e_lparen | c_lparen`, the result +# _will_ invoke the action `act`. +# +# e_something stands for "something with **e**mbedded action". +# +# * EOF is explicit and is matched by `c_eof`. If you want to introspect +# the state of the lexer, add this rule to the state: +# +# c_eof => do_eof; +# +# * If you proceed past EOF, the lexer will complain: +# +# NoMethodError: undefined method `ord' for nil:NilClass +# +# source://parser//lib/parser/lexer-F1.rb#82 +class Parser::Lexer + # @return [Lexer] a new instance of Lexer + # + # source://parser//lib/parser/lexer-F1.rb#8250 + def initialize(version); end + + # Return next token: [type, value]. + # + # source://parser//lib/parser/lexer-F1.rb#8410 + def advance; end + + # Returns the value of attribute cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg; end + + # Sets the attribute cmdarg + # + # @param value the value to set the attribute cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cmdarg=(_arg0); end + + # Returns the value of attribute cmdarg_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cmdarg_stack; end + + # Returns the value of attribute command_start. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start; end + + # Sets the attribute command_start + # + # @param value the value to set the attribute command_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def command_start=(_arg0); end + + # Returns the value of attribute comments. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments; end + + # Sets the attribute comments + # + # @param value the value to set the attribute comments to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def comments=(_arg0); end + + # Returns the value of attribute cond. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond; end + + # Sets the attribute cond + # + # @param value the value to set the attribute cond to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def cond=(_arg0); end + + # Returns the value of attribute cond_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def cond_stack; end + + # Returns the value of attribute context. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context; end + + # Sets the attribute context + # + # @param value the value to set the attribute context to. + # + # source://parser//lib/parser/lexer-F1.rb#8244 + def context=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8405 + def dedent_level; end + + # Returns the value of attribute diagnostics. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics; end + + # Sets the attribute diagnostics + # + # @param value the value to set the attribute diagnostics to. + # + # source://parser//lib/parser/lexer-F1.rb#8240 + def diagnostics=(_arg0); end + + # source://parser//lib/parser/lexer-F1.rb#8358 + def encoding; end + + # Returns the value of attribute force_utf32. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32; end + + # Sets the attribute force_utf32 + # + # @param value the value to set the attribute force_utf32 to. + # + # source://parser//lib/parser/lexer-F1.rb#8242 + def force_utf32=(_arg0); end + + # Returns the value of attribute lambda_stack. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def lambda_stack; end + + # Returns the value of attribute paren_nest. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def paren_nest; end + + # source://parser//lib/parser/lexer-F1.rb#8392 + def pop_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8401 + def pop_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8387 + def push_cmdarg; end + + # source://parser//lib/parser/lexer-F1.rb#8396 + def push_cond; end + + # source://parser//lib/parser/lexer-F1.rb#8281 + def reset(reset_state = T.unsafe(nil)); end + + # % + # + # source://parser//lib/parser/lexer-F1.rb#8238 + def source_buffer; end + + # source://parser//lib/parser/lexer-F1.rb#8334 + def source_buffer=(source_buffer); end + + # source://parser//lib/parser/lexer-F1.rb#8379 + def state; end + + # source://parser//lib/parser/lexer-F1.rb#8383 + def state=(state); end + + # Returns the value of attribute static_env. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env; end + + # Sets the attribute static_env + # + # @param value the value to set the attribute static_env to. + # + # source://parser//lib/parser/lexer-F1.rb#8241 + def static_env=(_arg0); end + + # Returns the value of attribute tokens. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens; end + + # Sets the attribute tokens + # + # @param value the value to set the attribute tokens to. + # + # source://parser//lib/parser/lexer-F1.rb#8246 + def tokens=(_arg0); end + + # Returns the value of attribute version. + # + # source://parser//lib/parser/lexer-F1.rb#8248 + def version; end + + protected + + # source://parser//lib/parser/lexer-F1.rb#14692 + def arg_or_cmdarg(cmd_state); end + + # source://parser//lib/parser/lexer-F1.rb#14754 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-F1.rb#14716 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14722 + def e_lbrace; end + + # source://parser//lib/parser/lexer-F1.rb#14666 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14775 + def emit_class_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14803 + def emit_colon_with_digits(p, tm, diag_msg); end + + # source://parser//lib/parser/lexer-F1.rb#14700 + def emit_comment(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14712 + def emit_comment_from_range(p, pe); end + + # source://parser//lib/parser/lexer-F1.rb#14682 + def emit_do(do_block = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14765 + def emit_global_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14783 + def emit_instance_var(ts = T.unsafe(nil), te = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14791 + def emit_rbrace_rparen_rbrack; end + + # source://parser//lib/parser/lexer-F1.rb#14813 + def emit_singleton_class; end + + # source://parser//lib/parser/lexer-F1.rb#14676 + def emit_table(table, s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14731 + def numeric_literal_int; end + + # source://parser//lib/parser/lexer-F1.rb#14750 + def on_newline(p); end + + # source://parser//lib/parser/lexer-F1.rb#14662 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-F1.rb#14653 + def stack_pop; end + + # source://parser//lib/parser/lexer-F1.rb#14658 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-F1.rb#14649 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_expr_arg. + # + # source://parser//lib/parser/lexer-F1.rb#8186 + def lex_en_expr_arg; end + + # Sets the attribute lex_en_expr_arg + # + # @param value the value to set the attribute lex_en_expr_arg to. + # + # source://parser//lib/parser/lexer-F1.rb#8186 + def lex_en_expr_arg=(_arg0); end + + # Returns the value of attribute lex_en_expr_beg. + # + # source://parser//lib/parser/lexer-F1.rb#8202 + def lex_en_expr_beg; end + + # Sets the attribute lex_en_expr_beg + # + # @param value the value to set the attribute lex_en_expr_beg to. + # + # source://parser//lib/parser/lexer-F1.rb#8202 + def lex_en_expr_beg=(_arg0); end + + # Returns the value of attribute lex_en_expr_cmdarg. + # + # source://parser//lib/parser/lexer-F1.rb#8190 + def lex_en_expr_cmdarg; end + + # Sets the attribute lex_en_expr_cmdarg + # + # @param value the value to set the attribute lex_en_expr_cmdarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8190 + def lex_en_expr_cmdarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8182 + def lex_en_expr_dot; end + + # Sets the attribute lex_en_expr_dot + # + # @param value the value to set the attribute lex_en_expr_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8182 + def lex_en_expr_dot=(_arg0); end + + # Returns the value of attribute lex_en_expr_end. + # + # source://parser//lib/parser/lexer-F1.rb#8214 + def lex_en_expr_end; end + + # Sets the attribute lex_en_expr_end + # + # @param value the value to set the attribute lex_en_expr_end to. + # + # source://parser//lib/parser/lexer-F1.rb#8214 + def lex_en_expr_end=(_arg0); end + + # Returns the value of attribute lex_en_expr_endarg. + # + # source://parser//lib/parser/lexer-F1.rb#8194 + def lex_en_expr_endarg; end + + # Sets the attribute lex_en_expr_endarg + # + # @param value the value to set the attribute lex_en_expr_endarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8194 + def lex_en_expr_endarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_endfn. + # + # source://parser//lib/parser/lexer-F1.rb#8178 + def lex_en_expr_endfn; end + + # Sets the attribute lex_en_expr_endfn + # + # @param value the value to set the attribute lex_en_expr_endfn to. + # + # source://parser//lib/parser/lexer-F1.rb#8178 + def lex_en_expr_endfn=(_arg0); end + + # Returns the value of attribute lex_en_expr_fname. + # + # source://parser//lib/parser/lexer-F1.rb#8174 + def lex_en_expr_fname; end + + # Sets the attribute lex_en_expr_fname + # + # @param value the value to set the attribute lex_en_expr_fname to. + # + # source://parser//lib/parser/lexer-F1.rb#8174 + def lex_en_expr_fname=(_arg0); end + + # Returns the value of attribute lex_en_expr_labelarg. + # + # source://parser//lib/parser/lexer-F1.rb#8206 + def lex_en_expr_labelarg; end + + # Sets the attribute lex_en_expr_labelarg + # + # @param value the value to set the attribute lex_en_expr_labelarg to. + # + # source://parser//lib/parser/lexer-F1.rb#8206 + def lex_en_expr_labelarg=(_arg0); end + + # Returns the value of attribute lex_en_expr_mid. + # + # source://parser//lib/parser/lexer-F1.rb#8198 + def lex_en_expr_mid; end + + # Sets the attribute lex_en_expr_mid + # + # @param value the value to set the attribute lex_en_expr_mid to. + # + # source://parser//lib/parser/lexer-F1.rb#8198 + def lex_en_expr_mid=(_arg0); end + + # Returns the value of attribute lex_en_expr_value. + # + # source://parser//lib/parser/lexer-F1.rb#8210 + def lex_en_expr_value; end + + # Sets the attribute lex_en_expr_value + # + # @param value the value to set the attribute lex_en_expr_value to. + # + # source://parser//lib/parser/lexer-F1.rb#8210 + def lex_en_expr_value=(_arg0); end + + # Returns the value of attribute lex_en_expr_variable. + # + # source://parser//lib/parser/lexer-F1.rb#8170 + def lex_en_expr_variable; end + + # Sets the attribute lex_en_expr_variable + # + # @param value the value to set the attribute lex_en_expr_variable to. + # + # source://parser//lib/parser/lexer-F1.rb#8170 + def lex_en_expr_variable=(_arg0); end + + # Returns the value of attribute lex_en_inside_string. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string; end + + # Sets the attribute lex_en_inside_string + # + # @param value the value to set the attribute lex_en_inside_string to. + # + # source://parser//lib/parser/lexer-F1.rb#8230 + def lex_en_inside_string=(_arg0); end + + # Returns the value of attribute lex_en_leading_dot. + # + # source://parser//lib/parser/lexer-F1.rb#8218 + def lex_en_leading_dot; end + + # Sets the attribute lex_en_leading_dot + # + # @param value the value to set the attribute lex_en_leading_dot to. + # + # source://parser//lib/parser/lexer-F1.rb#8218 + def lex_en_leading_dot=(_arg0); end + + # Returns the value of attribute lex_en_line_begin. + # + # source://parser//lib/parser/lexer-F1.rb#8226 + def lex_en_line_begin; end + + # Sets the attribute lex_en_line_begin + # + # @param value the value to set the attribute lex_en_line_begin to. + # + # source://parser//lib/parser/lexer-F1.rb#8226 + def lex_en_line_begin=(_arg0); end + + # Returns the value of attribute lex_en_line_comment. + # + # source://parser//lib/parser/lexer-F1.rb#8222 + def lex_en_line_comment; end + + # Sets the attribute lex_en_line_comment + # + # @param value the value to set the attribute lex_en_line_comment to. + # + # source://parser//lib/parser/lexer-F1.rb#8222 + def lex_en_line_comment=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-F1.rb#8165 + def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-F1.rb#8165 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-F1.rb#8161 + def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-F1.rb#8161 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-F1.rb#8064 + def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-F1.rb#8064 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7967 + def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7967 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-F1.rb#461 + def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-F1.rb#461 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-F1.rb#558 + def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-F1.rb#558 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-F1.rb#364 + def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-F1.rb#364 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7870 + def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7870 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-F1.rb#7722 + def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-F1.rb#7722 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-F1.rb#87 + def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-F1.rb#87 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-F1.rb#7574 + def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-F1.rb#7574 + def _lex_trans_targs=(_arg0); end + end +end + +# source://parser//lib/parser/lexer/dedenter.rb#5 +class Parser::Lexer::Dedenter + # source://parser//lib/parser/lexer/dedenter.rb#9 + def initialize(dedent_level); end + + # source://parser//lib/parser/lexer/dedenter.rb#36 + def dedent(string); end + + # source://parser//lib/parser/lexer/dedenter.rb#83 + def interrupt; end +end + +# source://parser//lib/parser/lexer/dedenter.rb#7 +Parser::Lexer::Dedenter::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer-F1.rb#14860 +Parser::Lexer::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14846 +Parser::Lexer::KEYWORDS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14853 +Parser::Lexer::KEYWORDS_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#8362 +Parser::Lexer::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#6 +class Parser::Lexer::Literal + # source://parser//lib/parser/lexer/literal.rb#42 + def initialize(lexer, str_type, delimiter, str_s, heredoc_e = T.unsafe(nil), indent = T.unsafe(nil), dedent_body = T.unsafe(nil), label_allowed = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#116 + def backslash_delimited?; end + + # source://parser//lib/parser/lexer/literal.rb#39 + def dedent_level; end + + # source://parser//lib/parser/lexer/literal.rb#191 + def end_interp_brace_and_try_closing; end + + # source://parser//lib/parser/lexer/literal.rb#218 + def extend_content; end + + # source://parser//lib/parser/lexer/literal.rb#222 + def extend_space(ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#197 + def extend_string(string, ts, te); end + + # source://parser//lib/parser/lexer/literal.rb#204 + def flush_string; end + + # source://parser//lib/parser/lexer/literal.rb#104 + def heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#39 + def heredoc_e; end + + # source://parser//lib/parser/lexer/literal.rb#168 + def infer_indent_level(line); end + + # source://parser//lib/parser/lexer/literal.rb#91 + def interpolate?; end + + # source://parser//lib/parser/lexer/literal.rb#124 + def munge_escape?(character); end + + # source://parser//lib/parser/lexer/literal.rb#134 + def nest_and_try_closing(delimiter, ts, te, lookahead = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer/literal.rb#108 + def plain_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#100 + def regexp?; end + + # source://parser//lib/parser/lexer/literal.rb#40 + def saved_herebody_s; end + + # source://parser//lib/parser/lexer/literal.rb#40 + def saved_herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer/literal.rb#112 + def squiggly_heredoc?; end + + # source://parser//lib/parser/lexer/literal.rb#187 + def start_interp_brace; end + + # source://parser//lib/parser/lexer/literal.rb#39 + def str_s; end + + # source://parser//lib/parser/lexer/literal.rb#232 + def supports_line_continuation_via_slash?; end + + # source://parser//lib/parser/lexer/literal.rb#120 + def type; end + + # source://parser//lib/parser/lexer/literal.rb#95 + def words?; end + + protected + + # source://parser//lib/parser/lexer/literal.rb#263 + def clear_buffer; end + + # source://parser//lib/parser/lexer/literal.rb#259 + def coerce_encoding(string); end + + # source://parser//lib/parser/lexer/literal.rb#238 + def delimiter?(delimiter); end + + # source://parser//lib/parser/lexer/literal.rb#279 + def emit(token, type, s, e); end + + # source://parser//lib/parser/lexer/literal.rb#274 + def emit_start_tok; end +end + +# source://parser//lib/parser/lexer/literal.rb#7 +Parser::Lexer::Literal::DELIMITERS = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/literal.rb#8 +Parser::Lexer::Literal::SPACE = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer/literal.rb#9 +Parser::Lexer::Literal::TAB = T.let(T.unsafe(nil), Integer) + +# source://parser//lib/parser/lexer/literal.rb#11 +Parser::Lexer::Literal::TYPES = T.let(T.unsafe(nil), Hash) + +# Mapping of strings to parser tokens. +# +# source://parser//lib/parser/lexer-F1.rb#14820 +Parser::Lexer::PUNCTUATION = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-F1.rb#14840 +Parser::Lexer::PUNCTUATION_BEGIN = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer/stack_state.rb#5 +class Parser::Lexer::StackState + # source://parser//lib/parser/lexer/stack_state.rb#6 + def initialize(name); end + + # source://parser//lib/parser/lexer/stack_state.rb#34 + def active?; end + + # source://parser//lib/parser/lexer/stack_state.rb#11 + def clear; end + + # source://parser//lib/parser/lexer/stack_state.rb#38 + def empty?; end + + # source://parser//lib/parser/lexer/stack_state.rb#42 + def inspect; end + + # source://parser//lib/parser/lexer/stack_state.rb#29 + def lexpop; end + + # source://parser//lib/parser/lexer/stack_state.rb#22 + def pop; end + + # source://parser//lib/parser/lexer/stack_state.rb#15 + def push(bit); end + + # source://parser//lib/parser/lexer/stack_state.rb#42 + def to_s; end +end + +# line 3 "lib/parser/lexer-strings.rl" +# +# source://parser//lib/parser/lexer-strings.rb#6 +class Parser::LexerStrings + # @return [LexerStrings] a new instance of LexerStrings + # + # source://parser//lib/parser/lexer-strings.rb#3300 + def initialize(lexer, version); end + + # source://parser//lib/parser/lexer-strings.rb#3339 + def advance(p); end + + # source://parser//lib/parser/lexer-strings.rb#5069 + def close_interp_on_current_literal(p); end + + # source://parser//lib/parser/lexer-strings.rb#5043 + def continue_lexing(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5092 + def dedent_level; end + + # Returns the value of attribute herebody_s. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s; end + + # Sets the attribute herebody_s + # + # @param value the value to set the attribute herebody_s to. + # + # source://parser//lib/parser/lexer-strings.rb#3295 + def herebody_s=(_arg0); end + + # source://parser//lib/parser/lexer-strings.rb#5047 + def literal; end + + # source://parser//lib/parser/lexer-strings.rb#5015 + def next_state_for_literal(literal); end + + # This hook is triggered by "main" lexer on every newline character + # + # source://parser//lib/parser/lexer-strings.rb#5100 + def on_newline(p); end + + # source://parser//lib/parser/lexer-strings.rb#5051 + def pop_literal; end + + # === LITERAL STACK === + # + # source://parser//lib/parser/lexer-strings.rb#5009 + def push_literal(*args); end + + # source://parser//lib/parser/lexer-strings.rb#4999 + def read_character_constant(p); end + + # source://parser//lib/parser/lexer-strings.rb#3314 + def reset; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_buffer=(_arg0); end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts; end + + # Set by "main" lexer + # + # source://parser//lib/parser/lexer-strings.rb#3298 + def source_pts=(_arg0); end + + protected + + # source://parser//lib/parser/lexer-strings.rb#5397 + def check_ambiguous_slash(tm); end + + # source://parser//lib/parser/lexer-strings.rb#5408 + def check_invalid_escapes(p); end + + # source://parser//lib/parser/lexer-strings.rb#5136 + def cond; end + + # source://parser//lib/parser/lexer-strings.rb#5132 + def diagnostic(type, reason, arguments = T.unsafe(nil), location = T.unsafe(nil), highlights = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5128 + def emit(type, value = T.unsafe(nil), s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5387 + def emit_character_constant; end + + # source://parser//lib/parser/lexer-strings.rb#5364 + def emit_interp_var(interp_var_kind); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5140 + def emit_invalid_escapes?; end + + # source://parser//lib/parser/lexer-strings.rb#5291 + def encode_escape(ord); end + + # source://parser//lib/parser/lexer-strings.rb#5375 + def encode_escaped_char(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5112 + def eof_codepoint?(point); end + + # source://parser//lib/parser/lexer-strings.rb#5210 + def extend_interp_code(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5225 + def extend_interp_digit_var; end + + # source://parser//lib/parser/lexer-strings.rb#5355 + def extend_interp_var(current_literal); end + + # source://parser//lib/parser/lexer-strings.rb#5234 + def extend_string_eol_check_eof(current_literal, pe); end + + # source://parser//lib/parser/lexer-strings.rb#5251 + def extend_string_eol_heredoc_intertwined(p); end + + # source://parser//lib/parser/lexer-strings.rb#5241 + def extend_string_eol_heredoc_line; end + + # source://parser//lib/parser/lexer-strings.rb#5267 + def extend_string_eol_words(current_literal, p); end + + # String escaping + # + # source://parser//lib/parser/lexer-strings.rb#5154 + def extend_string_escaped; end + + # source://parser//lib/parser/lexer-strings.rb#5287 + def extend_string_for_token_range(current_literal, string); end + + # source://parser//lib/parser/lexer-strings.rb#5279 + def extend_string_slice_end(lookahead); end + + # source://parser//lib/parser/lexer-strings.rb#5124 + def range(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5347 + def read_post_meta_or_ctrl_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5379 + def slash_c_char; end + + # source://parser//lib/parser/lexer-strings.rb#5383 + def slash_m_char; end + + # source://parser//lib/parser/lexer-strings.rb#5120 + def tok(s = T.unsafe(nil), e = T.unsafe(nil)); end + + # source://parser//lib/parser/lexer-strings.rb#5295 + def unescape_char(p); end + + # source://parser//lib/parser/lexer-strings.rb#5307 + def unicode_points(p); end + + # @return [Boolean] + # + # source://parser//lib/parser/lexer-strings.rb#5116 + def version?(*versions); end + + class << self + # Returns the value of attribute lex_en_character. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character; end + + # Sets the attribute lex_en_character + # + # @param value the value to set the attribute lex_en_character to. + # + # source://parser//lib/parser/lexer-strings.rb#3275 + def lex_en_character=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited; end + + # Sets the attribute lex_en_interp_backslash_delimited + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3255 + def lex_en_interp_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_interp_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words; end + + # Sets the attribute lex_en_interp_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_interp_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3263 + def lex_en_interp_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_interp_string. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string; end + + # Sets the attribute lex_en_interp_string + # + # @param value the value to set the attribute lex_en_interp_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3243 + def lex_en_interp_string=(_arg0); end + + # Returns the value of attribute lex_en_interp_words. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words; end + + # Sets the attribute lex_en_interp_words + # + # @param value the value to set the attribute lex_en_interp_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3239 + def lex_en_interp_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited; end + + # Sets the attribute lex_en_plain_backslash_delimited + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited to. + # + # source://parser//lib/parser/lexer-strings.rb#3259 + def lex_en_plain_backslash_delimited=(_arg0); end + + # Returns the value of attribute lex_en_plain_backslash_delimited_words. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words; end + + # Sets the attribute lex_en_plain_backslash_delimited_words + # + # @param value the value to set the attribute lex_en_plain_backslash_delimited_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3267 + def lex_en_plain_backslash_delimited_words=(_arg0); end + + # Returns the value of attribute lex_en_plain_string. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string; end + + # Sets the attribute lex_en_plain_string + # + # @param value the value to set the attribute lex_en_plain_string to. + # + # source://parser//lib/parser/lexer-strings.rb#3251 + def lex_en_plain_string=(_arg0); end + + # Returns the value of attribute lex_en_plain_words. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words; end + + # Sets the attribute lex_en_plain_words + # + # @param value the value to set the attribute lex_en_plain_words to. + # + # source://parser//lib/parser/lexer-strings.rb#3247 + def lex_en_plain_words=(_arg0); end + + # Returns the value of attribute lex_en_regexp_modifiers. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers; end + + # Sets the attribute lex_en_regexp_modifiers + # + # @param value the value to set the attribute lex_en_regexp_modifiers to. + # + # source://parser//lib/parser/lexer-strings.rb#3271 + def lex_en_regexp_modifiers=(_arg0); end + + # Returns the value of attribute lex_en_unknown. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown; end + + # Sets the attribute lex_en_unknown + # + # @param value the value to set the attribute lex_en_unknown to. + # + # source://parser//lib/parser/lexer-strings.rb#3279 + def lex_en_unknown=(_arg0); end + + # Returns the value of attribute lex_error. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error; end + + # Sets the attribute lex_error + # + # @param value the value to set the attribute lex_error to. + # + # source://parser//lib/parser/lexer-strings.rb#3234 + def lex_error=(_arg0); end + + # Returns the value of attribute lex_start. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start; end + + # Sets the attribute lex_start + # + # @param value the value to set the attribute lex_start to. + # + # source://parser//lib/parser/lexer-strings.rb#3230 + def lex_start=(_arg0); end + + private + + # Returns the value of attribute _lex_actions. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions; end + + # Sets the attribute _lex_actions + # + # @param value the value to set the attribute _lex_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#11 + def _lex_actions=(_arg0); end + + # Returns the value of attribute _lex_eof_trans. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans; end + + # Sets the attribute _lex_eof_trans + # + # @param value the value to set the attribute _lex_eof_trans to. + # + # source://parser//lib/parser/lexer-strings.rb#3184 + def _lex_eof_trans=(_arg0); end + + # Returns the value of attribute _lex_from_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions; end + + # Sets the attribute _lex_from_state_actions + # + # @param value the value to set the attribute _lex_from_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3138 + def _lex_from_state_actions=(_arg0); end + + # Returns the value of attribute _lex_index_offsets. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets; end + + # Sets the attribute _lex_index_offsets + # + # @param value the value to set the attribute _lex_index_offsets to. + # + # source://parser//lib/parser/lexer-strings.rb#244 + def _lex_index_offsets=(_arg0); end + + # Returns the value of attribute _lex_indicies. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies; end + + # Sets the attribute _lex_indicies + # + # @param value the value to set the attribute _lex_indicies to. + # + # source://parser//lib/parser/lexer-strings.rb#290 + def _lex_indicies=(_arg0); end + + # Returns the value of attribute _lex_key_spans. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans; end + + # Sets the attribute _lex_key_spans + # + # @param value the value to set the attribute _lex_key_spans to. + # + # source://parser//lib/parser/lexer-strings.rb#198 + def _lex_key_spans=(_arg0); end + + # Returns the value of attribute _lex_to_state_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions; end + + # Sets the attribute _lex_to_state_actions + # + # @param value the value to set the attribute _lex_to_state_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3092 + def _lex_to_state_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_actions. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions; end + + # Sets the attribute _lex_trans_actions + # + # @param value the value to set the attribute _lex_trans_actions to. + # + # source://parser//lib/parser/lexer-strings.rb#3029 + def _lex_trans_actions=(_arg0); end + + # Returns the value of attribute _lex_trans_keys. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys; end + + # Sets the attribute _lex_trans_keys + # + # @param value the value to set the attribute _lex_trans_keys to. + # + # source://parser//lib/parser/lexer-strings.rb#76 + def _lex_trans_keys=(_arg0); end + + # Returns the value of attribute _lex_trans_targs. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs; end + + # Sets the attribute _lex_trans_targs + # + # @param value the value to set the attribute _lex_trans_targs to. + # + # source://parser//lib/parser/lexer-strings.rb#2966 + def _lex_trans_targs=(_arg0); end + end +end + +# % +# +# source://parser//lib/parser/lexer-strings.rb#3287 +Parser::LexerStrings::ESCAPES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#5414 +Parser::LexerStrings::ESCAPE_WHITESPACE = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3332 +Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/lexer-strings.rb#3293 +Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + +# Diagnostic messages (errors, warnings and notices) that can be generated. +# +# @api public +# @see Diagnostic +# +# source://parser//lib/parser/messages.rb#11 +Parser::MESSAGES = T.let(T.unsafe(nil), Hash) + +# Holds p->max_numparam from parse.y +# +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#8 +class Parser::MaxNumparamStack + # @api private + # @return [MaxNumparamStack] a new instance of MaxNumparamStack + # + # source://parser//lib/parser/max_numparam_stack.rb#13 + def initialize; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#17 + def empty?; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#29 + def has_numparams?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#21 + def has_ordinary_params!; end + + # @api private + # @return [Boolean] + # + # source://parser//lib/parser/max_numparam_stack.rb#25 + def has_ordinary_params?; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#45 + def pop; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#41 + def push(static:); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#33 + def register(numparam); end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#9 + def stack; end + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#37 + def top; end + + private + + # @api private + # + # source://parser//lib/parser/max_numparam_stack.rb#51 + def set(value); end +end + +# @api private +# +# source://parser//lib/parser/max_numparam_stack.rb#11 +Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://parser//lib/parser/messages.rb#112 +module Parser::Messages + class << self + # Formats the message, returns a raw template if there's nothing to interpolate + # + # Code like `format("", {})` gives a warning, and so this method tries interpolating + # only if `arguments` hash is not empty. + # + # @api private + # + # source://parser//lib/parser/messages.rb#119 + def compile(reason, arguments); end + end +end + +# Parser metadata +# +# source://parser//lib/parser/meta.rb#5 +module Parser::Meta; end + +# All node types that parser can produce. Not all parser versions +# will be able to produce every possible node. +# +# source://parser//lib/parser/meta.rb#9 +Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + +# {Parser::Rewriter} is deprecated. Use {Parser::TreeRewriter} instead. +# It has a backwards compatible API and uses {Parser::Source::TreeRewriter} +# instead of {Parser::Source::Rewriter}. +# Please check the documentation for {Parser::Source::Rewriter} for details. +# +# @api public +# @deprecated Use {Parser::TreeRewriter} +# +# source://parser//lib/parser/rewriter.rb#14 +class Parser::Rewriter < ::Parser::AST::Processor + extend ::Parser::Deprecation + + # @api public + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/rewriter.rb#98 + def initialize(*_arg0); end + + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/rewriter.rb#38 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#77 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#67 + def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/rewriter.rb#47 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#87 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param ast [Parser::AST::Node] + # @return [String] + # + # source://parser//lib/parser/rewriter.rb#23 + def rewrite(source_buffer, ast); end + + # Wraps the given source range with the given values. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/rewriter.rb#57 + def wrap(range, before, after); end +end + +# @api public +# +# source://parser//lib/parser/rewriter.rb#91 +Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# @api public +# +# source://parser//lib/parser.rb#30 +module Parser::Source; end + +# A buffer with source code. {Buffer} contains the source code itself, +# associated location information (name and first line), and takes care +# of encoding. +# +# A source buffer is immutable once populated. +# +# @api public +# +# source://parser//lib/parser/source/buffer.rb#25 +class Parser::Source::Buffer + # @api public + # @return [Buffer] a new instance of Buffer + # + # source://parser//lib/parser/source/buffer.rb#110 + def initialize(name, first_line = T.unsafe(nil), source: T.unsafe(nil)); end + + # Convert a character index into the source to a column number. + # + # @api private + # @param position [Integer] + # @return [Integer] column + # + # source://parser//lib/parser/source/buffer.rb#247 + def column_for_position(position); end + + # Convert a character index into the source to a `[line, column]` tuple. + # + # @api public + # @param position [Integer] + # @return [[Integer, Integer]] `[line, column]` + # + # source://parser//lib/parser/source/buffer.rb#222 + def decompose_position(position); end + + # First line of the buffer, 1 by default. + # + # @api public + # @return [Integer] first line + # + # source://parser//lib/parser/source/buffer.rb#26 + def first_line; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#317 + def freeze; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#323 + def inspect; end + + # Number of last line in the buffer + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/buffer.rb#312 + def last_line; end + + # Convert a character index into the source to a line number. + # + # @api private + # @param position [Integer] + # @return [Integer] line + # + # source://parser//lib/parser/source/buffer.rb#236 + def line_for_position(position); end + + # Extract line `lineno` as a new `Range`, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [Range] + # + # source://parser//lib/parser/source/buffer.rb#289 + def line_range(lineno); end + + # Buffer name. If the buffer was created from a file, the name corresponds + # to relative path to the file. + # + # @api public + # @return [String] buffer name + # + # source://parser//lib/parser/source/buffer.rb#26 + def name; end + + # Populate this buffer from a string without encoding autodetection. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#185 + def raw_source=(input); end + + # Populate this buffer from correspondingly named file. + # + # @api public + # @example + # Parser::Source::Buffer.new('foo/bar.rb').read + # @raise [ArgumentError] if already populated + # @return [Buffer] self + # + # source://parser//lib/parser/source/buffer.rb#136 + def read; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#199 + def slice(start, length = T.unsafe(nil)); end + + # Source code contained in this buffer. + # + # @api public + # @raise [RuntimeError] if buffer is not populated yet + # @return [String] source code + # + # source://parser//lib/parser/source/buffer.rb#150 + def source; end + + # Populate this buffer from a string with encoding autodetection. + # `input` is mutated if not frozen. + # + # @api public + # @param input [String] + # @raise [ArgumentError] if already populated + # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#167 + def source=(input); end + + # Extract line `lineno` from source, taking `first_line` into account. + # + # @api public + # @param lineno [Integer] + # @raise [IndexError] if `lineno` is out of bounds + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#278 + def source_line(lineno); end + + # Return an `Array` of source code lines. + # + # @api public + # @return [Array] + # + # source://parser//lib/parser/source/buffer.rb#257 + def source_lines; end + + # @api public + # @return [Range] A range covering the whole source + # + # source://parser//lib/parser/source/buffer.rb#303 + def source_range; end + + private + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#353 + def bsearch(line_begins, position); end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#330 + def line_begins; end + + # @api public + # + # source://parser//lib/parser/source/buffer.rb#344 + def line_index_for_position(position); end + + class << self + # Try to recognize encoding of `string` as Ruby would, i.e. by looking for + # magic encoding comment or UTF-8 BOM. `string` can be in any encoding. + # + # @api public + # @param string [String] + # @raise [Parser::UnknownEncodingInMagicComment] if the encoding is not recognized + # @return [String, nil] encoding name, if recognized + # + # source://parser//lib/parser/source/buffer.rb#52 + def recognize_encoding(string); end + + # Recognize encoding of `input` and process it so it could be lexed. + # + # * If `input` does not contain BOM or magic encoding comment, it is + # kept in the original encoding. + # * If the detected encoding is binary, `input` is kept in binary. + # * Otherwise, `input` is re-encoded into UTF-8 and returned as a + # new string. + # + # This method mutates the encoding of `input`, but not its content. + # + # @api public + # @param input [String] + # @raise [EncodingError] + # @return [String] + # + # source://parser//lib/parser/source/buffer.rb#95 + def reencode_string(input); end + end +end + +# @api private +# +# source://parser//lib/parser/source/buffer.rb#31 +Parser::Source::Buffer::ENCODING_RE = T.let(T.unsafe(nil), Regexp) + +# A comment in the source code. +# +# @api public +# +# source://parser//lib/parser/source/comment.rb#17 +class Parser::Source::Comment + # @api public + # @param range [Parser::Source::Range] + # @return [Comment] a new instance of Comment + # + # source://parser//lib/parser/source/comment.rb#67 + def initialize(range); end + + # Compares comments. Two comments are equal if they + # correspond to the same source range. + # + # @api public + # @param other [Object] + # @return [Boolean] + # + # source://parser//lib/parser/source/comment.rb#120 + def ==(other); end + + # @api public + # @return [Boolean] true if this is a block comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#109 + def document?; end + + # @api public + # @return [Boolean] true if this is an inline comment. + # @see #type + # + # source://parser//lib/parser/source/comment.rb#101 + def inline?; end + + # @api public + # @return [String] a human-readable representation of this comment + # + # source://parser//lib/parser/source/comment.rb#128 + def inspect; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#20 + def loc; end + + # @api public + # @return [Parser::Source::Range] + # + # source://parser//lib/parser/source/comment.rb#20 + def location; end + + # @api public + # @return [String] + # + # source://parser//lib/parser/source/comment.rb#18 + def text; end + + # Type of this comment. + # + # * Inline comments correspond to `:inline`: + # + # # whatever + # + # * Block comments correspond to `:document`: + # + # =begin + # hi i am a document + # =end + # + # @api public + # @return [Symbol] + # + # source://parser//lib/parser/source/comment.rb#89 + def type; end + + class << self + # Associate `comments` with `ast` nodes by their corresponding node. + # + # @api public + # @deprecated Use {associate_locations}. + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate + # + # source://parser//lib/parser/source/comment.rb#32 + def associate(ast, comments); end + + # Associate `comments` with `ast` nodes using identity. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_by_identity + # + # source://parser//lib/parser/source/comment.rb#59 + def associate_by_identity(ast, comments); end + + # Associate `comments` with `ast` nodes by their location in the + # source. + # + # @api public + # @param ast [Parser::AST::Node] + # @param comments [Array] + # @return [Hash>] + # @see Parser::Source::Comment::Associator#associate_locations + # + # source://parser//lib/parser/source/comment.rb#46 + def associate_locations(ast, comments); end + end +end + +# source://parser//lib/parser/source/comment/associator.rb#45 +class Parser::Source::Comment::Associator + # source://parser//lib/parser/source/comment/associator.rb#51 + def initialize(ast, comments); end + + # source://parser//lib/parser/source/comment/associator.rb#92 + def associate; end + + # source://parser//lib/parser/source/comment/associator.rb#115 + def associate_by_identity; end + + # source://parser//lib/parser/source/comment/associator.rb#104 + def associate_locations; end + + # source://parser//lib/parser/source/comment/associator.rb#46 + def skip_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#46 + def skip_directives=(_arg0); end + + private + + # source://parser//lib/parser/source/comment/associator.rb#182 + def advance_comment; end + + # source://parser//lib/parser/source/comment/associator.rb#214 + def advance_through_directives; end + + # source://parser//lib/parser/source/comment/associator.rb#206 + def associate_and_advance_comment(node); end + + # source://parser//lib/parser/source/comment/associator.rb#123 + def children_in_source_order(node); end + + # source://parser//lib/parser/source/comment/associator.rb#187 + def current_comment_before?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#194 + def current_comment_before_end?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#201 + def current_comment_decorates?(node); end + + # source://parser//lib/parser/source/comment/associator.rb#135 + def do_associate; end + + # source://parser//lib/parser/source/comment/associator.rb#166 + def process_leading_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#173 + def process_trailing_comments(node); end + + # source://parser//lib/parser/source/comment/associator.rb#148 + def visit(node); end +end + +# source://parser//lib/parser/source/comment/associator.rb#212 +Parser::Source::Comment::Associator::MAGIC_COMMENT_RE = T.let(T.unsafe(nil), Regexp) + +# source://parser//lib/parser/source/comment/associator.rb#122 +Parser::Source::Comment::Associator::POSTFIX_TYPES = T.let(T.unsafe(nil), Set) + +# {Map} relates AST nodes to the source code they were parsed from. +# More specifically, a {Map} or its subclass contains a set of ranges: +# +# * `expression`: smallest range which includes all source corresponding +# to the node and all `expression` ranges of its children. +# * other ranges (`begin`, `end`, `operator`, ...): node-specific ranges +# pointing to various interesting tokens corresponding to the node. +# +# Note that the {Map::Heredoc} map is the only one whose `expression` does +# not include other ranges. It only covers the heredoc marker (`< 2]').children[0].loc +# # => > +# +# The {file:doc/AST_FORMAT.md} document describes how ranges associated to source +# code tokens. For example, the entry +# +# (array (int 1) (int 2)) +# +# "[1, 2]" +# ^ begin +# ^ end +# ~~~~~~ expression +# +# means that if `node` is an {Parser::AST::Node} `(array (int 1) (int 2))`, +# then `node.loc` responds to `begin`, `end` and `expression`, and +# `node.loc.begin` returns a range pointing at the opening bracket, and so on. +# +# If you want to write code polymorphic by the source map (i.e. accepting +# several subclasses of {Map}), use `respond_to?` instead of `is_a?` to +# check whether the map features the range you need. Concrete {Map} +# subclasses may not be preserved between versions, but their interfaces +# will be kept compatible. +# +# You can visualize the source maps with `ruby-parse -E` command-line tool. +# +# @api public +# @example +# require 'parser/current' +# +# p Parser::CurrentRuby.parse('[1, 2]').loc +# # => #, +# # @begin=#, +# # @expression=#> +# +# source://parser//lib/parser/source/map.rb#70 +class Parser::Source::Map + # @api public + # @param expression [Range] + # @return [Map] a new instance of Map + # + # source://parser//lib/parser/source/map.rb#76 + def initialize(expression); end + + # Compares source maps. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/map.rb#140 + def ==(other); end + + # A shortcut for `self.expression.column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#109 + def column; end + + # @api public + # @return [Range] + # + # source://parser//lib/parser/source/map.rb#72 + def expression; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#99 + def first_line; end + + # A shortcut for `self.expression.last_column`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#125 + def last_column; end + + # A shortcut for `self.expression.last_line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#117 + def last_line; end + + # A shortcut for `self.expression.line`. + # + # @api public + # @return [Integer] + # + # source://parser//lib/parser/source/map.rb#99 + def line; end + + # The node that is described by this map. Nodes and maps have 1:1 correspondence. + # + # @api public + # @return [Parser::AST::Node] + # + # source://parser//lib/parser/source/map.rb#71 + def node; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#89 + def node=(node); end + + # Converts this source map to a hash with keys corresponding to + # ranges. For example, if called on an instance of {Collection}, + # which adds the `begin` and `end` ranges, the resulting hash + # will contain keys `:expression`, `:begin` and `:end`. + # + # @api public + # @example + # require 'parser/current' + # + # p Parser::CurrentRuby.parse('[1, 2]').loc.to_hash + # # => { + # # :begin => #, + # # :end => #, + # # :expression => # + # # } + # @return [Hash] + # + # source://parser//lib/parser/source/map.rb#166 + def to_hash; end + + # @api private + # + # source://parser//lib/parser/source/map.rb#132 + def with_expression(expression_l); end + + protected + + # @api public + # + # source://parser//lib/parser/source/map.rb#180 + def update_expression(expression_l); end + + # @api public + # + # source://parser//lib/parser/source/map.rb#176 + def with(&block); end + + private + + # @api private + # + # source://parser//lib/parser/source/map.rb#82 + def initialize_copy(other); end +end + +# source://parser//lib/parser/source/map/collection.rb#6 +class Parser::Source::Map::Collection < ::Parser::Source::Map + # source://parser//lib/parser/source/map/collection.rb#10 + def initialize(begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/collection.rb#7 + def begin; end + + # source://parser//lib/parser/source/map/collection.rb#8 + def end; end +end + +# source://parser//lib/parser/source/map/condition.rb#6 +class Parser::Source::Map::Condition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/condition.rb#12 + def initialize(keyword_l, begin_l, else_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/condition.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/condition.rb#9 + def else; end + + # source://parser//lib/parser/source/map/condition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/condition.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/constant.rb#6 +class Parser::Source::Map::Constant < ::Parser::Source::Map + # source://parser//lib/parser/source/map/constant.rb#11 + def initialize(double_colon, name, expression); end + + # source://parser//lib/parser/source/map/constant.rb#7 + def double_colon; end + + # source://parser//lib/parser/source/map/constant.rb#8 + def name; end + + # source://parser//lib/parser/source/map/constant.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/constant.rb#20 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/constant.rb#26 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/definition.rb#6 +class Parser::Source::Map::Definition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/definition.rb#12 + def initialize(keyword_l, operator_l, name_l, end_l); end + + # source://parser//lib/parser/source/map/definition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/definition.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/definition.rb#9 + def name; end + + # source://parser//lib/parser/source/map/definition.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/for.rb#6 +class Parser::Source::Map::For < ::Parser::Source::Map + # source://parser//lib/parser/source/map/for.rb#10 + def initialize(keyword_l, in_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/for.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/for.rb#8 + def end; end + + # source://parser//lib/parser/source/map/for.rb#7 + def in; end + + # source://parser//lib/parser/source/map/for.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/heredoc.rb#6 +class Parser::Source::Map::Heredoc < ::Parser::Source::Map + # source://parser//lib/parser/source/map/heredoc.rb#10 + def initialize(begin_l, body_l, end_l); end + + # source://parser//lib/parser/source/map/heredoc.rb#7 + def heredoc_body; end + + # source://parser//lib/parser/source/map/heredoc.rb#8 + def heredoc_end; end +end + +# source://parser//lib/parser/source/map/index.rb#6 +class Parser::Source::Map::Index < ::Parser::Source::Map + # source://parser//lib/parser/source/map/index.rb#11 + def initialize(begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/index.rb#7 + def begin; end + + # source://parser//lib/parser/source/map/index.rb#8 + def end; end + + # source://parser//lib/parser/source/map/index.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/index.rb#21 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/index.rb#27 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/keyword.rb#6 +class Parser::Source::Map::Keyword < ::Parser::Source::Map + # source://parser//lib/parser/source/map/keyword.rb#11 + def initialize(keyword_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/keyword.rb#8 + def begin; end + + # source://parser//lib/parser/source/map/keyword.rb#9 + def end; end + + # source://parser//lib/parser/source/map/keyword.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/method_definition.rb#6 +class Parser::Source::Map::MethodDefinition < ::Parser::Source::Map + # source://parser//lib/parser/source/map/method_definition.rb#13 + def initialize(keyword_l, operator_l, name_l, end_l, assignment_l, body_l); end + + # source://parser//lib/parser/source/map/method_definition.rb#11 + def assignment; end + + # source://parser//lib/parser/source/map/method_definition.rb#10 + def end; end + + # source://parser//lib/parser/source/map/method_definition.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/method_definition.rb#9 + def name; end + + # source://parser//lib/parser/source/map/method_definition.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/objc_kwarg.rb#6 +class Parser::Source::Map::ObjcKwarg < ::Parser::Source::Map + # source://parser//lib/parser/source/map/objc_kwarg.rb#11 + def initialize(keyword_l, operator_l, argument_l, expression_l); end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#9 + def argument; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#7 + def keyword; end + + # source://parser//lib/parser/source/map/objc_kwarg.rb#8 + def operator; end +end + +# source://parser//lib/parser/source/map/operator.rb#6 +class Parser::Source::Map::Operator < ::Parser::Source::Map + # source://parser//lib/parser/source/map/operator.rb#9 + def initialize(operator, expression); end + + # source://parser//lib/parser/source/map/operator.rb#7 + def operator; end +end + +# source://parser//lib/parser/source/map/rescue_body.rb#6 +class Parser::Source::Map::RescueBody < ::Parser::Source::Map + # source://parser//lib/parser/source/map/rescue_body.rb#11 + def initialize(keyword_l, assoc_l, begin_l, expression_l); end + + # source://parser//lib/parser/source/map/rescue_body.rb#8 + def assoc; end + + # source://parser//lib/parser/source/map/rescue_body.rb#9 + def begin; end + + # source://parser//lib/parser/source/map/rescue_body.rb#7 + def keyword; end +end + +# source://parser//lib/parser/source/map/send.rb#6 +class Parser::Source::Map::Send < ::Parser::Source::Map + # source://parser//lib/parser/source/map/send.rb#13 + def initialize(dot_l, selector_l, begin_l, end_l, expression_l); end + + # source://parser//lib/parser/source/map/send.rb#10 + def begin; end + + # source://parser//lib/parser/source/map/send.rb#7 + def dot; end + + # source://parser//lib/parser/source/map/send.rb#11 + def end; end + + # source://parser//lib/parser/source/map/send.rb#9 + def operator; end + + # source://parser//lib/parser/source/map/send.rb#8 + def selector; end + + # source://parser//lib/parser/source/map/send.rb#24 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/send.rb#30 + def update_operator(operator_l); end +end + +# source://parser//lib/parser/source/map/ternary.rb#6 +class Parser::Source::Map::Ternary < ::Parser::Source::Map + # source://parser//lib/parser/source/map/ternary.rb#10 + def initialize(question_l, colon_l, expression_l); end + + # source://parser//lib/parser/source/map/ternary.rb#8 + def colon; end + + # source://parser//lib/parser/source/map/ternary.rb#7 + def question; end +end + +# source://parser//lib/parser/source/map/variable.rb#6 +class Parser::Source::Map::Variable < ::Parser::Source::Map + # source://parser//lib/parser/source/map/variable.rb#10 + def initialize(name_l, expression_l = T.unsafe(nil)); end + + # source://parser//lib/parser/source/map/variable.rb#7 + def name; end + + # source://parser//lib/parser/source/map/variable.rb#8 + def operator; end + + # source://parser//lib/parser/source/map/variable.rb#19 + def with_operator(operator_l); end + + protected + + # source://parser//lib/parser/source/map/variable.rb#25 + def update_operator(operator_l); end +end + +# A range of characters in a particular source buffer. +# +# The range is always exclusive, i.e. a range with `begin_pos` of 3 and +# `end_pos` of 5 will contain the following characters: +# +# example +# ^^ +# +# @api public +# +# source://parser//lib/parser/source/range.rb#26 +class Parser::Source::Range + include ::Comparable + + # @api public + # @param source_buffer [Buffer] + # @param begin_pos [Integer] + # @param end_pos [Integer] + # @return [Range] a new instance of Range + # + # source://parser//lib/parser/source/range.rb#37 + def initialize(source_buffer, begin_pos, end_pos); end + + # Compare ranges, first by begin_pos, then by end_pos. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#301 + def <=>(other); end + + # by the given amount(s) + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) adjusted + # + # source://parser//lib/parser/source/range.rb#193 + def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end + + # @api public + # @return [Range] a zero-length range located just before the beginning + # of this range. + # + # source://parser//lib/parser/source/range.rb#55 + def begin; end + + # @api public + # @return [Integer] index of the first character in the range + # + # source://parser//lib/parser/source/range.rb#30 + def begin_pos; end + + # @api public + # @return [Integer] zero-based column number of the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#92 + def column; end + + # @api public + # @raise RangeError + # @return [::Range] a range of columns spanned by this range. + # + # source://parser//lib/parser/source/range.rb#114 + def column_range; end + + # Return `other.contains?(self)` + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#274 + def contained?(other); end + + # Returns true iff this range contains (strictly) `other`. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#262 + def contains?(other); end + + # Returns true iff both ranges intersect and also have different elements from one another. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#286 + def crossing?(other); end + + # Return `true` iff this range and `other` are disjoint. + # + # Two ranges must be one and only one of ==, disjoint?, contains?, contained? or crossing? + # + # @api public + # @param other [Range] + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#236 + def disjoint?(other); end + + # Checks if a range is empty; if it contains no characters + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#294 + def empty?; end + + # @api public + # @return [Range] a zero-length range located just after the end + # of this range. + # + # source://parser//lib/parser/source/range.rb#63 + def end; end + + # @api public + # @return [Integer] index of the character after the last character in the range + # + # source://parser//lib/parser/source/range.rb#30 + def end_pos; end + + # @api public + def eql?(_arg0); end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#83 + def first_line; end + + # Support for Ranges be used in as Hash indices and in Sets. + # + # @api public + # + # source://parser//lib/parser/source/range.rb#313 + def hash; end + + # @api public + # @return [String] a human-readable representation of this range. + # + # source://parser//lib/parser/source/range.rb#320 + def inspect; end + + # @api public + # @param other [Range] + # @return [Range] overlapping region of this range and `other`, or `nil` + # if they do not overlap + # + # source://parser//lib/parser/source/range.rb#220 + def intersect(other); end + + # `is?` provides a concise way to compare the source corresponding to this range. + # For example, `r.source == '(' || r.source == 'begin'` is equivalent to + # `r.is?('(', 'begin')`. + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/range.rb#141 + def is?(*what); end + + # @api public + # @param other [Range] + # @return [Range] smallest possible range spanning both this range and `other`. + # + # source://parser//lib/parser/source/range.rb#209 + def join(other); end + + # @api public + # @return [Integer] zero-based column number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#106 + def last_column; end + + # @api public + # @return [Integer] line number of the end of this range. + # + # source://parser//lib/parser/source/range.rb#99 + def last_line; end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#70 + def length; end + + # Line number of the beginning of this range. By default, the first line + # of a buffer is 1; as such, line numbers are most commonly one-based. + # + # @api public + # @return [Integer] line number of the beginning of this range. + # @see Buffer + # + # source://parser//lib/parser/source/range.rb#83 + def line; end + + # Return `true` iff this range is not disjoint from `other`. + # + # @api public + # @param other [Range] + # @return [Boolean] `true` if this range and `other` overlap + # + # source://parser//lib/parser/source/range.rb#250 + def overlaps?(other); end + + # @api public + # @param new_size [Integer] + # @return [Range] a range beginning at the same point as this range and length `new_size`. + # + # source://parser//lib/parser/source/range.rb#201 + def resize(new_size); end + + # @api public + # @return [Integer] amount of characters included in this range. + # + # source://parser//lib/parser/source/range.rb#70 + def size; end + + # @api public + # @return [String] all source code covered by this range. + # + # source://parser//lib/parser/source/range.rb#132 + def source; end + + # @api public + # @return [Parser::Source::Buffer] + # + # source://parser//lib/parser/source/range.rb#29 + def source_buffer; end + + # @api public + # @return [String] a line of source code containing the beginning of this range. + # + # source://parser//lib/parser/source/range.rb#125 + def source_line; end + + # @api public + # @return [Array] a set of character indexes contained in this range. + # + # source://parser//lib/parser/source/range.rb#148 + def to_a; end + + # @api public + # @return [Range] a Ruby range with the same `begin_pos` and `end_pos` + # + # source://parser//lib/parser/source/range.rb#155 + def to_range; end + + # Composes a GNU/Clang-style string representation of the beginning of this + # range. + # + # For example, for the following range in file `foo.rb`, + # + # def foo + # ^^^ + # + # `to_s` will return `foo.rb:1:5`. + # Note that the column index is one-based. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/range.rb#173 + def to_s; end + + # to the given value(s). + # + # @api public + # @param Endpoint(s) [Hash] to change, any combination of :begin_pos or :end_pos + # @return [Range] the same range as this range but with the given end point(s) changed + # + # source://parser//lib/parser/source/range.rb#184 + def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end +end + +# {Rewriter} is deprecated. Use {TreeRewriter} instead. +# +# TreeRewriter has simplified semantics, and customizable policies +# with regards to clobbering. Please read the documentation. +# +# Keep in mind: +# - Rewriter was discarding the `end_pos` of the given range for `insert_before`, +# and the `begin_pos` for `insert_after`. These are meaningful in TreeRewriter. +# - TreeRewriter's wrap/insert_before/insert_after are multiple by default, while +# Rewriter would raise clobbering errors if the non '_multi' version was called. +# - The TreeRewriter policy closest to Rewriter's behavior is: +# different_replacements: :raise, +# swallowed_insertions: :raise, +# crossing_deletions: :accept +# +# @api public +# @deprecated Use {TreeRewriter} +# +# source://parser//lib/parser/source/rewriter.rb#31 +class Parser::Source::Rewriter + extend ::Parser::Deprecation + + # @api public + # @deprecated Use {TreeRewriter} + # @param source_buffer [Source::Buffer] + # @return [Rewriter] a new instance of Rewriter + # + # source://parser//lib/parser/source/rewriter.rb#39 + def initialize(source_buffer); end + + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/rewriter.rb#33 + def diagnostics; end + + # Inserts new code after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#131 + def insert_after(range, content); end + + # Inserts new code after the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _after_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_after} + # @example Inserting ')]' + # rewriter. + # insert_after_multi(range, ')'). + # insert_after_multi(range, ']'). + # process + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#153 + def insert_after_multi(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#80 + def insert_before(range, content); end + + # Inserts new code before the given source range by allowing other + # insertions at the same position. + # Note that an insertion with latter invocation comes _before_ earlier + # insertion at the same position in the rewritten source. + # + # @api public + # @deprecated Use {TreeRewriter#insert_before} + # @example Inserting '[(' + # rewriter. + # insert_before_multi(range, '('). + # insert_before_multi(range, '['). + # process + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#117 + def insert_before_multi(range, content); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @deprecated Use {TreeRewriter#process} + # @return [String] + # + # source://parser//lib/parser/source/rewriter.rb#178 + def process; end + + # Removes the source range. + # + # @api public + # @deprecated Use {TreeRewriter#remove} + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#67 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @deprecated Use {TreeRewriter#replace} + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#167 + def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/rewriter.rb#32 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. + # + # @api public + # @deprecated Use {TreeRewriter#transaction} + # @example + # begin + # rewriter.transaction do + # rewriter.insert_before(range_of_something, '(') + # rewriter.insert_after(range_of_something, ')') + # end + # rescue Parser::ClobberingError + # end + # @raise [RuntimeError] when no block is passed + # @raise [RuntimeError] when already in a transaction + # + # source://parser//lib/parser/source/rewriter.rb#216 + def transaction; end + + # Inserts new code before and after the given source range. + # + # @api public + # @deprecated Use {TreeRewriter#wrap} + # @param range [Range] + # @param before [String] + # @param after [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/rewriter.rb#94 + def wrap(range, before, after); end + + private + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#476 + def active_clobber; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#484 + def active_clobber=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#480 + def active_insertions; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#492 + def active_insertions=(value); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#472 + def active_queue; end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#500 + def adjacent?(range1, range2); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#351 + def adjacent_insertion_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#366 + def adjacent_insertions?(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#347 + def adjacent_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#377 + def adjacent_updates?(range); end + + # Schedule a code update. If it overlaps with another update, check + # whether they conflict, and raise a clobbering error if they do. + # (As a special case, zero-length ranges at the same position are + # considered to "overlap".) Otherwise, merge them. + # + # Updates which are adjacent to each other, but do not overlap, are also + # merged. + # + # RULES: + # + # - Insertion ("replacing" a zero-length range): + # - Two insertions at the same point conflict. This is true even + # if the earlier insertion has already been merged with an adjacent + # update, and even if they are both inserting the same text. + # - An insertion never conflicts with a replace or remove operation + # on its right or left side, which does not overlap it (in other + # words, which does not update BOTH its right and left sides). + # - An insertion always conflicts with a remove operation which spans + # both its sides. + # - An insertion conflicts with a replace operation which spans both its + # sides, unless the replacement text is longer than the replaced text + # by the size of the insertion (or more), and the portion of + # replacement text immediately after the insertion position is + # identical to the inserted text. + # + # - Removal operations never conflict with each other. + # + # - Replacement operations: + # - Take the portion of each replacement text which falls within: + # - The other operation's replaced region + # - The other operation's replacement text, if it extends past the + # end of its own replaced region (in other words, if the replacement + # text is longer than the text it replaces) + # - If and only if the taken texts are identical for both operations, + # they do not conflict. + # + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#280 + def append(action); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#389 + def can_merge?(action, existing); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#355 + def clobbered_insertion?(insertion); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#343 + def clobbered_position_mask(range); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#468 + def in_transaction?; end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#410 + def merge_actions(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#419 + def merge_actions!(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#425 + def merge_replacements(actions); end + + # @api public + # @raise [ClobberingError] + # + # source://parser//lib/parser/source/rewriter.rb#450 + def raise_clobber_error(action, existing); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#335 + def record_insertion(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#339 + def record_replace(range); end + + # @api public + # + # source://parser//lib/parser/source/rewriter.rb#445 + def replace_actions(old, updated); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/rewriter.rb#383 + def replace_compatible_with_insertion?(replace, insertion); end +end + +# source://parser//lib/parser/source/rewriter/action.rb#9 +class Parser::Source::Rewriter::Action + include ::Comparable + + # source://parser//lib/parser/source/rewriter/action.rb#15 + def initialize(range, replacement = T.unsafe(nil), allow_multiple_insertions = T.unsafe(nil), order = T.unsafe(nil)); end + + # source://parser//lib/parser/source/rewriter/action.rb#24 + def <=>(other); end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def allow_multiple_insertions; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def allow_multiple_insertions?; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def order; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def range; end + + # source://parser//lib/parser/source/rewriter/action.rb#12 + def replacement; end + + # source://parser//lib/parser/source/rewriter/action.rb#30 + def to_s; end +end + +# @api public +# +# source://parser//lib/parser/source/rewriter.rb#504 +Parser::Source::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# {TreeRewriter} performs the heavy lifting in the source rewriting process. +# It schedules code updates to be performed in the correct order. +# +# For simple cases, the resulting source will be obvious. +# +# Examples for more complex cases follow. Assume these examples are acting on +# the source `'puts(:hello, :world)`. The methods #wrap, #remove, etc. +# receive a Range as first argument; for clarity, examples below use english +# sentences and a string of raw code instead. +# +# ## Overlapping ranges: +# +# Any two rewriting actions on overlapping ranges will fail and raise +# a `ClobberingError`, unless they are both deletions (covered next). +# +# * wrap ':hello, ' with '(' and ')' +# * wrap ', :world' with '(' and ')' +# => CloberringError +# +# ## Overlapping deletions: +# +# * remove ':hello, ' +# * remove ', :world' +# +# The overlapping ranges are merged and `':hello, :world'` will be removed. +# This policy can be changed. `:crossing_deletions` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Multiple actions at the same end points: +# +# Results will always be independent on the order they were given. +# Exception: rewriting actions done on exactly the same range (covered next). +# +# Example: +# * replace ', ' by ' => ' +# * wrap ':hello, :world' with '{' and '}' +# * replace ':world' with ':everybody' +# * wrap ':world' with '[', ']' +# +# The resulting string will be `'puts({:hello => [:everybody]})'` +# and this result is independent on the order the instructions were given in. +# +# Note that if the two "replace" were given as a single replacement of ', :world' +# for ' => :everybody', the result would be a `ClobberingError` because of the wrap +# in square brackets. +# +# ## Multiple wraps on same range: +# * wrap ':hello' with '(' and ')' +# * wrap ':hello' with '[' and ']' +# +# The wraps are combined in order given and results would be `'puts([(:hello)], :world)'`. +# +# ## Multiple replacements on same range: +# * replace ':hello' by ':hi', then +# * replace ':hello' by ':hey' +# +# The replacements are made in the order given, so the latter replacement +# supersedes the former and ':hello' will be replaced by ':hey'. +# +# This policy can be changed. `:different_replacements` defaults to `:accept` +# but can be set to `:warn` or `:raise`. +# +# ## Swallowed insertions: +# wrap 'world' by '__', '__' +# replace ':hello, :world' with ':hi' +# +# A containing replacement will swallow the contained rewriting actions +# and `':hello, :world'` will be replaced by `':hi'`. +# +# This policy can be changed for swallowed insertions. `:swallowed_insertions` +# defaults to `:accept` but can be set to `:warn` or `:raise` +# +# ## Implementation +# The updates are organized in a tree, according to the ranges they act on +# (where children are strictly contained by their parent), hence the name. +# +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#91 +class Parser::Source::TreeRewriter + extend ::Parser::Deprecation + + # @api public + # @param source_buffer [Source::Buffer] + # @return [TreeRewriter] a new instance of TreeRewriter + # + # source://parser//lib/parser/source/tree_rewriter.rb#98 + def initialize(source_buffer, crossing_deletions: T.unsafe(nil), different_replacements: T.unsafe(nil), swallowed_insertions: T.unsafe(nil)); end + + # Returns a representation of the rewriter as nested insertions (:wrap) and replacements. + # + # rewriter.as_actions # =>[ [:wrap, 1...10, '(', ')'], + # [:wrap, 2...6, '', '!'], # aka "insert_after" + # [:replace, 2...4, 'foo'], + # [:replace, 5...6, ''], # aka "removal" + # ], + # + # Contrary to `as_replacements`, this representation is sufficient to recreate exactly + # the rewriter. + # + # @api public + # @return [Array<(Symbol, Range, String{, String})>] + # + # source://parser//lib/parser/source/tree_rewriter.rb#299 + def as_nested_actions; end + + # Returns a representation of the rewriter as an ordered list of replacements. + # + # rewriter.as_replacements # => [ [1...1, '('], + # [2...4, 'foo'], + # [5...6, ''], + # [6...6, '!'], + # [10...10, ')'], + # ] + # + # This representation is sufficient to recreate the result of `process` but it is + # not sufficient to recreate completely the rewriter for further merging/actions. + # See `as_nested_actions` + # + # @api public + # @return [Array] an ordered list of pairs of range & replacement + # + # source://parser//lib/parser/source/tree_rewriter.rb#281 + def as_replacements; end + + # @api public + # @return [Diagnostic::Engine] + # + # source://parser//lib/parser/source/tree_rewriter.rb#93 + def diagnostics; end + + # Returns true iff no (non trivial) update has been recorded + # + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#125 + def empty?; end + + # For special cases where one needs to merge a rewriter attached to a different source_buffer + # or that needs to be offset. Policies of the receiver are used. + # + # @api public + # @param rewriter [TreeRewriter] from different source_buffer + # @param offset [Integer] + # @raise [IndexError] if action ranges (once offset) don't fit the current buffer + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#168 + def import!(foreign_rewriter, offset: T.unsafe(nil)); end + + # @api public + # @return [Boolean] + # + # source://parser//lib/parser/source/tree_rewriter.rb#329 + def in_transaction?; end + + # Shortcut for `wrap(range, nil, content)` + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#242 + def insert_after(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#351 + def insert_after_multi(range, text); end + + # Shortcut for `wrap(range, content, nil)` + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#230 + def insert_before(range, content); end + + # @api private + # @deprecated Use insert_after or wrap + # + # source://parser//lib/parser/source/tree_rewriter.rb#342 + def insert_before_multi(range, text); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#334 + def inspect; end + + # Returns a new rewriter that consists of the updates of the received + # and the given argument. Policies of the receiver are used. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] merge of receiver and argument + # + # source://parser//lib/parser/source/tree_rewriter.rb#155 + def merge(with); end + + # Merges the updates of argument with the receiver. + # Policies of the receiver are used. + # This action is atomic in that it won't change the receiver + # unless it succeeds. + # + # @api public + # @param with [Rewriter] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#139 + def merge!(with); end + + # Applies all scheduled changes to the `source_buffer` and returns + # modified source as a new string. + # + # @api public + # @return [String] + # + # source://parser//lib/parser/source/tree_rewriter.rb#252 + def process; end + + # Shortcut for `replace(range, '')` + # + # @api public + # @param range [Range] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#217 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Range] + # @param content [String] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#193 + def replace(range, content); end + + # @api public + # @return [Source::Buffer] + # + # source://parser//lib/parser/source/tree_rewriter.rb#92 + def source_buffer; end + + # Provides a protected block where a sequence of multiple rewrite actions + # are handled atomically. If any of the actions failed by clobbering, + # all the actions are rolled back. Transactions can be nested. + # + # @api public + # @raise [RuntimeError] when no block is passed + # + # source://parser//lib/parser/source/tree_rewriter.rb#310 + def transaction; end + + # Inserts the given strings before and after the given range. + # + # @api public + # @param range [Range] + # @param insert_before [String, nil] + # @param insert_after [String, nil] + # @raise [ClobberingError] when clobbering is detected + # @return [Rewriter] self + # + # source://parser//lib/parser/source/tree_rewriter.rb#206 + def wrap(range, insert_before, insert_after); end + + protected + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#365 + def action_root; end + + private + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#369 + def action_summary; end + + # @api public + # @raise [ArgumentError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#392 + def check_policy_validity; end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#404 + def check_range_validity(range); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#397 + def combine(range, attributes); end + + # @api public + # + # source://parser//lib/parser/source/tree_rewriter.rb#411 + def enforce_policy(event); end + + # @api public + # @raise [Parser::ClobberingError] + # + # source://parser//lib/parser/source/tree_rewriter.rb#418 + def trigger_policy(event, range: T.unsafe(nil), conflict: T.unsafe(nil), **arguments); end +end + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#391 +Parser::Source::TreeRewriter::ACTIONS = T.let(T.unsafe(nil), Array) + +# source://parser//lib/parser/source/tree_rewriter/action.rb#14 +class Parser::Source::TreeRewriter::Action + # source://parser//lib/parser/source/tree_rewriter/action.rb#17 + def initialize(range, enforcer, insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil), children: T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#29 + def combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#68 + def contract; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#34 + def empty?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def insert_after; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def insert_before; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#58 + def insertion?; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#81 + def moved(source_buffer, offset); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#50 + def nested_actions; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#41 + def ordered_replacements; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def range; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 + def replacement; end + + protected + + # source://parser//lib/parser/source/tree_rewriter/action.rb#159 + def analyse_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#146 + def bsearch_child_index(from = T.unsafe(nil)); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#225 + def call_enforcer_for_merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#205 + def check_fusible(action, *fusible); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#95 + def children; end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#130 + def combine_children(more_children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#103 + def do_combine(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#136 + def fuse_deletions(action, fusible, other_sibblings); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#216 + def merge(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#111 + def place_in_hierarchy(action); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#233 + def swallow(children); end + + # source://parser//lib/parser/source/tree_rewriter/action.rb#97 + def with(range: T.unsafe(nil), enforcer: T.unsafe(nil), children: T.unsafe(nil), insert_before: T.unsafe(nil), replacement: T.unsafe(nil), insert_after: T.unsafe(nil)); end +end + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#356 +Parser::Source::TreeRewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) + +# @api public +# +# source://parser//lib/parser/source/tree_rewriter.rb#417 +Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) + +# source://parser//lib/parser/static_environment.rb#5 +class Parser::StaticEnvironment + # @return [StaticEnvironment] a new instance of StaticEnvironment + # + # source://parser//lib/parser/static_environment.rb#17 + def initialize; end + + # source://parser//lib/parser/static_environment.rb#55 + def declare(name); end + + # Anonymous blockarg + # + # source://parser//lib/parser/static_environment.rb#77 + def declare_anonymous_blockarg; end + + # Anonymous kwresarg + # + # source://parser//lib/parser/static_environment.rb#113 + def declare_anonymous_kwrestarg; end + + # Anonymous restarg + # + # source://parser//lib/parser/static_environment.rb#95 + def declare_anonymous_restarg; end + + # Forward args + # + # source://parser//lib/parser/static_environment.rb#67 + def declare_forward_args; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#61 + def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#81 + def declared_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#85 + def declared_anonymous_blockarg_in_current_scpe?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#117 + def declared_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#121 + def declared_anonymous_kwrestarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#99 + def declared_anonymous_restarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#103 + def declared_anonymous_restarg_in_current_scope?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#71 + def declared_forward_args?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#129 + def empty?; end + + # source://parser//lib/parser/static_environment.rb#33 + def extend_dynamic; end + + # source://parser//lib/parser/static_environment.rb#26 + def extend_static; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#89 + def parent_has_anonymous_blockarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#125 + def parent_has_anonymous_kwrestarg?; end + + # @return [Boolean] + # + # source://parser//lib/parser/static_environment.rb#107 + def parent_has_anonymous_restarg?; end + + # source://parser//lib/parser/static_environment.rb#21 + def reset; end + + # source://parser//lib/parser/static_environment.rb#49 + def unextend; end +end + +# source://parser//lib/parser/static_environment.rb#15 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#14 +Parser::StaticEnvironment::ANONYMOUS_BLOCKARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#12 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#11 +Parser::StaticEnvironment::ANONYMOUS_KWRESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#9 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#8 +Parser::StaticEnvironment::ANONYMOUS_RESTARG_IN_CURRENT_SCOPE = T.let(T.unsafe(nil), Symbol) + +# source://parser//lib/parser/static_environment.rb#6 +Parser::StaticEnvironment::FORWARD_ARGS = T.let(T.unsafe(nil), Symbol) + +# {Parser::SyntaxError} is raised whenever parser detects a syntax error, +# similar to the standard SyntaxError class. +# +# @api public +# +# source://parser//lib/parser/syntax_error.rb#13 +class Parser::SyntaxError < ::StandardError + # @api public + # @return [SyntaxError] a new instance of SyntaxError + # + # source://parser//lib/parser/syntax_error.rb#16 + def initialize(diagnostic); end + + # @api public + # @return [Parser::Diagnostic] + # + # source://parser//lib/parser/syntax_error.rb#14 + def diagnostic; end +end + +# {Parser::TreeRewriter} offers a basic API that makes it easy to rewrite +# existing ASTs. It's built on top of {Parser::AST::Processor} and +# {Parser::Source::TreeRewriter} +# +# For example, assume you want to remove `do` tokens from a while statement. +# You can do this as following: +# +# require 'parser/current' +# +# class RemoveDo < Parser::TreeRewriter +# def on_while(node) +# # Check if the statement starts with "do" +# if node.location.begin.is?('do') +# remove(node.location.begin) +# end +# end +# end +# +# code = <<-EOF +# while true do +# puts 'hello' +# end +# EOF +# +# ast = Parser::CurrentRuby.parse code +# buffer = Parser::Source::Buffer.new('(example)', source: code) +# rewriter = RemoveDo.new +# +# # Rewrite the AST, returns a String with the new form. +# puts rewriter.rewrite(buffer, ast) +# +# This would result in the following Ruby code: +# +# while true +# puts 'hello' +# end +# +# Keep in mind that {Parser::TreeRewriter} does not take care of indentation when +# inserting/replacing code so you'll have to do this yourself. +# +# See also [a blog entry](http://whitequark.org/blog/2013/04/26/lets-play-with-ruby-code/) +# describing rewriters in greater detail. +# +# @api public +# +# source://parser//lib/parser/tree_rewriter.rb#51 +class Parser::TreeRewriter < ::Parser::AST::Processor + # Returns `true` if the specified node is an assignment node, returns false + # otherwise. + # + # @api public + # @param node [Parser::AST::Node] + # @return [Boolean] + # + # source://parser//lib/parser/tree_rewriter.rb#79 + def assignment?(node); end + + # Inserts new code after the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#118 + def insert_after(range, content); end + + # Inserts new code before the given source range. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#108 + def insert_before(range, content); end + + # Removes the source range. + # + # @api public + # @param range [Parser::Source::Range] + # + # source://parser//lib/parser/tree_rewriter.rb#88 + def remove(range); end + + # Replaces the code of the source range `range` with `content`. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#128 + def replace(range, content); end + + # Rewrites the AST/source buffer and returns a String containing the new + # version. + # + # @api public + # @param source_buffer [Parser::Source::Buffer] + # @param ast [Parser::AST::Node] + # @param crossing_deletions:, [Symbol] different_replacements:, swallowed_insertions: + # policy arguments for TreeRewriter (optional) + # @return [String] + # + # source://parser//lib/parser/tree_rewriter.rb#62 + def rewrite(source_buffer, ast, **policy); end + + # Wraps the given source range with the given values. + # + # @api public + # @param range [Parser::Source::Range] + # @param content [String] + # + # source://parser//lib/parser/tree_rewriter.rb#98 + def wrap(range, before, after); end +end + +# {Parser::UnknownEncodingInMagicComment} is raised when a magic encoding +# comment is encountered that the currently running Ruby version doesn't +# recognize. It inherits from {ArgumentError} since that is the exception +# Ruby itself raises when trying to execute a file with an unknown encoding. +# As such, it is also not a {Parser::SyntaxError}. +# +# @api public +# +# source://parser//lib/parser/unknown_encoding_in_magic_comment_error.rb#13 +class Parser::UnknownEncodingInMagicComment < ::ArgumentError; end + +# source://parser//lib/parser/version.rb#4 +Parser::VERSION = T.let(T.unsafe(nil), String) + +# source://parser//lib/parser/variables_stack.rb#5 +class Parser::VariablesStack + # @return [VariablesStack] a new instance of VariablesStack + # + # source://parser//lib/parser/variables_stack.rb#6 + def initialize; end + + # source://parser//lib/parser/variables_stack.rb#27 + def declare(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/variables_stack.rb#31 + def declared?(name); end + + # @return [Boolean] + # + # source://parser//lib/parser/variables_stack.rb#11 + def empty?; end + + # source://parser//lib/parser/variables_stack.rb#19 + def pop; end + + # source://parser//lib/parser/variables_stack.rb#15 + def push; end + + # source://parser//lib/parser/variables_stack.rb#23 + def reset; end +end diff --git a/sorbet/rbi/gems/prism@1.2.0.rbi b/sorbet/rbi/gems/prism@1.2.0.rbi new file mode 100644 index 0000000..c6c606d --- /dev/null +++ b/sorbet/rbi/gems/prism@1.2.0.rbi @@ -0,0 +1,39085 @@ +# 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. +# +# In the extremely rare case that a source includes multi-byte characters but +# is marked as binary because of a magic encoding comment and it cannot be +# eagerly converted to UTF-8, this class will be used as well. This is because +# at that point we will treat everything as single-byte characters. +# +# source://prism//lib/prism/parse_result.rb#236 +class Prism::ASCIISource < ::Prism::Source + # Return the column number in characters for the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#243 + 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#238 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Returns a cache that is the identity function in order to maintain the + # same interface. We can do this because code units are always equivalent to + # byte offsets for ASCII-only sources. + # + # source://prism//lib/prism/parse_result.rb#260 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # Specialized version of `code_units_column` that does not depend on + # `code_units_offset`, which is a more expensive operation. This is + # essentially the same as `Prism::Source#column`. + # + # source://prism//lib/prism/parse_result.rb#267 + 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#253 + 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 + 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 + ).void + end + 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 + 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#245 + 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#255 + 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#250 + sig { override.returns(T::Array[Prism::Node]) } + 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 + sig do + params( + 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 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 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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 + 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#300 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#295 + sig { returns(String) } + def keyword; end + + # The location of the `alias` keyword. + # + # alias $foo $bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#288 + sig { returns(Prism::Location) } + 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 + sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } + 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 + sig do + returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) + end + 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 + 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 + ).void + end + 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#426 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#341 + 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#346 + 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#356 + 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#351 + sig { override.returns(T::Array[Prism::Node]) } + 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 + sig do + params( + 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 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 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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 + 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#410 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#405 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#398 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Represents the new name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#383 + sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } + def new_name; end + + # Represents the old name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#395 + sig do + returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) + end + def old_name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#415 + 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#420 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#438 +class Prism::AlternationPatternNode < ::Prism::Node + # Initialize a new AlternationPatternNode node. + # + # @return [AlternationPatternNode] a new instance of AlternationPatternNode + # + # source://prism//lib/prism/node.rb#440 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: 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#527 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#451 + 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#456 + 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#466 + 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#461 + 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) -> AlternationPatternNode + # + # source://prism//lib/prism/node.rb#471 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + 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#456 + 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#479 + 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#511 + sig { override.returns(String) } + def inspect; end + + # Represents the left side of the expression. + # + # foo => bar | baz + # ^^^ + # + # source://prism//lib/prism/node.rb#487 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#506 + sig { returns(String) } + def operator; end + + # Represents the alternation operator location. + # + # foo => bar | baz + # ^ + # + # source://prism//lib/prism/node.rb#499 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # foo => bar | baz + # ^^^ + # + # source://prism//lib/prism/node.rb#493 + sig { returns(Prism::Node) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#516 + 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#521 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#539 +class Prism::AndNode < ::Prism::Node + # Initialize a new AndNode node. + # + # @return [AndNode] a new instance of AndNode + # + # source://prism//lib/prism/node.rb#541 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: 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#634 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#552 + 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#557 + 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#567 + 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#562 + 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) -> AndNode + # + # source://prism//lib/prism/node.rb#572 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + 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#557 + 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#580 + 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#618 + 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#591 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#613 + sig { returns(String) } + def operator; end + + # The location of the `and` keyword or the `&&` operator. + # + # left and right + # ^^^ + # + # source://prism//lib/prism/node.rb#606 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # left && right + # ^^^^^ + # + # 1 and 2 + # ^ + # + # source://prism//lib/prism/node.rb#600 + sig { returns(Prism::Node) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#623 + 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#628 + 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#646 +class Prism::ArgumentsNode < ::Prism::Node + # Initialize a new ArgumentsNode node. + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # source://prism//lib/prism/node.rb#648 + 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#734 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#657 + 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#715 + sig { returns(T::Array[Prism::Node]) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#662 + 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#672 + 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#667 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_forwarding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#690 + sig { returns(T::Boolean) } + def contains_forwarding?; end + + # def contains_keyword_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#700 + sig { returns(T::Boolean) } + def contains_keyword_splat?; end + + # def contains_keywords?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#695 + sig { returns(T::Boolean) } + def contains_keywords?; end + + # def contains_multiple_splats?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#710 + sig { returns(T::Boolean) } + def contains_multiple_splats?; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#705 + 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#677 + 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#662 + 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#685 + 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#718 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#723 + 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#728 + def type; end + end +end + +# Flags for arguments nodes. +# +# source://prism//lib/prism/node.rb#16684 +module Prism::ArgumentsNodeFlags; end + +# if the arguments contain forwarding +# +# source://prism//lib/prism/node.rb#16686 +Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) + +# if the arguments contain keywords +# +# source://prism//lib/prism/node.rb#16689 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a keyword splat +# +# source://prism//lib/prism/node.rb#16692 +Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) + +# if the arguments contain multiple splats +# +# source://prism//lib/prism/node.rb#16698 +Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a splat +# +# source://prism//lib/prism/node.rb#16695 +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#746 +class Prism::ArrayNode < ::Prism::Node + # Initialize a new ArrayNode node. + # + # @return [ArrayNode] a new instance of ArrayNode + # + # source://prism//lib/prism/node.rb#748 + 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#862 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#759 + 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#764 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#841 + 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#823 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#774 + 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#769 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#792 + 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#779 + 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#764 + 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#787 + 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#797 + 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#846 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#836 + 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#805 + 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#851 + 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#856 + def type; end + end +end + +# Flags for array nodes. +# +# source://prism//lib/prism/node.rb#16702 +module Prism::ArrayNodeFlags; end + +# if array contains splat nodes +# +# source://prism//lib/prism/node.rb#16704 +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#888 +class Prism::ArrayPatternNode < ::Prism::Node + # Initialize a new ArrayPatternNode node. + # + # @return [ArrayPatternNode] a new instance of ArrayPatternNode + # + # source://prism//lib/prism/node.rb#890 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + 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) + ).void + end + 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#1006 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#904 + 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#909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#985 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#967 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#924 + 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#914 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil + # + # source://prism//lib/prism/node.rb#942 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode + # + # source://prism//lib/prism/node.rb#929 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + 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 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#909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#937 + 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#990 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#980 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#954 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader posts: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#951 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#945 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#948 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#995 + 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#1000 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#1023 +class Prism::AssocNode < ::Prism::Node + # Initialize a new AssocNode node. + # + # @return [AssocNode] a new instance of AssocNode + # + # source://prism//lib/prism/node.rb#1025 + 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) + ).void + end + 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#1127 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1036 + 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#1041 + 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#1051 + 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#1046 + sig { override.returns(T::Array[Prism::Node]) } + 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#1056 + sig do + params( + 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 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#1041 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#1064 + 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#1111 + 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#1078 + sig { returns(Prism::Node) } + def key; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#1106 + sig { returns(T.nilable(String)) } + def operator; end + + # The location of the `=>` operator, if present. + # + # { foo => bar } + # ^^ + # + # source://prism//lib/prism/node.rb#1093 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1116 + 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#1087 + 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#1121 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1139 +class Prism::AssocSplatNode < ::Prism::Node + # Initialize a new AssocSplatNode node. + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # source://prism//lib/prism/node.rb#1141 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + 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#1223 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1151 + 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#1156 + 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#1168 + 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#1161 + sig { override.returns(T::Array[Prism::Node]) } + 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#1173 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end + 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#1156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#1181 + 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#1207 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1202 + sig { returns(String) } + def operator; end + + # The location of the `**` operator. + # + # { **x } + # ^^ + # + # source://prism//lib/prism/node.rb#1195 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1212 + 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#1189 + sig { returns(T.nilable(Prism::Node)) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#1217 + 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#1234 +class Prism::BackReferenceReadNode < ::Prism::Node + # Initialize a new BackReferenceReadNode node. + # + # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1236 + 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#1301 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1245 + 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#1250 + 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#1260 + 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#1255 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode + # + # source://prism//lib/prism/node.rb#1265 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + 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#1250 + 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#1273 + 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#1285 + 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#1282 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1290 + 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#1295 + 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#1313 +class Prism::BeginNode < ::Prism::Node + # Initialize a new BeginNode node. + # + # @return [BeginNode] a new instance of BeginNode + # + # source://prism//lib/prism/node.rb#1315 + 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) + ).void + end + 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#1431 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1329 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1405 + sig { returns(T.nilable(String)) } + def begin_keyword; end + + # attr_reader begin_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1367 + sig { returns(T.nilable(Prism::Location)) } + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1334 + 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#1349 + 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#1339 + sig { override.returns(T::Array[Prism::Node]) } + 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#1354 + sig do + params( + 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 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#1334 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#1362 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#1386 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#1410 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#1392 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # source://prism//lib/prism/node.rb#1389 + sig { returns(T.nilable(Prism::EnsureNode)) } + def ensure_clause; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1415 + 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#1383 + sig { returns(T.nilable(Prism::RescueNode)) } + def rescue_clause; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#1380 + 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#1420 + 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#1425 + def type; end + end +end + +# Represents a block argument using `&`. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1446 +class Prism::BlockArgumentNode < ::Prism::Node + # Initialize a new BlockArgumentNode node. + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # source://prism//lib/prism/node.rb#1448 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end + 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#1524 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1458 + 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#1463 + 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#1475 + 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#1468 + sig { override.returns(T::Array[Prism::Node]) } + 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#1480 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + 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#1463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#1488 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node? + # + # source://prism//lib/prism/node.rb#1493 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#1508 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1503 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1496 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1513 + 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#1518 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# source://prism//lib/prism/node.rb#1535 +class Prism::BlockLocalVariableNode < ::Prism::Node + # Initialize a new BlockLocalVariableNode node. + # + # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode + # + # source://prism//lib/prism/node.rb#1537 + 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#1603 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1546 + 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#1551 + 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#1561 + 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#1556 + 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#1566 + 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#1551 + 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#1574 + 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#1587 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1584 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1579 + 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#1592 + 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#1597 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1614 +class Prism::BlockNode < ::Prism::Node + # Initialize a new BlockNode node. + # + # @return [BlockNode] a new instance of BlockNode + # + # source://prism//lib/prism/node.rb#1616 + 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 + ).void + end + 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#1714 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1629 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#1671 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1634 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#1693 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#1681 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1647 + 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#1639 + sig { override.returns(T::Array[Prism::Node]) } + 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#1652 + sig do + params( + 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 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#1634 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#1660 + 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#1698 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#1665 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#1688 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#1674 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil + # + # source://prism//lib/prism/node.rb#1668 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } + def parameters; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1703 + 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#1708 + 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#1730 +class Prism::BlockParameterNode < ::Prism::Node + # Initialize a new BlockParameterNode node. + # + # @return [BlockParameterNode] a new instance of BlockParameterNode + # + # source://prism//lib/prism/node.rb#1732 + 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#1825 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1743 + 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#1748 + 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#1758 + 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#1753 + 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#1763 + 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#1748 + 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#1771 + 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#1809 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#1781 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#1784 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1804 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1797 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1776 + 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#1814 + 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#1819 + 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#1842 +class Prism::BlockParametersNode < ::Prism::Node + # Initialize a new BlockParametersNode node. + # + # @return [BlockParametersNode] a new instance of BlockParametersNode + # + # source://prism//lib/prism/node.rb#1844 + 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) + ).void + end + 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#1950 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1856 + 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#1861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#1929 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#1911 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#1874 + 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#1866 + sig { override.returns(T::Array[Prism::Node]) } + 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#1879 + sig do + params( + 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 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#1861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#1887 + 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#1934 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[BlockLocalVariableNode] + # + # source://prism//lib/prism/node.rb#1895 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } + def locals; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#1924 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#1898 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#1892 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#1939 + 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#1944 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1964 +class Prism::BreakNode < ::Prism::Node + # Initialize a new BreakNode node. + # + # @return [BreakNode] a new instance of BreakNode + # + # source://prism//lib/prism/node.rb#1966 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end + 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#2048 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#1976 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # break foo + # ^^^ + # + # source://prism//lib/prism/node.rb#2014 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#1981 + 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#1993 + 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#1986 + sig { override.returns(T::Array[Prism::Node]) } + 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#1998 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end + 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#1981 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#2006 + 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#2032 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#2027 + sig { returns(String) } + def keyword; end + + # The location of the `break` keyword. + # + # break foo + # ^^^^^ + # + # source://prism//lib/prism/node.rb#2020 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2037 + 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#2042 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2059 +class Prism::CallAndWriteNode < ::Prism::Node + # Initialize a new CallAndWriteNode node. + # + # @return [CallAndWriteNode] a new instance of CallAndWriteNode + # + # source://prism//lib/prism/node.rb#2061 + 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#2208 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2076 + 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#2122 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2177 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2135 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2081 + 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#2094 + 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#2086 + 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#2099 + 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#2081 + 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#2107 + 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#2127 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2192 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2182 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2148 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2187 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2167 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2161 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2132 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2112 + 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#2197 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2174 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2117 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2164 + 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#2202 + 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#2240 +class Prism::CallNode < ::Prism::Node + # Initialize a new CallNode node. + # + # @return [CallNode] a new instance of CallNode + # + # source://prism//lib/prism/node.rb#2242 + 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(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).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#2424 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2258 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#2369 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2305 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockNode | BlockArgumentNode | nil + # + # source://prism//lib/prism/node.rb#2385 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2388 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2327 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2263 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#2403 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#2372 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2277 + 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#2268 + 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: BlockNode | BlockArgumentNode | nil) -> CallNode + # + # source://prism//lib/prism/node.rb#2282 + 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(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).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#2263 + 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: BlockNode | BlockArgumentNode | nil } + # + # source://prism//lib/prism/node.rb#2290 + 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#2310 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2408 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2393 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2343 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2340 + sig { returns(Symbol) } + def name; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#2398 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#2356 + 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#2324 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2295 + 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#2413 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2300 + 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#2418 + def type; end + end +end + +# Flags for call nodes. +# +# source://prism//lib/prism/node.rb#16708 +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#16716 +Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) + +# a call that ignores method visibility +# +# source://prism//lib/prism/node.rb#16719 +Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) + +# &. operator +# +# source://prism//lib/prism/node.rb#16710 +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#16713 +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#2442 +class Prism::CallOperatorWriteNode < ::Prism::Node + # Initialize a new CallOperatorWriteNode node. + # + # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode + # + # source://prism//lib/prism/node.rb#2444 + 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#2590 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2460 + 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#2506 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#2551 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#2554 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2564 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2519 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2465 + 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#2478 + 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#2470 + 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#2483 + 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#2465 + 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#2491 + 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#2511 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2574 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2569 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2532 + 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#2545 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2516 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2496 + 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#2579 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2561 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2501 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2548 + 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#2584 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2608 +class Prism::CallOrWriteNode < ::Prism::Node + # Initialize a new CallOrWriteNode node. + # + # @return [CallOrWriteNode] a new instance of CallOrWriteNode + # + # source://prism//lib/prism/node.rb#2610 + 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#2757 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2625 + 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#2671 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#2726 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#2684 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2630 + 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#2643 + 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#2635 + 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#2648 + 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#2630 + 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#2656 + 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#2676 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2741 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String? + # + # source://prism//lib/prism/node.rb#2731 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # source://prism//lib/prism/node.rb#2697 + sig { returns(T.nilable(Prism::Location)) } + def message_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2736 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2716 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader read_name: Symbol + # + # source://prism//lib/prism/node.rb#2710 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2681 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2661 + 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#2746 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2723 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2666 + sig { returns(T::Boolean) } + def variable_call?; end + + # attr_reader write_name: Symbol + # + # source://prism//lib/prism/node.rb#2713 + 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#2751 + 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#2782 +class Prism::CallTargetNode < ::Prism::Node + # Initialize a new CallTargetNode node. + # + # @return [CallTargetNode] a new instance of CallTargetNode + # + # source://prism//lib/prism/node.rb#2784 + 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#2895 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2796 + 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#2839 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String + # + # source://prism//lib/prism/node.rb#2869 + sig { returns(String) } + def call_operator; end + + # attr_reader call_operator_loc: Location + # + # source://prism//lib/prism/node.rb#2852 + sig { returns(Prism::Location) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2801 + 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#2811 + 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#2806 + 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#2816 + 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#2801 + 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#2824 + 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#2844 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#2879 + sig { override.returns(String) } + def inspect; end + + # def message: () -> String + # + # source://prism//lib/prism/node.rb#2874 + sig { returns(String) } + def message; end + + # attr_reader message_loc: Location + # + # source://prism//lib/prism/node.rb#2862 + sig { returns(Prism::Location) } + def message_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#2859 + sig { returns(Symbol) } + def name; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#2849 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2829 + 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#2884 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2834 + 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#2889 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2909 +class Prism::CapturePatternNode < ::Prism::Node + # Initialize a new CapturePatternNode node. + # + # @return [CapturePatternNode] a new instance of CapturePatternNode + # + # source://prism//lib/prism/node.rb#2911 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).void + end + 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#2989 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#2922 + 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#2927 + 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#2937 + 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#2932 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode + # + # source://prism//lib/prism/node.rb#2942 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end + 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#2927 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#2950 + 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#2973 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#2968 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2961 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#2958 + sig { returns(Prism::LocalVariableTargetNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#2978 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2955 + 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#2983 + 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#3003 +class Prism::CaseMatchNode < ::Prism::Node + # Initialize a new CaseMatchNode node. + # + # @return [CaseMatchNode] a new instance of CaseMatchNode + # + # source://prism//lib/prism/node.rb#3005 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end + 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#3104 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3018 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3078 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3064 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3023 + 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#3037 + 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#3028 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[InNode] + # + # source://prism//lib/prism/node.rb#3058 + sig { returns(T::Array[Prism::InNode]) } + 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[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode + # + # source://prism//lib/prism/node.rb#3042 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end + 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#3023 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#3050 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#3061 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3083 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3071 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3088 + sig { override.returns(String) } + def inspect; end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3055 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3093 + 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#3098 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# when false +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3121 +class Prism::CaseNode < ::Prism::Node + # Initialize a new CaseNode node. + # + # @return [CaseNode] a new instance of CaseNode + # + # source://prism//lib/prism/node.rb#3123 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end + 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#3222 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3136 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3196 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3182 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3141 + 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#3155 + 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#3146 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[WhenNode] + # + # source://prism//lib/prism/node.rb#3176 + sig { returns(T::Array[Prism::WhenNode]) } + 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[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode + # + # source://prism//lib/prism/node.rb#3160 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end + 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#3141 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#3168 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#3179 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3201 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3189 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3206 + sig { override.returns(String) } + def inspect; end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3173 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3211 + 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#3216 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3237 +class Prism::ClassNode < ::Prism::Node + # Initialize a new ClassNode node. + # + # @return [ClassNode] a new instance of ClassNode + # + # source://prism//lib/prism/node.rb#3239 + 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: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end + 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#3365 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3255 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#3321 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3334 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3295 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#3274 + 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#3265 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode + # + # source://prism//lib/prism/node.rb#3302 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } + def constant_path; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode + # + # source://prism//lib/prism/node.rb#3279 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end + 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#3260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#3287 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#3344 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#3324 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inheritance_operator: () -> String? + # + # source://prism//lib/prism/node.rb#3339 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#3305 + sig { returns(T.nilable(Prism::Location)) } + def inheritance_operator_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3349 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#3292 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3331 + sig { returns(Symbol) } + def name; end + + # attr_reader superclass: Prism::node? + # + # source://prism//lib/prism/node.rb#3318 + sig { returns(T.nilable(Prism::Node)) } + def superclass; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3354 + 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#3359 + 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#3383 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # Initialize a new ClassVariableAndWriteNode node. + # + # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3385 + 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#3471 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3397 + 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#3402 + 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#3412 + 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#3407 + 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) -> ClassVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#3417 + 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::ClassVariableAndWriteNode) + 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#3402 + 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#3425 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#164 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3455 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3430 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3433 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3450 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3440 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3460 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3447 + 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#3465 + 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#3484 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # Initialize a new ClassVariableOperatorWriteNode node. + # + # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3486 + 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 + ).void + end + 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#3571 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3499 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#3552 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#3542 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#3504 + 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#3514 + 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#3509 + 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, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#3519 + sig do + params( + 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 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#3504 + 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, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#3527 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#176 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3555 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3532 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3535 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#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#3560 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3549 + 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#3565 + 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#3585 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # Initialize a new ClassVariableOrWriteNode node. + # + # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#3587 + 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#3673 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3599 + 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#3604 + 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#3614 + 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#3609 + 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) -> ClassVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#3619 + 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::ClassVariableOrWriteNode) + 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#3604 + 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#3627 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#170 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#3657 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3632 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#3635 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3652 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3642 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3662 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3649 + 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#3667 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# source://prism//lib/prism/node.rb#3686 +class Prism::ClassVariableReadNode < ::Prism::Node + # Initialize a new ClassVariableReadNode node. + # + # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#3688 + 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#3753 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3697 + 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#3702 + 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#3712 + 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#3707 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode + # + # source://prism//lib/prism/node.rb#3717 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + 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#3702 + 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#3725 + 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#3737 + 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#3734 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3742 + 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#3747 + 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#3763 +class Prism::ClassVariableTargetNode < ::Prism::Node + # Initialize a new ClassVariableTargetNode node. + # + # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#3765 + 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#3826 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3774 + 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#3779 + 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#3789 + 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#3784 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode + # + # source://prism//lib/prism/node.rb#3794 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + 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#3779 + 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#3802 + 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#3810 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3807 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3815 + 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#3820 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3836 +class Prism::ClassVariableWriteNode < ::Prism::Node + # Initialize a new ClassVariableWriteNode node. + # + # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#3838 + 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 + ).void + end + 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#3940 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3850 + 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#3855 + 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#3865 + 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#3860 + 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, ?operator_loc: Location) -> ClassVariableWriteNode + # + # source://prism//lib/prism/node.rb#3870 + sig do + params( + 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 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#3855 + 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, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#3878 + 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#3924 + 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#3887 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @@foo = :bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#3893 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3919 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @@foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#3912 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#3929 + 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#3906 + 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#3934 + def type; end + end +end + +# A cache that can be used to quickly compute code unit offsets from byte +# offsets. It purposefully provides only a single #[] method to access the +# cache in order to minimize surface area. +# +# Note that there are some known issues here that may or may not be addressed +# in the future: +# +# * The first is that there are issues when the cache computes values that are +# not on character boundaries. This can result in subsequent computations +# being off by one or more code units. +# * The second is that this cache is currently unbounded. In theory we could +# introduce some kind of LRU cache to limit the number of entries, but this +# has not yet been implemented. +# +# source://prism//lib/prism/parse_result.rb#172 +class Prism::CodeUnitsCache + # Initialize a new cache with the given source and encoding. + # + # @return [CodeUnitsCache] a new instance of CodeUnitsCache + # + # source://prism//lib/prism/parse_result.rb#198 + sig { params(source: String, encoding: Encoding).void } + def initialize(source, encoding); end + + # Retrieve the code units offset from the given byte offset. + # + # source://prism//lib/prism/parse_result.rb#212 + sig { params(byte_offset: Integer).returns(Integer) } + def [](byte_offset); end +end + +# source://prism//lib/prism/parse_result.rb#184 +class Prism::CodeUnitsCache::LengthCounter + # @return [LengthCounter] a new instance of LengthCounter + # + # source://prism//lib/prism/parse_result.rb#185 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#190 + def count(byte_offset, byte_length); end +end + +# source://prism//lib/prism/parse_result.rb#173 +class Prism::CodeUnitsCache::UTF16Counter + # @return [UTF16Counter] a new instance of UTF16Counter + # + # source://prism//lib/prism/parse_result.rb#174 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#179 + def count(byte_offset, byte_length); 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#507 +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#512 + 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#517 + 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#509 + 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#522 + 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#3953 +class Prism::ConstantAndWriteNode < ::Prism::Node + # Initialize a new ConstantAndWriteNode node. + # + # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#3955 + 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#4041 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#3967 + 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#3972 + 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#3982 + 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#3977 + 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) -> ConstantAndWriteNode + # + # source://prism//lib/prism/node.rb#3987 + 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::ConstantAndWriteNode) + 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#3972 + 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#3995 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#182 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4025 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4000 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4003 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4020 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4010 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4030 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4017 + 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#4035 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4054 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # Initialize a new ConstantOperatorWriteNode node. + # + # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4056 + 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 + ).void + end + 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#4141 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4069 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#4122 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#4112 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4074 + 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#4084 + 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#4079 + 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, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4089 + sig do + params( + 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 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#4074 + 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, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#4097 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#194 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4125 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4102 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4105 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#371 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#378 + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4130 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4119 + 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#4135 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4155 +class Prism::ConstantOrWriteNode < ::Prism::Node + # Initialize a new ConstantOrWriteNode node. + # + # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4157 + 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#4243 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4169 + 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#4174 + 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#4184 + 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#4179 + 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) -> ConstantOrWriteNode + # + # source://prism//lib/prism/node.rb#4189 + 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::ConstantOrWriteNode) + 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#4174 + 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#4197 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#188 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#4227 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4202 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4205 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4222 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4212 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4232 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4219 + 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#4237 + 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#4256 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # Initialize a new ConstantPathAndWriteNode node. + # + # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode + # + # source://prism//lib/prism/node.rb#4258 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + 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#4336 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4269 + 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#4274 + 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#4284 + 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#4279 + sig { override.returns(T::Array[Prism::Node]) } + 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#4289 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end + 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#4274 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#4297 + 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#4320 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4315 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4305 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4302 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4325 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4312 + 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#4330 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4348 +class Prism::ConstantPathNode < ::Prism::Node + # Initialize a new ConstantPathNode node. + # + # @return [ConstantPathNode] a new instance of ConstantPathNode + # + # source://prism//lib/prism/node.rb#4350 + 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 + ).void + end + 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#4459 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4362 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#202 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4367 + 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#4379 + 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#4372 + sig { override.returns(T::Array[Prism::Node]) } + 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#4384 + sig do + params( + 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 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#4367 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#4392 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#4438 + sig { returns(String) } + def delimiter; end + + # The location of the `::` delimiter. + # + # ::Foo + # ^^ + # + # One::Two + # ^^ + # + # source://prism//lib/prism/node.rb#4418 + sig { returns(Prism::Location) } + def delimiter_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#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#4443 + 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#4409 + sig { returns(T.nilable(Symbol)) } + def name; end + + # The location of the name of the constant. + # + # ::Foo + # ^^^ + # + # One::Two + # ^^^ + # + # source://prism//lib/prism/node.rb#4431 + sig { returns(Prism::Location) } + def name_loc; end + + # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. + # + # Foo::Bar + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^^^ + # + # source://prism//lib/prism/node.rb#4406 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4448 + 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#4453 + 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#4472 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # Initialize a new ConstantPathOperatorWriteNode node. + # + # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode + # + # source://prism//lib/prism/node.rb#4474 + 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 + ).void + end + 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#4551 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4486 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#4532 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#4522 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4491 + 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#4501 + 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#4496 + sig { override.returns(T::Array[Prism::Node]) } + 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#4506 + sig do + params( + 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 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#4491 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#4514 + 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#4535 + 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#4519 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4540 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4529 + 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#4545 + 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#4564 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # Initialize a new ConstantPathOrWriteNode node. + # + # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode + # + # source://prism//lib/prism/node.rb#4566 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + 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#4644 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4577 + 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#4582 + 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#4592 + 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#4587 + sig { override.returns(T::Array[Prism::Node]) } + 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#4597 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end + 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#4582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#4605 + 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#4628 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4623 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4613 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#4610 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4633 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4620 + 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#4638 + 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#4656 +class Prism::ConstantPathTargetNode < ::Prism::Node + # Initialize a new ConstantPathTargetNode node. + # + # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode + # + # source://prism//lib/prism/node.rb#4658 + 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 + ).void + end + 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#4746 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4670 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # Previously, we had a child node on this class that contained either a + # constant read or a missing node. To not cause a breaking change, we + # continue to supply that API. + # + # source://prism//lib/prism/node_ext.rb#243 + def child; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#4675 + 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#4687 + 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#4680 + sig { override.returns(T::Array[Prism::Node]) } + 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#4692 + sig do + params( + 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 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#4675 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#4700 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def delimiter: () -> String + # + # source://prism//lib/prism/node.rb#4725 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # source://prism//lib/prism/node.rb#4711 + sig { returns(Prism::Location) } + def delimiter_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#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#4730 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#4708 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4718 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader parent: Prism::node? + # + # source://prism//lib/prism/node.rb#4705 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4735 + 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#4740 + 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#4765 +class Prism::ConstantPathWriteNode < ::Prism::Node + # Initialize a new ConstantPathWriteNode node. + # + # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode + # + # source://prism//lib/prism/node.rb#4767 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + 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#4857 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4778 + 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#4783 + 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#4793 + 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#4788 + sig { override.returns(T::Array[Prism::Node]) } + 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#4798 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end + 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#4783 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#4806 + 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#4841 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4836 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # ::ABC = 123 + # ^ + # + # source://prism//lib/prism/node.rb#4823 + sig { returns(Prism::Location) } + def operator_loc; end + + # A node representing the constant path being written to. + # + # Foo::Bar = 1 + # ^^^^^^^^ + # + # ::Foo = :abc + # ^^^^^ + # + # source://prism//lib/prism/node.rb#4817 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4846 + 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#4833 + 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#4851 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# source://prism//lib/prism/node.rb#4869 +class Prism::ConstantReadNode < ::Prism::Node + # Initialize a new ConstantReadNode node. + # + # @return [ConstantReadNode] a new instance of ConstantReadNode + # + # source://prism//lib/prism/node.rb#4871 + 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#4936 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4880 + 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#4885 + 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#4895 + 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#4890 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode + # + # source://prism//lib/prism/node.rb#4900 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + 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#4885 + 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#4908 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#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#4920 + 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#4917 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4925 + 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#4930 + 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#4946 +class Prism::ConstantTargetNode < ::Prism::Node + # Initialize a new ConstantTargetNode node. + # + # @return [ConstantTargetNode] a new instance of ConstantTargetNode + # + # source://prism//lib/prism/node.rb#4948 + 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#5009 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#4957 + 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#4962 + 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#4972 + 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#4967 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode + # + # source://prism//lib/prism/node.rb#4977 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + 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#4962 + 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#4985 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#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#4993 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4990 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4998 + 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#5003 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#5019 +class Prism::ConstantWriteNode < ::Prism::Node + # Initialize a new ConstantWriteNode node. + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5021 + 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 + ).void + end + 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#5123 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5033 + 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#5038 + 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#5048 + 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#5043 + 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, ?operator_loc: Location) -> ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5053 + sig do + params( + 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 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#5038 + 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, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#5061 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#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#5107 + 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#5070 + sig { returns(Symbol) } + def name; end + + # The location of the constant name. + # + # FOO = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#5076 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5102 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # FOO = :bar + # ^ + # + # source://prism//lib/prism/node.rb#5095 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5112 + 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#5089 + 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#5117 + 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#844 + 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(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + 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(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).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#852 + 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::LocalVariableTargetNode, + 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::InNode], + 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::WhenNode], + 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: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + 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(T.any(Prism::StatementsNode, Prism::BeginNode)), + 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: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).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#863 + 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(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + 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: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + 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(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + 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: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).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::BlockArgumentNode), + 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::BlockArgumentNode), + 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::BlockArgumentNode), + 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::BlockArgumentNode) + ).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#872 + 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#883 + 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#892 + 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(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).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#900 + 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: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + 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, Prism::NumberedReferenceReadNode)], + 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, 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::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + 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#908 + 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: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + 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#916 + 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#924 + 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(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + 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#942 + 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(T.any(Prism::StatementsNode, Prism::BeginNode)), + 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#952 + 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(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).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#963 + 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#982 + 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#988 + 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#976 + sig { returns(Prism::Source) } + def default_source; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5137 +class Prism::DefNode < ::Prism::Node + # Initialize a new DefNode node. + # + # @return [DefNode] a new instance of DefNode + # + # source://prism//lib/prism/node.rb#5139 + 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(T.any(Prism::StatementsNode, Prism::BeginNode)), + 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) + ).void + end + 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#5336 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5159 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#5212 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5164 + 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#5178 + 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#5169 + 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, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?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#5183 + sig do + params( + 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(T.any(Prism::StatementsNode, Prism::BeginNode)), + 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 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#5164 + 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, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, 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#5191 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def def_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5290 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5218 + sig { returns(Prism::Location) } + def def_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5315 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5277 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def equal: () -> String? + # + # source://prism//lib/prism/node.rb#5310 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # source://prism//lib/prism/node.rb#5264 + sig { returns(T.nilable(Prism::Location)) } + def equal_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5320 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#5215 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#5300 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5238 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#5196 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5199 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#5295 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#5225 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#5209 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#5206 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#5305 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5251 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5325 + 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#5330 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5358 +class Prism::DefinedNode < ::Prism::Node + # Initialize a new DefinedNode node. + # + # @return [DefinedNode] a new instance of DefinedNode + # + # source://prism//lib/prism/node.rb#5360 + 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 + ).void + end + 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#5472 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5372 + 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#5377 + 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#5387 + 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#5382 + sig { override.returns(T::Array[Prism::Node]) } + 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#5392 + sig do + params( + 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 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#5377 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#5400 + 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#5456 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#5451 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5434 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#5441 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5405 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#5446 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#5421 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5461 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5418 + 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#5466 + 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#4605 + 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#4613 + 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#4624 + 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#4633 + 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#4644 + 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#4653 + 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#4661 + 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#4669 + 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#4677 + 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#4685 + 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#4703 + 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#4713 + 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#4724 + 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#5485 +class Prism::ElseNode < ::Prism::Node + # Initialize a new ElseNode node. + # + # @return [ElseNode] a new instance of ElseNode + # + # source://prism//lib/prism/node.rb#5487 + 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) + ).void + end + 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#5582 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5498 + 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#5503 + 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#5515 + 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#5508 + sig { override.returns(T::Array[Prism::Node]) } + 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#5520 + sig do + params( + 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 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#5503 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#5528 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def else_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5556 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5533 + sig { returns(Prism::Location) } + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5561 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5543 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5566 + sig { override.returns(String) } + def inspect; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5540 + 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#5571 + 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#5576 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# source://prism//lib/prism/parse_result.rb#544 +class Prism::EmbDocComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#551 + sig { returns(String) } + def inspect; end + + # This can only be true for inline comments. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#546 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#5594 +class Prism::EmbeddedStatementsNode < ::Prism::Node + # Initialize a new EmbeddedStatementsNode node. + # + # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#5596 + 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 + ).void + end + 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#5685 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5607 + 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#5612 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#5664 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#5652 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5624 + 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#5617 + sig { override.returns(T::Array[Prism::Node]) } + 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#5629 + sig do + params( + 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 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#5612 + 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, statements: StatementsNode?, closing_loc: Location } + # + # source://prism//lib/prism/node.rb#5637 + 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#5669 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#5659 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#5642 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5649 + 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#5674 + 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#5679 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://prism//lib/prism/node.rb#5697 +class Prism::EmbeddedVariableNode < ::Prism::Node + # Initialize a new EmbeddedVariableNode node. + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#5699 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).void + end + 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#5773 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5709 + 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#5714 + 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#5724 + 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#5719 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode + # + # source://prism//lib/prism/node.rb#5729 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end + 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#5714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } + # + # source://prism//lib/prism/node.rb#5737 + 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#5757 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5752 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5742 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5762 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#5749 + sig do + returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) + end + def variable; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#5767 + def type; end + end +end + +# Flags for nodes that have unescaped content. +# +# source://prism//lib/prism/node.rb#16723 +module Prism::EncodingFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#16728 +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#16725 +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#5788 +class Prism::EnsureNode < ::Prism::Node + # Initialize a new EnsureNode node. + # + # @return [EnsureNode] a new instance of EnsureNode + # + # source://prism//lib/prism/node.rb#5790 + 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 + ).void + end + 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#5879 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5801 + 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#5806 + 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#5818 + 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#5811 + sig { override.returns(T::Array[Prism::Node]) } + 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#5823 + sig do + params( + 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 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#5806 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#5831 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5858 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5846 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def ensure_keyword: () -> String + # + # source://prism//lib/prism/node.rb#5853 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5836 + sig { returns(Prism::Location) } + def ensure_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5863 + sig { override.returns(String) } + def inspect; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5843 + 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#5868 + 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#5873 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# source://prism//lib/prism/node.rb#5891 +class Prism::FalseNode < ::Prism::Node + # Initialize a new FalseNode node. + # + # @return [FalseNode] a new instance of FalseNode + # + # source://prism//lib/prism/node.rb#5893 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#5950 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5901 + 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#5906 + 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#5916 + 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#5911 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode + # + # source://prism//lib/prism/node.rb#5921 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::FalseNode) } + 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#5906 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#5929 + 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#5934 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#5939 + 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#5944 + 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#5965 +class Prism::FindPatternNode < ::Prism::Node + # Initialize a new FindPatternNode node. + # + # @return [FindPatternNode] a new instance of FindPatternNode + # + # source://prism//lib/prism/node.rb#5967 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end + 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#6083 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5981 + 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#5986 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#6062 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#6044 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6001 + 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#5991 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil + # + # source://prism//lib/prism/node.rb#6019 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode + # + # source://prism//lib/prism/node.rb#6006 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end + 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#5986 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#6014 + 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#6067 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: SplatNode + # + # source://prism//lib/prism/node.rb#6022 + sig { returns(Prism::SplatNode) } + def left; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#6057 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#6031 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#6025 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader right: SplatNode | MissingNode + # + # source://prism//lib/prism/node.rb#6028 + sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6072 + 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#6077 + 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#6099 +class Prism::FlipFlopNode < ::Prism::Node + # Initialize a new FlipFlopNode node. + # + # @return [FlipFlopNode] a new instance of FlipFlopNode + # + # source://prism//lib/prism/node.rb#6101 + 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#6187 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6112 + 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#6117 + 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#6130 + 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#6122 + 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#6135 + 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#6117 + 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#6143 + 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#6148 + 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#6171 + sig { override.returns(String) } + def inspect; end + + # attr_reader left: Prism::node? + # + # source://prism//lib/prism/node.rb#6153 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6166 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6159 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node? + # + # source://prism//lib/prism/node.rb#6156 + 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#6176 + 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#6181 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://prism//lib/prism/node.rb#6200 +class Prism::FloatNode < ::Prism::Node + # Initialize a new FloatNode node. + # + # @return [FloatNode] a new instance of FloatNode + # + # source://prism//lib/prism/node.rb#6202 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, value: Float).void } + 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#6263 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6211 + 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#6216 + 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#6226 + 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#6221 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode + # + # source://prism//lib/prism/node.rb#6231 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer, value: Float).returns(Prism::FloatNode) } + 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#6216 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } + # + # source://prism//lib/prism/node.rb#6239 + 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#6247 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6252 + sig { override.returns(Symbol) } + def type; end + + # The value of the floating point number as a Float. + # + # source://prism//lib/prism/node.rb#6244 + sig { returns(Float) } + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#6257 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6273 +class Prism::ForNode < ::Prism::Node + # Initialize a new ForNode node. + # + # @return [ForNode] a new instance of ForNode + # + # source://prism//lib/prism/node.rb#6275 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + 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 + ).void + end + 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#6429 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6290 + 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#6295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # The collection to iterate over. + # + # for i in a end + # ^ + # + # source://prism//lib/prism/node.rb#6336 + sig { returns(Prism::Node) } + def collection; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6309 + 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#6300 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?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#6314 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + 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 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#6295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, 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#6322 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def do_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#6403 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # The location of the `do` keyword, if present. + # + # for i in a do end + # ^^ + # + # source://prism//lib/prism/node.rb#6370 + sig { returns(T.nilable(Prism::Location)) } + def do_keyword_loc; end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6408 + sig { returns(String) } + def end_keyword; end + + # The location of the `end` keyword. + # + # for i in a end + # ^^^ + # + # source://prism//lib/prism/node.rb#6386 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def for_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6393 + sig { returns(String) } + def for_keyword; end + + # The location of the `for` keyword. + # + # for i in a end + # ^^^ + # + # source://prism//lib/prism/node.rb#6350 + sig { returns(Prism::Location) } + def for_keyword_loc; end + + # def in_keyword: () -> String + # + # source://prism//lib/prism/node.rb#6398 + sig { returns(String) } + def in_keyword; end + + # The location of the `in` keyword. + # + # for i in a end + # ^^ + # + # source://prism//lib/prism/node.rb#6360 + sig { returns(Prism::Location) } + def in_keyword_loc; end + + # The index expression for `for` loops. + # + # for i in a end + # ^ + # + # source://prism//lib/prism/node.rb#6330 + sig do + returns(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)) + end + def index; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6413 + 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#6344 + 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#6418 + 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#6423 + 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#6447 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # Initialize a new ForwardingArgumentsNode node. + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#6449 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#6506 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6457 + 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#6462 + 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#6472 + 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#6467 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode + # + # source://prism//lib/prism/node.rb#6477 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingArgumentsNode) } + 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#6462 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#6485 + 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#6490 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6495 + 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#6500 + 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#6516 +class Prism::ForwardingParameterNode < ::Prism::Node + # Initialize a new ForwardingParameterNode node. + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6518 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#6575 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6526 + 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#6531 + 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#6541 + 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#6536 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6546 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingParameterNode) } + 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#6531 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#6554 + 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#6559 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6564 + 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#6569 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6584 +class Prism::ForwardingSuperNode < ::Prism::Node + # Initialize a new ForwardingSuperNode node. + # + # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#6586 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).void + end + 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#6649 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6595 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://prism//lib/prism/node.rb#6630 + sig { returns(T.nilable(Prism::BlockNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6600 + 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#6612 + 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#6605 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#6617 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end + 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#6600 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } + # + # source://prism//lib/prism/node.rb#6625 + 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#6633 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6638 + 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#6643 + 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#6659 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # Initialize a new GlobalVariableAndWriteNode node. + # + # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#6661 + 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#6747 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6673 + 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#6678 + 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#6688 + 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#6683 + 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) -> GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#6693 + 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::GlobalVariableAndWriteNode) + 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#6678 + 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#6701 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#200 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6731 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6706 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6709 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6726 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6716 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6736 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6723 + 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#6741 + 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#6760 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # Initialize a new GlobalVariableOperatorWriteNode node. + # + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#6762 + 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 + ).void + end + 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#6847 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6775 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#6828 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#6818 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6780 + 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#6790 + 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#6785 + 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, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#6795 + sig do + params( + 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 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#6780 + 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, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#6803 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#212 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6831 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6808 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6811 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#403 + def operator; end + + # Returns the location of the binary operator used to modify the receiver. + # This method is deprecated in favor of #binary_operator_loc. + # + # source://prism//lib/prism/node_ext.rb#410 + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6836 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6825 + 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#6841 + 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#6861 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # Initialize a new GlobalVariableOrWriteNode node. + # + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#6863 + 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#6949 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6875 + 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#6880 + 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#6890 + 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#6885 + 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) -> GlobalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#6895 + 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::GlobalVariableOrWriteNode) + 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#6880 + 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#6903 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#206 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#6933 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6908 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6911 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6928 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6918 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#6938 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6925 + 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#6943 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#6962 +class Prism::GlobalVariableReadNode < ::Prism::Node + # Initialize a new GlobalVariableReadNode node. + # + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#6964 + 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#7029 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#6973 + 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#6978 + 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#6988 + 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#6983 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode + # + # source://prism//lib/prism/node.rb#6993 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + 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#6978 + 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#7001 + 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#7013 + 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#7010 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7018 + 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#7023 + 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#7039 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # Initialize a new GlobalVariableTargetNode node. + # + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#7041 + 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#7102 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7050 + 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#7055 + 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#7065 + 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#7060 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode + # + # source://prism//lib/prism/node.rb#7070 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + 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#7055 + 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#7078 + 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#7086 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#7083 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7091 + 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#7096 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7112 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # Initialize a new GlobalVariableWriteNode node. + # + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#7114 + 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 + ).void + end + 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#7216 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7126 + 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#7131 + 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#7141 + 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#7136 + 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, ?operator_loc: Location) -> GlobalVariableWriteNode + # + # source://prism//lib/prism/node.rb#7146 + sig do + params( + 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 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#7131 + 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, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#7154 + 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#7200 + 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#7163 + sig { returns(Symbol) } + def name; end + + # The location of the global variable's name. + # + # $foo = :bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#7169 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#7195 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # $foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#7188 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7205 + 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#7182 + 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#7210 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7229 +class Prism::HashNode < ::Prism::Node + # Initialize a new HashNode node. + # + # @return [HashNode] a new instance of HashNode + # + # source://prism//lib/prism/node.rb#7231 + 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 + ).void + end + 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#7330 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7242 + 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#7247 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#7309 + sig { returns(String) } + def closing; end + + # The location of the closing brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#7297 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7257 + 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#7252 + sig { override.returns(T::Array[Prism::Node]) } + 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#7262 + sig do + params( + 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 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#7247 + 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, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } + # + # source://prism//lib/prism/node.rb#7270 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. + # + # { a: b } + # ^^^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/node.rb#7291 + 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#7314 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#7304 + sig { returns(String) } + def opening; end + + # The location of the opening brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#7278 + sig { returns(Prism::Location) } + def opening_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7319 + 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#7324 + 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#7346 +class Prism::HashPatternNode < ::Prism::Node + # Initialize a new HashPatternNode node. + # + # @return [HashPatternNode] a new instance of HashPatternNode + # + # source://prism//lib/prism/node.rb#7348 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + 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) + ).void + end + 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#7459 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7361 + 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#7366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#7438 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#7420 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7380 + 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#7371 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil + # + # source://prism//lib/prism/node.rb#7398 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } + def constant; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode + # + # source://prism//lib/prism/node.rb#7385 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + 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 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#7366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } + # + # source://prism//lib/prism/node.rb#7393 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader elements: Array[AssocNode] + # + # source://prism//lib/prism/node.rb#7401 + sig { returns(T::Array[Prism::AssocNode]) } + def elements; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7443 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#7433 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#7407 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil + # + # source://prism//lib/prism/node.rb#7404 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } + def rest; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7448 + 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#7453 + 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#7480 +class Prism::IfNode < ::Prism::Node + # Initialize a new IfNode node. + # + # @return [IfNode] a new instance of IfNode + # + # source://prism//lib/prism/node.rb#7482 + 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) + ).void + end + 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#7658 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7496 + 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#7501 + 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#7515 + 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#7506 + sig { override.returns(T::Array[Prism::Node]) } + 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#7520 + sig do + params( + 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 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#7501 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#7528 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7637 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword if present, `nil` otherwise. + # + # if foo + # bar + # end + # ^^^ + # + # source://prism//lib/prism/node.rb#7614 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def if_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7627 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # The location of the `if` keyword if present. + # + # bar if foo + # ^^ + # + # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. + # + # source://prism//lib/prism/node.rb#7538 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7642 + 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#7562 + sig { returns(Prism::Node) } + 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#7591 + sig { returns(T.nilable(Prism::StatementsNode)) } + 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#7606 + sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } + def subsequent; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7632 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. + # + # if foo then bar end + # ^^^^ + # + # a ? b : c + # ^ + # + # source://prism//lib/prism/node.rb#7571 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7647 + 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#7652 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://prism//lib/prism/node.rb#7673 +class Prism::ImaginaryNode < ::Prism::Node + # Initialize a new ImaginaryNode node. + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # source://prism//lib/prism/node.rb#7675 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).void + end + 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#7736 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7684 + 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#7689 + 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#7699 + 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#7694 + sig { override.returns(T::Array[Prism::Node]) } + 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#7704 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end + 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#7689 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } + # + # source://prism//lib/prism/node.rb#7712 + 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#7720 + sig { override.returns(String) } + def inspect; end + + # attr_reader numeric: FloatNode | IntegerNode | RationalNode + # + # source://prism//lib/prism/node.rb#7717 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } + def numeric; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7725 + 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#7730 + 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#7752 +class Prism::ImplicitNode < ::Prism::Node + # Initialize a new ImplicitNode node. + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # source://prism//lib/prism/node.rb#7754 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).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#7815 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7763 + 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#7768 + 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#7778 + 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#7773 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode + # + # source://prism//lib/prism/node.rb#7783 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end + 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#7768 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } + # + # source://prism//lib/prism/node.rb#7791 + 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#7799 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7804 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#7796 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) + end + def value; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#7809 + 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#7834 +class Prism::ImplicitRestNode < ::Prism::Node + # Initialize a new ImplicitRestNode node. + # + # @return [ImplicitRestNode] a new instance of ImplicitRestNode + # + # source://prism//lib/prism/node.rb#7836 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#7893 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7844 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#7859 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#7854 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode + # + # source://prism//lib/prism/node.rb#7864 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ImplicitRestNode) } + 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#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#7872 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7877 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7882 + 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#7887 + 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#7902 +class Prism::InNode < ::Prism::Node + # Initialize a new InNode node. + # + # @return [InNode] a new instance of InNode + # + # source://prism//lib/prism/node.rb#7904 + 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) + ).void + end + 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#8004 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#7916 + 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#7921 + 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#7934 + 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#7926 + sig { override.returns(T::Array[Prism::Node]) } + 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#7939 + sig do + params( + 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 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#7921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#7947 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def in: () -> String + # + # source://prism//lib/prism/node.rb#7978 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # source://prism//lib/prism/node.rb#7958 + sig { returns(Prism::Location) } + def in_loc; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#7988 + sig { override.returns(String) } + def inspect; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#7952 + sig { returns(Prism::Node) } + def pattern; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#7955 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then: () -> String? + # + # source://prism//lib/prism/node.rb#7983 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#7965 + sig { returns(T.nilable(Prism::Location)) } + def then_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#7993 + 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#7998 + 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#8017 +class Prism::IndexAndWriteNode < ::Prism::Node + # Initialize a new IndexAndWriteNode node. + # + # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#8019 + 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::BlockArgumentNode), + 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#8175 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8035 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8116 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8083 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#8126 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8139 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8096 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8040 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8149 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8119 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8055 + 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#8045 + 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: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#8060 + 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::BlockArgumentNode), + 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#8040 + 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: BlockArgumentNode?, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8068 + 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#8088 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8159 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8144 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8109 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8154 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8129 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#8093 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8073 + 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#8164 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8136 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8078 + 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#8169 + 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#8193 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # Initialize a new IndexOperatorWriteNode node. + # + # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8195 + 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::BlockArgumentNode), + 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#8350 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8212 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8293 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8260 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#8306 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#8309 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#8303 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8319 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8273 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8217 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8329 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8296 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8232 + 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#8222 + 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: BlockArgumentNode?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8237 + 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::BlockArgumentNode), + 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#8217 + 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: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8245 + 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#8265 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8334 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8324 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8286 + 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#8270 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8250 + 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#8339 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8316 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8255 + 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#8344 + 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#8369 +class Prism::IndexOrWriteNode < ::Prism::Node + # Initialize a new IndexOrWriteNode node. + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#8371 + 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::BlockArgumentNode), + 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#8527 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8387 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8468 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8435 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#8478 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8491 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8448 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8392 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8501 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8471 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8407 + 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#8397 + 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: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#8412 + 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::BlockArgumentNode), + 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#8392 + 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: BlockArgumentNode?, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#8420 + 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#8440 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8511 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8496 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8461 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8506 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8481 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#8445 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8425 + 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#8516 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8488 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8430 + 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#8521 + 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#8553 +class Prism::IndexTargetNode < ::Prism::Node + # Initialize a new IndexTargetNode node. + # + # @return [IndexTargetNode] a new instance of IndexTargetNode + # + # source://prism//lib/prism/node.rb#8555 + 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::BlockArgumentNode) + ).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#8674 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8568 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8635 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8615 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: BlockArgumentNode? + # + # source://prism//lib/prism/node.rb#8645 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8573 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8653 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8638 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#8587 + 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#8578 + 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: BlockArgumentNode?) -> IndexTargetNode + # + # source://prism//lib/prism/node.rb#8592 + 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::BlockArgumentNode) + ).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#8573 + 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: BlockArgumentNode? } + # + # source://prism//lib/prism/node.rb#8600 + 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#8620 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8658 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8648 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8628 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#8625 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8605 + 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#8663 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8610 + 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#8668 + 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#529 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#537 + 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#532 + 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#8689 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # Initialize a new InstanceVariableAndWriteNode node. + # + # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8691 + 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#8777 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8703 + 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#8708 + 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#8718 + 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#8713 + 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) -> InstanceVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#8723 + 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::InstanceVariableAndWriteNode) + 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#8708 + 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#8731 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#218 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8761 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8736 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8739 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8756 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8746 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8766 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8753 + 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#8771 + 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#8790 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # Initialize a new InstanceVariableOperatorWriteNode node. + # + # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8792 + 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 + ).void + end + 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#8877 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8805 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#8858 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#8848 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#8810 + 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#8820 + 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#8815 + 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, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8825 + sig do + params( + 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 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#8810 + 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, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } + # + # source://prism//lib/prism/node.rb#8833 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#230 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8861 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8838 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8841 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#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#8866 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8855 + 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#8871 + 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#8891 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # Initialize a new InstanceVariableOrWriteNode node. + # + # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8893 + 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#8979 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#8905 + 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#8910 + 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#8920 + 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#8915 + 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) -> InstanceVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#8925 + 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::InstanceVariableOrWriteNode) + 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#8910 + 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#8933 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # source://prism//lib/prism/desugar_compiler.rb#224 + def desugar; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#8963 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#8938 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8941 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8958 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8948 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#8968 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8955 + 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#8973 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# source://prism//lib/prism/node.rb#8992 +class Prism::InstanceVariableReadNode < ::Prism::Node + # Initialize a new InstanceVariableReadNode node. + # + # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#8994 + 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#9059 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9003 + 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#9008 + 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#9018 + 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#9013 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode + # + # source://prism//lib/prism/node.rb#9023 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + 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#9008 + 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#9031 + 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#9043 + 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#9040 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9048 + 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#9053 + 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#9069 +class Prism::InstanceVariableTargetNode < ::Prism::Node + # Initialize a new InstanceVariableTargetNode node. + # + # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#9071 + 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#9132 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9080 + 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#9085 + 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#9095 + 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#9090 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode + # + # source://prism//lib/prism/node.rb#9100 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + 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#9085 + 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#9108 + 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#9116 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#9113 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9121 + 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#9126 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9142 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # Initialize a new InstanceVariableWriteNode node. + # + # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#9144 + 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 + ).void + end + 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#9246 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9156 + 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#9161 + 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#9171 + 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#9166 + 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, ?operator_loc: Location) -> InstanceVariableWriteNode + # + # source://prism//lib/prism/node.rb#9176 + sig do + params( + 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 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#9161 + 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, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#9184 + 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#9230 + 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#9193 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @_x = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#9199 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9225 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @x = y + # ^ + # + # source://prism//lib/prism/node.rb#9218 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9235 + 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#9212 + 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#9240 + def type; end + end +end + +# Flags for integer nodes that correspond to the base of the integer. +# +# source://prism//lib/prism/node.rb#16732 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# source://prism//lib/prism/node.rb#16734 +Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) + +# 0d or no prefix +# +# source://prism//lib/prism/node.rb#16737 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# source://prism//lib/prism/node.rb#16743 +Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) + +# 0o or 0 prefix +# +# source://prism//lib/prism/node.rb#16740 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://prism//lib/prism/node.rb#9259 +class Prism::IntegerNode < ::Prism::Node + # Initialize a new IntegerNode node. + # + # @return [IntegerNode] a new instance of IntegerNode + # + # source://prism//lib/prism/node.rb#9261 + 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#9342 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9270 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9303 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9275 + 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#9285 + 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#9280 + 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#9290 + 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#9308 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9275 + 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#9298 + 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#9318 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9326 + sig { override.returns(String) } + def inspect; end + + # def octal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9313 + sig { returns(T::Boolean) } + def octal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#9331 + sig { override.returns(Symbol) } + def type; end + + # The value of the integer literal as a number. + # + # source://prism//lib/prism/node.rb#9323 + 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#9336 + 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#9353 +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#9355 + 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#9497 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9366 + 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#9424 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9371 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9476 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9464 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9381 + 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#9376 + 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#9386 + 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#9371 + 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#9394 + 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#9419 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9404 + 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#9444 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9449 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9439 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9399 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9481 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9409 + 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#9414 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9471 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9454 + 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#9461 + 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#9486 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9434 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9429 + 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#9491 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9511 +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#9513 + 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#9655 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9524 + 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#9582 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#9529 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9634 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9622 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9539 + 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#9534 + 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#9544 + 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#9529 + 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#9552 + 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#9577 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9562 + 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#9602 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9607 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9597 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9557 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9639 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9567 + 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#9572 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#9629 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9612 + 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#9619 + 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#9644 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9592 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9587 + 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#9649 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9669 +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#9671 + 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#9780 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9682 + 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#9687 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#9759 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#9741 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9697 + 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#9692 + 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#9702 + 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#9687 + 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#9710 + 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#9715 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9764 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9720 + 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#9754 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#9725 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] + # + # source://prism//lib/prism/node.rb#9738 + 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#9769 + 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#9774 + 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#16747 +module Prism::InterpolatedStringNodeFlags; end + +# source://prism//lib/prism/node.rb#16749 +Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#16752 +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#9794 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # Initialize a new InterpolatedSymbolNode node. + # + # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#9796 + 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) + ).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#9895 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9807 + 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#9812 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#9874 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#9856 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9822 + 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#9817 + 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?) -> InterpolatedSymbolNode + # + # source://prism//lib/prism/node.rb#9827 + 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)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + 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#9812 + 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#9835 + 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#9879 + 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#9869 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#9840 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#9853 + 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#9884 + 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#9889 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9908 +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#9910 + 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#9997 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#9921 + 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#9926 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9976 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#9964 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#9936 + 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#9931 + 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) -> InterpolatedXStringNode + # + # source://prism//lib/prism/node.rb#9941 + 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::InterpolatedXStringNode) + 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#9926 + 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#9949 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#9981 + 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#9971 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9954 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#9961 + 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#9986 + 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#9991 + def type; end + end +end + +# Represents reading from the implicit `it` local variable. +# +# -> { it } +# ^^ +# +# source://prism//lib/prism/node.rb#10010 +class Prism::ItLocalVariableReadNode < ::Prism::Node + # Initialize a new ItLocalVariableReadNode node. + # + # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10012 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#10069 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10020 + 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#10025 + 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#10035 + 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#10030 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10040 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItLocalVariableReadNode) } + 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#10025 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#10048 + 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#10053 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10058 + 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#10063 + 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#10078 +class Prism::ItParametersNode < ::Prism::Node + # Initialize a new ItParametersNode node. + # + # @return [ItParametersNode] a new instance of ItParametersNode + # + # source://prism//lib/prism/node.rb#10080 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#10137 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10088 + 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#10093 + 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#10103 + 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#10098 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode + # + # source://prism//lib/prism/node.rb#10108 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItParametersNode) } + 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#10093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#10116 + 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#10121 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10126 + 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#10131 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://prism//lib/prism/node.rb#10146 +class Prism::KeywordHashNode < ::Prism::Node + # Initialize a new KeywordHashNode node. + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # source://prism//lib/prism/node.rb#10148 + 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#10214 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10157 + 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#10162 + 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#10172 + 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#10167 + 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#10177 + 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#10162 + 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#10185 + 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#10195 + 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#10198 + sig { override.returns(String) } + def inspect; end + + # def symbol_keys?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10190 + 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#10203 + 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#10208 + def type; end + end +end + +# Flags for keyword hash nodes. +# +# source://prism//lib/prism/node.rb#16756 +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#16758 +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#10227 +class Prism::KeywordRestParameterNode < ::Prism::Node + # Initialize a new KeywordRestParameterNode node. + # + # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#10229 + 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#10322 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10240 + 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#10245 + 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#10255 + 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#10250 + 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#10260 + 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#10245 + 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#10268 + 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#10306 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#10278 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#10281 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10301 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10294 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10273 + 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#10311 + 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#10316 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10335 +class Prism::LambdaNode < ::Prism::Node + # Initialize a new LambdaNode node. + # + # @return [LambdaNode] a new instance of LambdaNode + # + # source://prism//lib/prism/node.rb#10337 + 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(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).void + end + 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#10448 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10351 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#10414 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10356 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10427 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#10404 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#10369 + 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#10361 + sig { override.returns(T::Array[Prism::Node]) } + 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: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode + # + # source://prism//lib/prism/node.rb#10374 + sig do + params( + 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(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end + 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#10356 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil } + # + # source://prism//lib/prism/node.rb#10382 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10432 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#10387 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#10422 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10397 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10417 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10390 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil + # + # source://prism//lib/prism/node.rb#10411 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } + def parameters; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10437 + 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#10442 + 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#764 +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#769 + 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#775 + 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#766 + 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#10464 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # Initialize a new LocalVariableAndWriteNode node. + # + # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#10466 + 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 + ).void + end + 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#10556 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10479 + 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#10484 + 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#10494 + 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#10489 + sig { override.returns(T::Array[Prism::Node]) } + 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#10499 + sig do + params( + 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 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#10484 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#10507 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10532 + sig { returns(Integer) } + 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#10540 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10529 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10512 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10535 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10519 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10545 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10526 + 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#10550 + 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#10570 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # Initialize a new LocalVariableOperatorWriteNode node. + # + # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode + # + # source://prism//lib/prism/node.rb#10572 + 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 + ).void + end + 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#10661 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10586 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader binary_operator: Symbol + # + # source://prism//lib/prism/node.rb#10639 + sig { returns(Symbol) } + def binary_operator; end + + # attr_reader binary_operator_loc: Location + # + # source://prism//lib/prism/node.rb#10626 + sig { returns(Prism::Location) } + def binary_operator_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#10591 + 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#10601 + 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#10596 + sig { override.returns(T::Array[Prism::Node]) } + 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#10606 + sig do + params( + 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 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#10591 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#10614 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10642 + sig { returns(Integer) } + 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#10645 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10636 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10619 + sig { returns(Prism::Location) } + def name_loc; end + + # Returns the binary operator used to modify the receiver. This method is + # deprecated in favor of #binary_operator. + # + # source://prism//lib/prism/node_ext.rb#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#10650 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10633 + 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#10655 + 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#10676 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # Initialize a new LocalVariableOrWriteNode node. + # + # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode + # + # source://prism//lib/prism/node.rb#10678 + 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 + ).void + end + 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#10768 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10691 + 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#10696 + 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#10706 + 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#10701 + sig { override.returns(T::Array[Prism::Node]) } + 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#10711 + sig do + params( + 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 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#10696 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#10719 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10744 + sig { returns(Integer) } + 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#10752 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10741 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10724 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10747 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10731 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10757 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10738 + 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#10762 + 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#10782 +class Prism::LocalVariableReadNode < ::Prism::Node + # Initialize a new LocalVariableReadNode node. + # + # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode + # + # source://prism//lib/prism/node.rb#10784 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + 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#10863 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10794 + 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#10799 + 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#10809 + 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#10804 + sig { override.returns(T::Array[Prism::Node]) } + 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#10814 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end + 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#10799 + 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, depth: Integer } + # + # source://prism//lib/prism/node.rb#10822 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of visible scopes that should be searched to find the origin of this local variable. + # + # foo = 1; foo # depth 0 + # + # bar = 2; tap { bar } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#10844 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10847 + 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#10835 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10852 + 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#10857 + 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#10874 +class Prism::LocalVariableTargetNode < ::Prism::Node + # Initialize a new LocalVariableTargetNode node. + # + # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode + # + # source://prism//lib/prism/node.rb#10876 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + 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#10941 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10886 + 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#10891 + 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#10901 + 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#10896 + sig { override.returns(T::Array[Prism::Node]) } + 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#10906 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end + 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#10891 + 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, depth: Integer } + # + # source://prism//lib/prism/node.rb#10914 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader depth: Integer + # + # source://prism//lib/prism/node.rb#10922 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#10925 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#10919 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#10930 + 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#10935 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#10952 +class Prism::LocalVariableWriteNode < ::Prism::Node + # Initialize a new LocalVariableWriteNode node. + # + # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode + # + # source://prism//lib/prism/node.rb#10954 + 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 + ).void + end + 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#11070 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#10967 + 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#10972 + 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#10982 + 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#10977 + sig { override.returns(T::Array[Prism::Node]) } + 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#10987 + sig do + params( + 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 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#10972 + 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, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#10995 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # The number of semantic scopes we have to traverse to find the declaration of this variable. + # + # foo = 1 # depth 0 + # + # tap { foo = 1 } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#11013 + sig { returns(Integer) } + def depth; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11054 + 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#11004 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # foo = :bar + # ^^^ + # + # source://prism//lib/prism/node.rb#11019 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11049 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # x = :y + # ^ + # + # source://prism//lib/prism/node.rb#11042 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11059 + 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#11036 + 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#11064 + def type; end + end +end + +# This represents a location in the source. +# +# source://prism//lib/prism/parse_result.rb#273 +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#288 + 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#476 + 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#495 + sig { params(string: String).returns(Prism::Location) } + def adjoin(string); end + + # The end column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism//lib/prism/parse_result.rb#461 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_column(cache); end + + # The end offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism//lib/prism/parse_result.rb#397 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_offset(cache); end + + # The start column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism//lib/prism/parse_result.rb#437 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_column(cache); end + + # The start offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism//lib/prism/parse_result.rb#375 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_offset(cache); end + + # Returns a new location that is the result of chopping off the last byte. + # + # source://prism//lib/prism/parse_result.rb#334 + 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#324 + 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#329 + 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#466 + 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#449 + 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#386 + 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#455 + 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#391 + 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#443 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # source://prism//lib/prism/parse_result.rb#413 + 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#380 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # source://prism//lib/prism/parse_result.rb#339 + 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#485 + 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#307 + 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#302 + sig { returns(T::Array[Prism::Comment]) } + def leading_comments; end + + # The length of this location in bytes. + # + # source://prism//lib/prism/parse_result.rb#284 + sig { returns(Integer) } + def length; end + + # Implement the pretty print interface for Location. + # + # source://prism//lib/prism/parse_result.rb#471 + 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#349 + 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#356 + def slice_lines; end + + # Returns all of the lines of the source code associated with this location. + # + # source://prism//lib/prism/parse_result.rb#344 + 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#425 + 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#364 + 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#431 + 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#369 + 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#419 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # source://prism//lib/prism/parse_result.rb#402 + 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#407 + 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#281 + sig { returns(Integer) } + def start_offset; end + + # Attach a comment to the trailing comments of this location. + # + # source://prism//lib/prism/parse_result.rb#318 + 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#313 + 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#276 + sig { returns(Prism::Source) } + def source; end +end + +# Flags for while and until loop nodes. +# +# source://prism//lib/prism/node.rb#16762 +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#16764 +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#557 +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#565 + 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#581 + 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#586 + 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#571 + 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#559 + 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#576 + 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#562 + 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#11084 +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#11086 + 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#11241 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11098 + 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#11156 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11103 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#11220 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#11200 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#11113 + 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#11108 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#11215 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#11193 + 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#11118 + 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#11103 + 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#11126 + 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#11151 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11136 + 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#11176 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11181 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11171 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11131 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11225 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11141 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11146 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11210 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11186 + 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#11230 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#11207 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11166 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11161 + 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#11235 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11255 +class Prism::MatchPredicateNode < ::Prism::Node + # Initialize a new MatchPredicateNode node. + # + # @return [MatchPredicateNode] a new instance of MatchPredicateNode + # + # source://prism//lib/prism/node.rb#11257 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end + 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#11335 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11268 + 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#11273 + 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#11283 + 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#11278 + sig { override.returns(T::Array[Prism::Node]) } + 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#11288 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + 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#11273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#11296 + 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#11319 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11314 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11307 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#11304 + sig { returns(Prism::Node) } + def pattern; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11324 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#11301 + 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#11329 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11347 +class Prism::MatchRequiredNode < ::Prism::Node + # Initialize a new MatchRequiredNode node. + # + # @return [MatchRequiredNode] a new instance of MatchRequiredNode + # + # source://prism//lib/prism/node.rb#11349 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end + 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#11427 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11360 + 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#11365 + 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#11375 + 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#11370 + sig { override.returns(T::Array[Prism::Node]) } + 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#11380 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + 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#11365 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#11388 + 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#11411 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11406 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#11399 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#11396 + sig { returns(Prism::Node) } + def pattern; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11416 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#11393 + 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#11421 + def type; end + end +end + +# Represents writing local variables using a regular expression match with named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11439 +class Prism::MatchWriteNode < ::Prism::Node + # Initialize a new MatchWriteNode node. + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # source://prism//lib/prism/node.rb#11441 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).void + end + 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#11506 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11451 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader call: CallNode + # + # source://prism//lib/prism/node.rb#11484 + sig { returns(Prism::CallNode) } + def call; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11456 + 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#11466 + 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#11461 + sig { override.returns(T::Array[Prism::Node]) } + 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#11471 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end + 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#11456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#11479 + 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#11490 + sig { override.returns(String) } + def inspect; end + + # attr_reader targets: Array[LocalVariableTargetNode] + # + # source://prism//lib/prism/node.rb#11487 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } + def targets; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11495 + 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#11500 + 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#11515 +class Prism::MissingNode < ::Prism::Node + # Initialize a new MissingNode node. + # + # @return [MissingNode] a new instance of MissingNode + # + # source://prism//lib/prism/node.rb#11517 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#11574 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11525 + 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#11530 + 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#11540 + 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#11535 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode + # + # source://prism//lib/prism/node.rb#11545 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::MissingNode) } + 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#11530 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#11553 + 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#11558 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11563 + 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#11568 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11583 +class Prism::ModuleNode < ::Prism::Node + # Initialize a new ModuleNode node. + # + # @return [ModuleNode] a new instance of ModuleNode + # + # source://prism//lib/prism/node.rb#11585 + 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: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end + 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#11687 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11599 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#11648 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#11604 + 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#11617 + 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#11609 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode + # + # source://prism//lib/prism/node.rb#11645 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } + def constant_path; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode + # + # source://prism//lib/prism/node.rb#11622 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end + 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#11604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } + # + # source://prism//lib/prism/node.rb#11630 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#11666 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11651 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#11671 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#11635 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def module_keyword: () -> String + # + # source://prism//lib/prism/node.rb#11661 + sig { returns(String) } + def module_keyword; end + + # attr_reader module_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#11638 + sig { returns(Prism::Location) } + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#11658 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11676 + 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#11681 + 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#11708 +class Prism::MultiTargetNode < ::Prism::Node + # Initialize a new MultiTargetNode node. + # + # @return [MultiTargetNode] a new instance of MultiTargetNode + # + # source://prism//lib/prism/node.rb#11710 + 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, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).void + end + 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#11851 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11723 + 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#11728 + 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#11742 + 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#11733 + sig { override.returns(T::Array[Prism::Node]) } + 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 | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode + # + # source://prism//lib/prism/node.rb#11747 + sig do + params( + 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, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end + 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#11728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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 | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } + # + # source://prism//lib/prism/node.rb#11755 + 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#11835 + 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#11768 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#11825 + sig { returns(T.nilable(String)) } + def lparen; end + + # The location of the opening parenthesis. + # + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11796 + sig { returns(T.nilable(Prism::Location)) } + 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, this field will contain an `ImplicitRestNode` + # + # a, (b,) = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#11784 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } + 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#11790 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#11830 + sig { returns(T.nilable(String)) } + def rparen; end + + # The location of the closing parenthesis. + # + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11812 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#11840 + 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#11845 + 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#11867 +class Prism::MultiWriteNode < ::Prism::Node + # Initialize a new MultiWriteNode node. + # + # @return [MultiWriteNode] a new instance of MultiWriteNode + # + # source://prism//lib/prism/node.rb#11869 + 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::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::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end + 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#12034 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11884 + 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#11889 + 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#11904 + 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#11894 + sig { override.returns(T::Array[Prism::Node]) } + 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 | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode + # + # source://prism//lib/prism/node.rb#11909 + sig do + params( + 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::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::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end + 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#11889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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 | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } + # + # source://prism//lib/prism/node.rb#11917 + 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#12018 + 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#11930 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def lefts; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#12003 + sig { returns(T.nilable(String)) } + def lparen; end + + # The location of the opening parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11958 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12013 + sig { returns(String) } + def operator; end + + # The location of the operator. + # + # a, b, c = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11990 + sig { returns(Prism::Location) } + 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, this field will contain an `ImplicitRestNode` + # + # a, b, = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#11946 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } + 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#11952 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end + def rights; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#12008 + sig { returns(T.nilable(String)) } + def rparen; end + + # The location of the closing parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11974 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12023 + 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#12000 + 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#12028 + 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#12052 +class Prism::NextNode < ::Prism::Node + # Initialize a new NextNode node. + # + # @return [NextNode] a new instance of NextNode + # + # source://prism//lib/prism/node.rb#12054 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end + 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#12130 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12064 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#12099 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12069 + 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#12081 + 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#12074 + sig { override.returns(T::Array[Prism::Node]) } + 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#12086 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end + 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#12069 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#12094 + 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#12114 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#12109 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#12102 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12119 + 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#12124 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# source://prism//lib/prism/node.rb#12141 +class Prism::NilNode < ::Prism::Node + # Initialize a new NilNode node. + # + # @return [NilNode] a new instance of NilNode + # + # source://prism//lib/prism/node.rb#12143 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#12200 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12151 + 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#12156 + 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#12166 + 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#12161 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode + # + # source://prism//lib/prism/node.rb#12171 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::NilNode) } + 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#12156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#12179 + 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#12184 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12189 + 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#12194 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#12210 +class Prism::NoKeywordsParameterNode < ::Prism::Node + # Initialize a new NoKeywordsParameterNode node. + # + # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode + # + # source://prism//lib/prism/node.rb#12212 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).void + end + 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#12295 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12222 + 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#12227 + 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#12237 + 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#12232 + sig { override.returns(T::Array[Prism::Node]) } + 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#12242 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + 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#12227 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#12250 + 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#12279 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#12274 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#12262 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12269 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12255 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12284 + 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#12289 + 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#16855 +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#16858 +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#16862 +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#12306 +class Prism::NumberedParametersNode < ::Prism::Node + # Initialize a new NumberedParametersNode node. + # + # @return [NumberedParametersNode] a new instance of NumberedParametersNode + # + # source://prism//lib/prism/node.rb#12308 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).void + end + 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#12369 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12317 + 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#12322 + 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#12332 + 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#12327 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode + # + # source://prism//lib/prism/node.rb#12337 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end + 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#12322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } + # + # source://prism//lib/prism/node.rb#12345 + 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#12353 + sig { override.returns(String) } + def inspect; end + + # attr_reader maximum: Integer + # + # source://prism//lib/prism/node.rb#12350 + sig { returns(Integer) } + def maximum; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12358 + 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#12363 + def type; end + end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# source://prism//lib/prism/node.rb#12379 +class Prism::NumberedReferenceReadNode < ::Prism::Node + # Initialize a new NumberedReferenceReadNode node. + # + # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#12381 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).void + end + 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#12448 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12390 + 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#12395 + 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#12405 + 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#12400 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#12410 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end + 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#12395 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } + # + # source://prism//lib/prism/node.rb#12418 + 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#12432 + 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#12429 + sig { returns(Integer) } + def number; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12437 + 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#12442 + 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#12459 +class Prism::OptionalKeywordParameterNode < ::Prism::Node + # Initialize a new OptionalKeywordParameterNode node. + # + # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode + # + # source://prism//lib/prism/node.rb#12461 + 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#12539 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12472 + 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#12477 + 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#12487 + 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#12482 + 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#12492 + 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#12477 + 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#12500 + 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#12523 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12510 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12513 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12505 + 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#12528 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12520 + 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#12533 + 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#12553 +class Prism::OptionalParameterNode < ::Prism::Node + # Initialize a new OptionalParameterNode node. + # + # @return [OptionalParameterNode] a new instance of OptionalParameterNode + # + # source://prism//lib/prism/node.rb#12555 + 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#12646 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12567 + 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#12572 + 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#12582 + 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#12577 + 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#12587 + 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#12572 + 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#12595 + 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#12630 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#12605 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12608 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12625 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12615 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12600 + 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#12635 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12622 + 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#12640 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12660 +class Prism::OrNode < ::Prism::Node + # Initialize a new OrNode node. + # + # @return [OrNode] a new instance of OrNode + # + # source://prism//lib/prism/node.rb#12662 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: 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#12755 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12673 + 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#12678 + 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#12688 + 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#12683 + 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) -> OrNode + # + # source://prism//lib/prism/node.rb#12693 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + 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#12678 + 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#12701 + 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#12739 + 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#12712 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12734 + sig { returns(String) } + def operator; end + + # The location of the `or` keyword or the `||` operator. + # + # left or right + # ^^ + # + # source://prism//lib/prism/node.rb#12727 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. + # + # left || right + # ^^^^^ + # + # 1 or 2 + # ^ + # + # source://prism//lib/prism/node.rb#12721 + sig { returns(Prism::Node) } + def right; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12744 + 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#12749 + 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#16768 +module Prism::ParameterFlags; end + +# a parameter name that has been repeated in the method signature +# +# source://prism//lib/prism/node.rb#16770 +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#12768 +class Prism::ParametersNode < ::Prism::Node + # Initialize a new ParametersNode node. + # + # @return [ParametersNode] a new instance of ParametersNode + # + # source://prism//lib/prism/node.rb#12770 + 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) + ).void + end + 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#12863 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12785 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # source://prism//lib/prism/node.rb#12844 + sig { returns(T.nilable(Prism::BlockParameterNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12790 + 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#12808 + 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#12795 + sig { override.returns(T::Array[Prism::Node]) } + 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#12813 + sig do + params( + 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 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#12790 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#12821 + 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#12847 + sig { override.returns(String) } + def inspect; end + + # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil + # + # source://prism//lib/prism/node.rb#12841 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end + def keyword_rest; end + + # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] + # + # source://prism//lib/prism/node.rb#12838 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } + def keywords; end + + # attr_reader optionals: Array[OptionalParameterNode] + # + # source://prism//lib/prism/node.rb#12829 + sig { returns(T::Array[Prism::OptionalParameterNode]) } + def optionals; end + + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] + # + # source://prism//lib/prism/node.rb#12835 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) + end + def posts; end + + # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#12826 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } + def requireds; end + + # attr_reader rest: RestParameterNode | ImplicitRestNode | nil + # + # source://prism//lib/prism/node.rb#12832 + sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } + def rest; end + + # Mirrors the Method#parameters method. + # + # source://prism//lib/prism/node_ext.rb#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#12852 + 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#12857 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12883 +class Prism::ParenthesesNode < ::Prism::Node + # Initialize a new ParenthesesNode node. + # + # @return [ParenthesesNode] a new instance of ParenthesesNode + # + # source://prism//lib/prism/node.rb#12885 + 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 + ).void + end + 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#12974 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12896 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#12931 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12901 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12953 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#12941 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12913 + 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#12906 + sig { override.returns(T::Array[Prism::Node]) } + 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#12918 + sig do + params( + 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 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#12901 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#12926 + 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#12958 + 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#12948 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12934 + sig { returns(Prism::Location) } + def opening_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#12963 + 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#12968 + def type; end + end +end + +# This represents an error that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#592 +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#607 + 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#615 + 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#620 + sig { returns(String) } + def inspect; end + + # The level of this error. + # + # source://prism//lib/prism/parse_result.rb#604 + 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#601 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this error. + # + # source://prism//lib/prism/parse_result.rb#598 + 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#595 + 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#781 +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#787 + 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#793 + 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#784 + 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#722 +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#735 + 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#746 + def attach_comments!; end + + # Implement the hash pattern matching interface for ParseResult. + # + # source://prism//lib/prism/parse_result.rb#741 + 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#758 + 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#752 + def mark_newlines!; end + + # The syntax tree that was parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#732 + 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#626 +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#641 + 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#649 + 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#654 + sig { returns(String) } + def inspect; end + + # The level of this warning. + # + # source://prism//lib/prism/parse_result.rb#638 + 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#635 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this warning. + # + # source://prism//lib/prism/parse_result.rb#632 + 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#629 + sig { returns(Symbol) } + def type; end +end + +# A pattern is an object that wraps a Ruby pattern matching expression. The +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the ConstantPathNode[...] expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a Prism::Pattern::CompilationError will be +# raised. +# +# source://prism//lib/prism/pattern.rb#37 +class Prism::Pattern + # Create a new pattern with the given query. The query should be a string + # containing a Ruby pattern matching expression. + # + # @return [Pattern] a new instance of Pattern + # + # source://prism//lib/prism/pattern.rb#63 + def initialize(query); end + + # Compile the query into a callable object that can be used to match against + # nodes. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#70 + def compile; end + + # The query that this pattern was initialized with. + # + # source://prism//lib/prism/pattern.rb#59 + def query; end + + # Scan the given node and all of its children for nodes that match the + # pattern. If a block is given, it will be called with each node that + # matches the pattern. If no block is given, an enumerator will be returned + # that will yield each node that matches the pattern. + # + # source://prism//lib/prism/pattern.rb#86 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://prism//lib/prism/pattern.rb#102 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://prism//lib/prism/pattern.rb#108 + def combine_or(left, right); end + + # in foo | bar + # + # source://prism//lib/prism/pattern.rb#143 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://prism//lib/prism/pattern.rb#118 + def compile_array_pattern_node(node); end + + # Compile a name associated with a constant. + # + # source://prism//lib/prism/pattern.rb#168 + def compile_constant_name(node, name); end + + # in Prism::ConstantReadNode + # + # source://prism//lib/prism/pattern.rb#148 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://prism//lib/prism/pattern.rb#163 + def compile_constant_read_node(node); end + + # Raise an error because the given node is not supported. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#113 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://prism//lib/prism/pattern.rb#184 + def compile_hash_pattern_node(node); end + + # in nil + # + # source://prism//lib/prism/pattern.rb#214 + def compile_nil_node(node); end + + # Compile any kind of node. Dispatch out to the individual compilation + # methods based on the type of node. + # + # source://prism//lib/prism/pattern.rb#243 + def compile_node(node); end + + # in /foo/ + # + # source://prism//lib/prism/pattern.rb#219 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://prism//lib/prism/pattern.rb#227 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://prism//lib/prism/pattern.rb#235 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://prism//lib/prism/pattern.rb#40 +class Prism::Pattern::CompilationError < ::StandardError + # Create a new CompilationError with the given representation of the node + # that caused the error. + # + # @return [CompilationError] a new instance of CompilationError + # + # source://prism//lib/prism/pattern.rb#43 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#12986 +class Prism::PinnedExpressionNode < ::Prism::Node + # Initialize a new PinnedExpressionNode node. + # + # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode + # + # source://prism//lib/prism/node.rb#12988 + 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 + ).void + end + 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#13088 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13000 + 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#13005 + 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#13015 + 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#13010 + sig { override.returns(T::Array[Prism::Node]) } + 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#13020 + sig do + params( + 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 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#13005 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#13028 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#13033 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13072 + sig { override.returns(String) } + def inspect; end + + # def lparen: () -> String + # + # source://prism//lib/prism/node.rb#13062 + sig { returns(String) } + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://prism//lib/prism/node.rb#13043 + sig { returns(Prism::Location) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13057 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13036 + sig { returns(Prism::Location) } + def operator_loc; end + + # def rparen: () -> String + # + # source://prism//lib/prism/node.rb#13067 + sig { returns(String) } + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://prism//lib/prism/node.rb#13050 + sig { returns(Prism::Location) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13077 + 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#13082 + 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#13101 +class Prism::PinnedVariableNode < ::Prism::Node + # Initialize a new PinnedVariableNode node. + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # source://prism//lib/prism/node.rb#13103 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).void + end + 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#13177 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13113 + 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#13118 + 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#13128 + 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#13123 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode + # + # source://prism//lib/prism/node.rb#13133 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + 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#13118 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } + # + # source://prism//lib/prism/node.rb#13141 + 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#13161 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13156 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13149 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13166 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode + # + # source://prism//lib/prism/node.rb#13146 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) + end + def variable; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism//lib/prism/node.rb#13171 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13188 +class Prism::PostExecutionNode < ::Prism::Node + # Initialize a new PostExecutionNode node. + # + # @return [PostExecutionNode] a new instance of PostExecutionNode + # + # source://prism//lib/prism/node.rb#13190 + 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 + ).void + end + 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#13292 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13202 + 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#13207 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13271 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13254 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13219 + 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#13212 + sig { override.returns(T::Array[Prism::Node]) } + 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#13224 + sig do + params( + 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 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#13207 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#13232 + 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#13276 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13261 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13240 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13266 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13247 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#13237 + 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#13281 + 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#13286 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13305 +class Prism::PreExecutionNode < ::Prism::Node + # Initialize a new PreExecutionNode node. + # + # @return [PreExecutionNode] a new instance of PreExecutionNode + # + # source://prism//lib/prism/node.rb#13307 + 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 + ).void + end + 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#13409 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13319 + 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#13324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13388 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13371 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13336 + 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#13329 + sig { override.returns(T::Array[Prism::Node]) } + 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#13341 + sig do + params( + 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 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#13324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#13349 + 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#13393 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#13378 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#13357 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13383 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13364 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#13354 + 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#13398 + 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#13403 + def type; end + end +end + +# The top level node of any parse tree. +# +# source://prism//lib/prism/node.rb#13419 +class Prism::ProgramNode < ::Prism::Node + # Initialize a new ProgramNode node. + # + # @return [ProgramNode] a new instance of ProgramNode + # + # source://prism//lib/prism/node.rb#13421 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).void + end + 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#13486 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13431 + 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#13436 + 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#13446 + 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#13441 + sig { override.returns(T::Array[Prism::Node]) } + 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#13451 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end + 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#13436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#13459 + 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#13470 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#13464 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader statements: StatementsNode + # + # source://prism//lib/prism/node.rb#13467 + sig { returns(Prism::StatementsNode) } + def statements; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13475 + 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#13480 + def type; end + end +end + +# Flags for range and flip-flop nodes. +# +# source://prism//lib/prism/node.rb#16774 +module Prism::RangeFlags; end + +# ... operator +# +# source://prism//lib/prism/node.rb#16776 +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#13501 +class Prism::RangeNode < ::Prism::Node + # Initialize a new RangeNode node. + # + # @return [RangeNode] a new instance of RangeNode + # + # source://prism//lib/prism/node.rb#13503 + 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#13602 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13514 + 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#13519 + 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#13532 + 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#13524 + 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#13537 + 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#13519 + 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#13545 + 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#13550 + 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#13586 + 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#13561 + sig { returns(T.nilable(Prism::Node)) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13581 + sig { returns(String) } + def operator; end + + # The location of the `..` or `...` operator. + # + # source://prism//lib/prism/node.rb#13574 + 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#13571 + 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#13591 + 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#13596 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://prism//lib/prism/node.rb#13615 +class Prism::RationalNode < ::Prism::Node + # Initialize a new RationalNode node. + # + # @return [RationalNode] a new instance of RationalNode + # + # source://prism//lib/prism/node.rb#13617 + 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#13706 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13627 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def binary?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13660 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13632 + 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#13642 + 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#13637 + 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#13647 + 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#13665 + sig { returns(T::Boolean) } + def decimal?; end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13632 + 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#13655 + 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#13687 + 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#13675 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13690 + sig { override.returns(String) } + def inspect; end + + # The numerator of the rational number. + # + # 1.5r # numerator 3 + # + # source://prism//lib/prism/node.rb#13682 + 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#13670 + sig { returns(T::Boolean) } + def octal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13695 + 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#13700 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# source://prism//lib/prism/node.rb#13718 +class Prism::RedoNode < ::Prism::Node + # Initialize a new RedoNode node. + # + # @return [RedoNode] a new instance of RedoNode + # + # source://prism//lib/prism/node.rb#13720 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#13777 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13728 + 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#13733 + 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#13743 + 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#13738 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode + # + # source://prism//lib/prism/node.rb#13748 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RedoNode) } + 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#13733 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#13756 + 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#13761 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#13766 + 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#13771 + 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#16780 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# source://prism//lib/prism/node.rb#16797 +Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) + +# e - forces the EUC-JP encoding +# +# source://prism//lib/prism/node.rb#16794 +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#16785 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#16809 +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#16812 +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#16806 +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#16782 +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#16788 +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#16791 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# source://prism//lib/prism/node.rb#16803 +Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) + +# s - forces the Windows-31J encoding +# +# source://prism//lib/prism/node.rb#16800 +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#13786 +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#13788 + 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#13943 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13800 + 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#13858 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#13805 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#13922 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#13902 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#13815 + 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#13810 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#13917 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#13895 + 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#13820 + 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#13805 + 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#13828 + 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#13853 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13838 + 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#13878 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13883 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13873 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13833 + sig { returns(T::Boolean) } + def ignore_case?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#13927 + sig { override.returns(String) } + def inspect; end + + # def multi_line?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13843 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13848 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13912 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#13888 + 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#13932 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#13909 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13868 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13863 + 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#13937 + 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#13958 +class Prism::RequiredKeywordParameterNode < ::Prism::Node + # Initialize a new RequiredKeywordParameterNode node. + # + # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode + # + # source://prism//lib/prism/node.rb#13960 + 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#14034 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#13970 + 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#13975 + 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#13985 + 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#13980 + 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#13990 + 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#13975 + 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#13998 + 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#14018 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14008 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#14011 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14003 + 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#14023 + 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#14028 + 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#14047 +class Prism::RequiredParameterNode < ::Prism::Node + # Initialize a new RequiredParameterNode node. + # + # @return [RequiredParameterNode] a new instance of RequiredParameterNode + # + # source://prism//lib/prism/node.rb#14049 + 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#14115 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14058 + 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#14063 + 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#14073 + 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#14068 + 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#14078 + 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#14063 + 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#14086 + 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#14099 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14096 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14091 + 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#14104 + 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#14109 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14126 +class Prism::RescueModifierNode < ::Prism::Node + # Initialize a new RescueModifierNode node. + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://prism//lib/prism/node.rb#14128 + 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 + ).void + end + 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#14206 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14139 + 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#14144 + 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#14154 + 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#14149 + sig { override.returns(T::Array[Prism::Node]) } + 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#14159 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end + 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#14144 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#14167 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#14172 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14190 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14185 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14175 + sig { returns(Prism::Location) } + 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#14182 + sig { returns(Prism::Node) } + def rescue_expression; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14195 + 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#14200 + 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 `reference` field. +# +# source://prism//lib/prism/node.rb#14223 +class Prism::RescueNode < ::Prism::Node + # Initialize a new RescueNode node. + # + # @return [RescueNode] a new instance of RescueNode + # + # source://prism//lib/prism/node.rb#14225 + 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(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).void + end + 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#14335 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14239 + 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#14244 + 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#14259 + 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#14249 + sig { override.returns(T::Array[Prism::Node]) } + 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: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode + # + # source://prism//lib/prism/node.rb#14264 + sig do + params( + 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(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end + 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#14244 + 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, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, statements: StatementsNode?, subsequent: RescueNode? } + # + # source://prism//lib/prism/node.rb#14272 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#14284 + sig { returns(T::Array[Prism::Node]) } + def exceptions; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14319 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14309 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14277 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#14314 + sig { returns(T.nilable(String)) } + def operator; end + + # attr_reader operator_loc: Location? + # + # source://prism//lib/prism/node.rb#14287 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil + # + # source://prism//lib/prism/node.rb#14300 + sig do + returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) + end + def reference; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#14303 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # attr_reader subsequent: RescueNode? + # + # source://prism//lib/prism/node.rb#14306 + sig { returns(T.nilable(Prism::RescueNode)) } + def subsequent; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14324 + 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#14329 + 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#14352 +class Prism::RestParameterNode < ::Prism::Node + # Initialize a new RestParameterNode node. + # + # @return [RestParameterNode] a new instance of RestParameterNode + # + # source://prism//lib/prism/node.rb#14354 + 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#14447 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14365 + 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#14370 + 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#14380 + 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#14375 + 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#14385 + 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#14370 + 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#14393 + 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#14431 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol? + # + # source://prism//lib/prism/node.rb#14403 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # source://prism//lib/prism/node.rb#14406 + sig { returns(T.nilable(Prism::Location)) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14426 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14419 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14398 + 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#14436 + 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#14441 + 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#662 +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#684 + 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 + + # Create a code units cache for the given encoding. + # + # source://prism//lib/prism/parse_result.rb#716 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # The list of comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#664 + 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#672 + 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#694 + 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#699 + sig { returns(Encoding) } + def encoding; end + + # The list of errors that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#675 + 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#711 + sig { returns(T::Boolean) } + def failure?; end + + # The list of magic comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#667 + 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#681 + 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#705 + sig { returns(T::Boolean) } + def success?; end + + # The list of warnings that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#678 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + +# Represents the use of the `retry` keyword. +# +# retry +# ^^^^^ +# +# source://prism//lib/prism/node.rb#14460 +class Prism::RetryNode < ::Prism::Node + # Initialize a new RetryNode node. + # + # @return [RetryNode] a new instance of RetryNode + # + # source://prism//lib/prism/node.rb#14462 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#14519 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14470 + 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#14475 + 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#14485 + 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#14480 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode + # + # source://prism//lib/prism/node.rb#14490 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RetryNode) } + 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#14475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14498 + 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#14503 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14508 + 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#14513 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14528 +class Prism::ReturnNode < ::Prism::Node + # Initialize a new ReturnNode node. + # + # @return [ReturnNode] a new instance of ReturnNode + # + # source://prism//lib/prism/node.rb#14530 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).void + end + 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#14606 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14540 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#14582 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14545 + 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#14557 + 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#14550 + sig { override.returns(T::Array[Prism::Node]) } + 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#14562 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end + 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#14545 + 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, arguments: ArgumentsNode? } + # + # source://prism//lib/prism/node.rb#14570 + 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#14590 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14585 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14575 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14595 + 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#14600 + def type; end + end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# source://prism//lib/prism/node.rb#14617 +class Prism::SelfNode < ::Prism::Node + # Initialize a new SelfNode node. + # + # @return [SelfNode] a new instance of SelfNode + # + # source://prism//lib/prism/node.rb#14619 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#14676 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14627 + 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#14632 + 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#14642 + 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#14637 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode + # + # source://prism//lib/prism/node.rb#14647 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SelfNode) } + 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#14632 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14655 + 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#14660 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14665 + 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#14670 + 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#51 + def load_tokens(source, serialized); end + end +end + +# source://prism//lib/prism/serialize.rb#55 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # source://prism//lib/prism/serialize.rb#91 + def initialize(source, serialized); end + + # Returns the value of attribute constant_pool. + # + # source://prism//lib/prism/serialize.rb#88 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://prism//lib/prism/serialize.rb#88 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://prism//lib/prism/serialize.rb#87 + def encoding; end + + # Returns the value of attribute input. + # + # source://prism//lib/prism/serialize.rb#87 + def input; end + + # Returns the value of attribute io. + # + # source://prism//lib/prism/serialize.rb#87 + def io; end + + # source://prism//lib/prism/serialize.rb#129 + def load_comments; end + + # source://prism//lib/prism/serialize.rb#115 + def load_encoding; end + + # source://prism//lib/prism/serialize.rb#106 + def load_header; end + + # source://prism//lib/prism/serialize.rb#125 + def load_line_offsets; end + + # source://prism//lib/prism/serialize.rb#462 + def load_metadata; end + + # source://prism//lib/prism/serialize.rb#496 + def load_nodes; end + + # source://prism//lib/prism/serialize.rb#510 + def load_result; end + + # source://prism//lib/prism/serialize.rb#121 + def load_start_line; end + + # source://prism//lib/prism/serialize.rb#471 + def load_tokens; end + + # source://prism//lib/prism/serialize.rb#484 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://prism//lib/prism/serialize.rb#87 + def serialized; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/serialize.rb#88 + def source; end + + # Returns the value of attribute start_line. + # + # source://prism//lib/prism/serialize.rb#89 + def start_line; end + + private + + # source://prism//lib/prism/serialize.rb#596 + def load_constant(index); end + + # source://prism//lib/prism/serialize.rb#549 + def load_double; end + + # source://prism//lib/prism/serialize.rb#564 + def load_embedded_string; end + + # source://prism//lib/prism/serialize.rb#626 + def load_error_level; end + + # source://prism//lib/prism/serialize.rb#538 + def load_integer; end + + # source://prism//lib/prism/serialize.rb#580 + def load_location; end + + # source://prism//lib/prism/serialize.rb#584 + def load_location_object; end + + # source://prism//lib/prism/serialize.rb#655 + def load_node; end + + # source://prism//lib/prism/serialize.rb#621 + def load_optional_constant; end + + # source://prism//lib/prism/serialize.rb#588 + def load_optional_location; end + + # source://prism//lib/prism/serialize.rb#592 + def load_optional_location_object; end + + # source://prism//lib/prism/serialize.rb#557 + def load_optional_node; end + + # source://prism//lib/prism/serialize.rb#617 + def load_required_constant; end + + # source://prism//lib/prism/serialize.rb#568 + def load_string; end + + # source://prism//lib/prism/serialize.rb#553 + def load_uint32; end + + # source://prism//lib/prism/serialize.rb#533 + 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#519 + def load_varuint; end + + # source://prism//lib/prism/serialize.rb#641 + def load_warning_level; end +end + +# source://prism//lib/prism/serialize.rb#138 +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#83 +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#1737 +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#14686 +class Prism::ShareableConstantNode < ::Prism::Node + # Initialize a new ShareableConstantNode node. + # + # @return [ShareableConstantNode] a new instance of ShareableConstantNode + # + # source://prism//lib/prism/node.rb#14688 + 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#14764 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14697 + 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#14702 + 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#14712 + 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#14707 + 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#14717 + 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#14702 + 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#14725 + 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#14740 + sig { returns(T::Boolean) } + def experimental_copy?; end + + # def experimental_everything?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14735 + 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#14748 + sig { override.returns(String) } + def inspect; end + + # def literal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#14730 + sig { returns(T::Boolean) } + def literal?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14753 + sig { override.returns(Symbol) } + def type; end + + # The constant write that should be modified with the shareability state. + # + # source://prism//lib/prism/node.rb#14745 + 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#14758 + def type; end + end +end + +# Flags for shareable constant nodes. +# +# source://prism//lib/prism/node.rb#16816 +module Prism::ShareableConstantNodeFlags; end + +# constant writes that should be modified with shareable constant value experimental copy +# +# source://prism//lib/prism/node.rb#16824 +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#16821 +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#16818 +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#14775 +class Prism::SingletonClassNode < ::Prism::Node + # Initialize a new SingletonClassNode node. + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://prism//lib/prism/node.rb#14777 + 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(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).void + end + 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#14888 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14791 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: StatementsNode | BeginNode | nil + # + # source://prism//lib/prism/node.rb#14847 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#14796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#14857 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14830 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#14809 + 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#14801 + sig { override.returns(T::Array[Prism::Node]) } + 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: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode + # + # source://prism//lib/prism/node.rb#14814 + sig do + params( + 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(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end + 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#14796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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: StatementsNode | BeginNode | nil, end_keyword_loc: Location } + # + # source://prism//lib/prism/node.rb#14822 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def end_keyword: () -> String + # + # source://prism//lib/prism/node.rb#14867 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14850 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#14844 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#14872 + sig { override.returns(String) } + def inspect; end + + # attr_reader locals: Array[Symbol] + # + # source://prism//lib/prism/node.rb#14827 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14862 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14837 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14877 + 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#14882 + 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#45 + 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#97 + 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#92 + sig { params(byte_offset: Integer).returns(Integer) } + def character_offset(byte_offset); end + + # Generate a cache that targets a specific encoding for calculating code + # unit offsets. + # + # source://prism//lib/prism/parse_result.rb#125 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + + # Returns the column number in code units for the given encoding for the + # given byte offset. + # + # source://prism//lib/prism/parse_result.rb#131 + 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. + # + # We purposefully replace invalid and undefined characters with replacement + # characters in this conversion. This happens for two reasons. First, it's + # possible that the given byte offset will not occur on a character + # boundary. Second, it's possible that the source code will contain a + # character that has no equivalent in the given encoding. + # + # source://prism//lib/prism/parse_result.rb#113 + 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#87 + 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#53 + 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#70 + 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#82 + 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#76 + 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#58 + 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#42 + 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#64 + 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#36 + sig { returns(String) } + def source; end + + # The line number where this source starts. + # + # source://prism//lib/prism/parse_result.rb#39 + 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#139 + 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#14904 +class Prism::SourceEncodingNode < ::Prism::Node + # Initialize a new SourceEncodingNode node. + # + # @return [SourceEncodingNode] a new instance of SourceEncodingNode + # + # source://prism//lib/prism/node.rb#14906 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#14963 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14914 + 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#14919 + 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#14929 + 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#14924 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode + # + # source://prism//lib/prism/node.rb#14934 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceEncodingNode) } + 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#14919 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#14942 + 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#14947 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#14952 + 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#14957 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14972 +class Prism::SourceFileNode < ::Prism::Node + # Initialize a new SourceFileNode node. + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # source://prism//lib/prism/node.rb#14974 + 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#15055 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#14983 + 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#14988 + 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#14998 + 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#14993 + 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#15003 + 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#14988 + 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#15011 + 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#15036 + sig { returns(String) } + def filepath; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15021 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15016 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15026 + sig { returns(T::Boolean) } + def frozen?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15039 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15031 + sig { returns(T::Boolean) } + def mutable?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15044 + 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#15049 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15066 +class Prism::SourceLineNode < ::Prism::Node + # Initialize a new SourceLineNode node. + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#15068 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#15125 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15076 + 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#15081 + 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#15091 + 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#15086 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode + # + # source://prism//lib/prism/node.rb#15096 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceLineNode) } + 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#15081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#15104 + 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#15109 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15114 + 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#15119 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://prism//lib/prism/node.rb#15134 +class Prism::SplatNode < ::Prism::Node + # Initialize a new SplatNode node. + # + # @return [SplatNode] a new instance of SplatNode + # + # source://prism//lib/prism/node.rb#15136 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).void + end + 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#15212 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15146 + 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#15151 + 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#15163 + 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#15156 + sig { override.returns(T::Array[Prism::Node]) } + 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#15168 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end + 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#15151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#15176 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node? + # + # source://prism//lib/prism/node.rb#15188 + sig { returns(T.nilable(Prism::Node)) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15196 + sig { override.returns(String) } + def inspect; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15191 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15181 + sig { returns(Prism::Location) } + def operator_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15201 + 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#15206 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15223 +class Prism::StatementsNode < ::Prism::Node + # Initialize a new StatementsNode node. + # + # @return [StatementsNode] a new instance of StatementsNode + # + # source://prism//lib/prism/node.rb#15225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).void + end + 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#15286 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15234 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#15267 + sig { returns(T::Array[Prism::Node]) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15239 + 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#15249 + 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#15244 + sig { override.returns(T::Array[Prism::Node]) } + 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#15254 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end + 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#15239 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } + # + # source://prism//lib/prism/node.rb#15262 + 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#15270 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15275 + 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#15280 + def type; end + end +end + +# Flags for string nodes. +# +# source://prism//lib/prism/node.rb#16828 +module Prism::StringFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#16833 +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#16830 +Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#16836 +Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#16839 +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#15303 +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#15305 + 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#15437 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15317 + 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#15322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#15416 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15390 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15332 + 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#15327 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#15411 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#15383 + 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#15337 + 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#15322 + 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#15345 + 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#15355 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15350 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15360 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15421 + sig { override.returns(String) } + def inspect; end + + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15365 + sig { returns(T::Boolean) } + def mutable?; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#15406 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#15370 + 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#15426 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15403 + 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#15431 + 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#15454 +class Prism::SuperNode < ::Prism::Node + # Initialize a new SuperNode node. + # + # @return [SuperNode] a new instance of SuperNode + # + # source://prism//lib/prism/node.rb#15456 + 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(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).void + end + 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#15575 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15469 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#15525 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: BlockNode | BlockArgumentNode | nil + # + # source://prism//lib/prism/node.rb#15541 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15474 + 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#15487 + 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#15479 + sig { override.returns(T::Array[Prism::Node]) } + 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: BlockNode | BlockArgumentNode | nil) -> SuperNode + # + # source://prism//lib/prism/node.rb#15492 + sig do + params( + 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(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end + 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#15474 + 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, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil } + # + # source://prism//lib/prism/node.rb#15500 + 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#15559 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15544 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15505 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#15549 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#15512 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#15554 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#15528 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15564 + 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#15569 + def type; end + end +end + +# Flags for symbol nodes. +# +# source://prism//lib/prism/node.rb#16843 +module Prism::SymbolFlags; end + +# internal bytes forced the encoding to binary +# +# source://prism//lib/prism/node.rb#16848 +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#16851 +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#16845 +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#15592 +class Prism::SymbolNode < ::Prism::Node + # Initialize a new SymbolNode node. + # + # @return [SymbolNode] a new instance of SymbolNode + # + # source://prism//lib/prism/node.rb#15594 + 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#15727 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15606 + 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#15611 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#15706 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#15680 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#15621 + 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#15616 + 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#15626 + 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#15611 + 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#15634 + 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#15644 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15649 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15639 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15711 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#15696 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#15654 + 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#15716 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#15693 + sig { returns(String) } + def unescaped; end + + # def value: () -> String? + # + # source://prism//lib/prism/node.rb#15701 + sig { returns(T.nilable(String)) } + def value; end + + # attr_reader value_loc: Location? + # + # source://prism//lib/prism/node.rb#15667 + 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#15721 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# source://prism//lib/prism/parse_result.rb#799 +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#811 + 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#846 + 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#819 + 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#853 + def inspect; end + + # A Location object representing the location of this token in the source. + # + # source://prism//lib/prism/parse_result.rb#824 + sig { returns(Prism::Location) } + def location; end + + # Implement the pretty print interface for Token. + # + # source://prism//lib/prism/parse_result.rb#831 + 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#805 + sig { returns(Symbol) } + def type; end + + # A byteslice of the source that this token represents. + # + # source://prism//lib/prism/parse_result.rb#808 + 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#801 + sig { returns(Prism::Source) } + def source; end +end + +# This module is responsible for converting the prism syntax tree into other +# syntax trees. +# +# source://prism//lib/prism/translation.rb#6 +module Prism::Translation; end + +# This class is the entry-point for converting a prism syntax tree into the +# whitequark/parser gem's syntax tree. It inherits from the base parser for +# the parser gem, and overrides the parse* methods to parse with prism and +# then translate. +# +# source://prism//lib/prism/translation/parser.rb#16 +class Prism::Translation::Parser < ::Parser::Base + # The default encoding for Ruby files is UTF-8. + # + # source://prism//lib/prism/translation/parser.rb#41 + def default_encoding; end + + # Parses a source buffer and returns the AST. + # + # source://prism//lib/prism/translation/parser.rb#49 + def parse(source_buffer); end + + # Parses a source buffer and returns the AST and the source code comments. + # + # source://prism//lib/prism/translation/parser.rb#62 + def parse_with_comments(source_buffer); end + + # Parses a source buffer and returns the AST, the source code comments, + # and the tokens emitted by the lexer. + # + # source://prism//lib/prism/translation/parser.rb#79 + def tokenize(source_buffer, recover = T.unsafe(nil)); end + + # Since prism resolves num params for us, we don't need to support this + # kind of logic here. + # + # source://prism//lib/prism/translation/parser.rb#105 + def try_declare_numparam(node); end + + # source://prism//lib/prism/translation/parser.rb#36 + sig { overridable.returns(Integer) } + def version; end + + # source://prism//lib/prism/translation/parser.rb#45 + def yyerror; end + + private + + # Build the parser gem AST from the prism AST. + # + # source://prism//lib/prism/translation/parser.rb#263 + def build_ast(program, offset_cache); end + + # Build the parser gem comments from the prism comments. + # + # source://prism//lib/prism/translation/parser.rb#268 + def build_comments(comments, offset_cache); end + + # Prism deals with offsets in bytes, while the parser gem deals with + # offsets in characters. We need to handle this conversion in order to + # build the parser gem AST. + # + # If the bytesize of the source is the same as the length, then we can + # just use the offset directly. Otherwise, we build an array where the + # index is the byte offset and the value is the character offset. + # + # source://prism//lib/prism/translation/parser.rb#246 + def build_offset_cache(source); end + + # Build a range from a prism location. + # + # source://prism//lib/prism/translation/parser.rb#280 + def build_range(location, offset_cache); end + + # Build the parser gem tokens from the prism tokens. + # + # source://prism//lib/prism/translation/parser.rb#275 + def build_tokens(tokens, offset_cache); end + + # Converts the version format handled by Parser to the format handled by Prism. + # + # source://prism//lib/prism/translation/parser.rb#289 + def convert_for_prism(version); end + + # Build a diagnostic from the given prism parse error. + # + # source://prism//lib/prism/translation/parser.rb#124 + def error_diagnostic(error, offset_cache); end + + # If there was a error generated during the parse, then raise an + # appropriate syntax error. Otherwise return the result. + # + # source://prism//lib/prism/translation/parser.rb#224 + def unwrap(result, offset_cache); end + + # This is a hook to allow consumers to disable some errors if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#113 + def valid_error?(error); end + + # This is a hook to allow consumers to disable some warnings if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#119 + def valid_warning?(warning); end + + # Build a diagnostic from the given prism parse warning. + # + # source://prism//lib/prism/translation/parser.rb#197 + def warning_diagnostic(warning, offset_cache); end +end + +# This class is the entry-point for Ruby 3.3 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser33.rb#6 +class Prism::Translation::Parser33 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser33.rb#7 + sig { override.returns(Integer) } + def version; end +end + +# This class is the entry-point for Ruby 3.4 of `Prism::Translation::Parser`. +# +# source://prism//lib/prism/translation/parser34.rb#6 +class Prism::Translation::Parser34 < ::Prism::Translation::Parser + # source://prism//lib/prism/translation/parser34.rb#7 + sig { override.returns(Integer) } + def version; end +end + +# A visitor that knows how to convert a prism syntax tree into the +# whitequark/parser gem's syntax tree. +# +# source://prism//lib/prism/translation/parser/compiler.rb#8 +class Prism::Translation::Parser::Compiler < ::Prism::Compiler + # Initialize a new compiler with the given parser, offset cache, and + # options. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/parser/compiler.rb#39 + def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # The Parser::Builders::Default instance that is being used to build the + # AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#18 + def builder; end + + # The types of values that can be forwarded in the current scope. + # + # source://prism//lib/prism/translation/parser/compiler.rb#29 + def forwarding; end + + # Whether or not the current node is in a destructure. + # + # source://prism//lib/prism/translation/parser/compiler.rb#32 + def in_destructure; end + + # Whether or not the current node is in a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#35 + def in_pattern; end + + # The offset cache that is used to map between byte and character + # offsets in the file. + # + # source://prism//lib/prism/translation/parser/compiler.rb#26 + def offset_cache; end + + # The Parser::Base instance that is being used to build the AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#14 + def parser; end + + # The Parser::Source::Buffer instance that is holding a reference to the + # source code. + # + # source://prism//lib/prism/translation/parser/compiler.rb#22 + def source_buffer; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#58 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#52 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#64 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#70 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#105 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#76 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#82 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#111 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#160 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#172 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#178 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#216 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#222 + def visit_block_local_variable_node(node); end + + # A block on a keyword or method call. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#227 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#233 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/parser/compiler.rb#238 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#247 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#352 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#259 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#333 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#371 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#390 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#402 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#421 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#408 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#434 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#473 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#463 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#483 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#447 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#493 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#453 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#524 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#514 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#534 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#590 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#550 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#580 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#600 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#610 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#570 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#499 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#544 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#508 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#619 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#666 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#678 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#684 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#694 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#700 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#706 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#712 + def visit_find_pattern_node(node); end + + # 0..5 + # ^^^^ + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1475 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#724 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#730 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#748 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#754 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#763 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#801 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#791 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#811 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#775 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#821 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#781 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#827 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#837 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#855 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#897 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#903 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#909 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#915 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#959 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#941 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#977 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#995 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1032 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1022 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1042 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1006 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1052 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1012 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1058 + def visit_integer_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1064 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1064 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1079 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1113 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1123 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1137 + def visit_it_local_variable_read_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1143 + def visit_it_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1149 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1158 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1167 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1219 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1209 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1229 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1193 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1239 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1199 + def visit_local_variable_write_node(node); end + + # /foo/ + # ^^^^^ + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1509 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1249 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1259 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1269 + def visit_match_write_node(node); end + + # A node that is missing from the syntax tree. This is only used in the + # case of a syntax error. The parser gem doesn't have such a concept, so + # we invent our own here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1280 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1286 + def visit_module_node(node); end + + # foo, bar = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1297 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1307 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1330 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1342 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1348 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1358 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1364 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1370 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1376 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1382 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1388 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1427 + def visit_parentheses_node(node); end + + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1437 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1444 + def visit_pinned_variable_node(node); end + + # END {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1449 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # source://prism//lib/prism/translation/parser/compiler.rb#1459 + def visit_pre_execution_node(node); end + + # The top-level program node. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1469 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1475 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1497 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1503 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1509 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1535 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1541 + def visit_required_parameter_node(node); end + + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1547 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1565 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1574 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1580 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1589 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1601 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1606 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1612 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1624 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1630 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1636 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1648 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1661 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1667 + def visit_string_node(node); end + + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1709 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1732 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1764 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1770 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1779 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1809 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1831 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1849 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1871 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1902 + def visit_yield_node(node); end + + private + + # The parser gem automatically converts \r\n to \n, meaning our offsets + # need to be adjusted to always subtract 1 from the length. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2045 + def chomped_bytesize(line); end + + # Initialize a new compiler with the given option overrides, used to + # visit a subtree with the given options. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1916 + def copy_compiler(forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # When *, **, &, or ... are used as an argument in a method call, we + # check if they were allowed by the current context. To determine that + # we build this lookup table. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1923 + def find_forwarding(node); end + + # Returns the set of targets for a MultiTargetNode or a MultiWriteNode. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1936 + def multi_target_elements(node); end + + # Negate the value of a numeric node. This is a special case where you + # have a negative sign on one line and then a number on the next line. + # In normal Ruby, this will always be a method call. The parser gem, + # however, marks this as a numeric literal. We have to massage the tree + # here to get it into the correct form. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1948 + def numeric_negate(message_loc, receiver); end + + # Blocks can have a special set of parameters that automatically expand + # when given arrays if they have a single required parameter and no + # other parameters. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1962 + def procarg0?(parameters); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1979 + def srange(location); end + + # Constructs a new source range by finding the given tokens between the + # given start offset and end offset. If the needle is not found, it + # returns nil. Importantly it does not search past newlines or comments. + # + # Note that end_offset is allowed to be nil, in which case this will + # search until the end of the string. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1994 + def srange_find(start_offset, end_offset, tokens); end + + # Constructs a new source range from the given start and end offsets. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1984 + def srange_offsets(start_offset, end_offset); end + + # Transform a location into a token that the parser gem expects. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2004 + def token(location); end + + # Visit a block node on a call. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2009 + def visit_block(call, block); end + + # Visit a heredoc that can be either a string or an xstring. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2051 + def visit_heredoc(node); end + + # Visit a numeric node and account for the optional sign. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2123 + def visit_numeric(node, value); end + + # Within the given block, track that we're within a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#2135 + def within_pattern; end +end + +# Raised when the tree is malformed or there is a bug in the compiler. +# +# source://prism//lib/prism/translation/parser/compiler.rb#10 +class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end + +# Locations in the parser gem AST are generated using this class. We +# store a reference to its constant to make it slightly faster to look +# up. +# +# source://prism//lib/prism/translation/parser/compiler.rb#1976 +Prism::Translation::Parser::Compiler::Range = Parser::Source::Range + +# source://prism//lib/prism/translation/parser.rb#17 +Prism::Translation::Parser::Diagnostic = Parser::Diagnostic + +# Accepts a list of prism tokens and converts them into the expected +# format for the parser gem. +# +# source://prism//lib/prism/translation/parser/lexer.rb#8 +class Prism::Translation::Parser::Lexer + # Initialize the lexer with the given source buffer, prism tokens, and + # offset cache. + # + # @return [Lexer] a new instance of Lexer + # + # source://prism//lib/prism/translation/parser/lexer.rb#217 + def initialize(source_buffer, lexed, offset_cache); end + + # An array of tuples that contain prism tokens and their associated lex + # state when they were lexed. + # + # source://prism//lib/prism/translation/parser/lexer.rb#210 + def lexed; end + + # A hash that maps offsets in bytes to offsets in characters. + # + # source://prism//lib/prism/translation/parser/lexer.rb#213 + def offset_cache; end + + # The Parser::Source::Buffer that the tokens were lexed from. + # + # source://prism//lib/prism/translation/parser/lexer.rb#206 + def source_buffer; end + + # Convert the prism tokens into the expected format for the parser gem. + # + # source://prism//lib/prism/translation/parser/lexer.rb#227 + def to_a; end + + private + + # Parse a complex from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#409 + def parse_complex(value); end + + # Parse a float from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#402 + def parse_float(value); end + + # Parse an integer from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#395 + def parse_integer(value); end + + # Parse a rational from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#424 + def parse_rational(value); end +end + +# These constants represent flags in our lex state. We really, really +# don't want to be using them and we really, really don't want to be +# exposing them as part of our public API. Unfortunately, we don't have +# another way of matching the exact tokens that the parser gem expects +# without them. We should find another way to do this, but in the +# meantime we'll hide them from the documentation and mark them as +# private constants. +# +# source://prism//lib/prism/translation/parser/lexer.rb#187 +Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#188 +Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# It is used to determine whether `do` is of the token type `kDO` or `kDO_LAMBDA`. +# +# NOTE: In edge cases like `-> (foo = -> (bar) {}) do end`, please note that `kDO` is still returned +# instead of `kDO_LAMBDA`, which is expected: https://github.com/ruby/prism/pull/3046 +# +# source://prism//lib/prism/translation/parser/lexer.rb#194 +Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# The `PARENTHESIS_LEFT` token in Prism is classified as either `tLPAREN` or `tLPAREN2` in the Parser gem. +# The following token types are listed as those classified as `tLPAREN`. +# +# source://prism//lib/prism/translation/parser/lexer.rb#198 +Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://prism//lib/prism/translation/parser/lexer.rb#223 +Prism::Translation::Parser::Lexer::Range = Parser::Source::Range + +# The direct translating of types between the two lexers. +# +# source://prism//lib/prism/translation/parser/lexer.rb#10 +Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) + +# The parser gem has a list of diagnostics with a hard-coded set of error +# messages. We create our own diagnostic class in order to set our own +# error messages. +# +# source://prism//lib/prism/translation/parser.rb#23 +class Prism::Translation::Parser::PrismDiagnostic < ::Parser::Diagnostic + # Initialize a new diagnostic with the given message and location. + # + # @return [PrismDiagnostic] a new instance of PrismDiagnostic + # + # source://prism//lib/prism/translation/parser.rb#28 + def initialize(message, level, reason, location); end + + # This is the cached message coming from prism. + # + # source://prism//lib/prism/translation/parser.rb#25 + def message; end +end + +# source://prism//lib/prism/translation/parser.rb#34 +Prism::Translation::Parser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# This class provides a compatibility layer between prism and Ripper. It +# functions by parsing the entire tree first and then walking it and +# executing each of the Ripper callbacks as it goes. To use this class, you +# treat `Prism::Translation::Ripper` effectively as you would treat the +# `Ripper` class. +# +# Note that this class will serve the most common use cases, but Ripper's +# API is extensive and undocumented. It relies on reporting the state of the +# parser at any given time. We do our best to replicate that here, but +# because it is a different architecture it is not possible to perfectly +# replicate the behavior of Ripper. +# +# The main known difference is that we may omit dispatching some events in +# some cases. This impacts the following events: +# +# - on_assign_error +# - on_comma +# - on_ignored_nl +# - on_ignored_sp +# - on_kw +# - on_label_end +# - on_lbrace +# - on_lbracket +# - on_lparen +# - on_nl +# - on_op +# - on_operator_ambiguous +# - on_rbrace +# - on_rbracket +# - on_rparen +# - on_semicolon +# - on_sp +# - on_symbeg +# - on_tstring_beg +# - on_tstring_end +# +# source://prism//lib/prism/translation/ripper.rb#43 +class Prism::Translation::Ripper < ::Prism::Compiler + # Create a new Translation::Ripper object with the given source. + # + # @return [Ripper] a new instance of Ripper + # + # source://prism//lib/prism/translation/ripper.rb#444 + def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # The current column number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#441 + def column; end + + # True if the parser encountered an error during parsing. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#457 + sig { returns(T::Boolean) } + def error?; end + + # The filename of the source being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#435 + def filename; end + + # The current line number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#438 + def lineno; end + + # Parse the source and return the result. + # + # source://prism//lib/prism/translation/ripper.rb#462 + sig { returns(T.untyped) } + def parse; end + + # The source that is being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#432 + def source; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#561 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#551 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#585 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#605 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#796 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#615 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#775 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#803 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#816 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#825 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#832 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#896 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#902 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode. + # + # source://prism//lib/prism/translation/ripper.rb#908 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#944 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ripper.rb#958 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#982 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1194 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1002 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1172 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1216 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1238 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1263 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1286 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1273 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1299 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1352 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1338 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1366 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1317 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1380 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1327 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1422 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1408 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1436 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1523 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1457 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1509 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1537 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1551 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1480 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1387 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1450 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1397 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1560 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1607 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1614 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1630 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1651 + def visit_embedded_variable_node(node); end + + # Visit an EnsureNode node. + # + # source://prism//lib/prism/translation/ripper.rb#1662 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1680 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1687 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1712 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1726 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1732 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1749 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1756 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1766 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1815 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1801 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1829 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1780 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1843 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1790 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1850 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1865 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1907 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1943 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1949 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#1954 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1961 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1996 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1979 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2013 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2030 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2072 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2058 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2086 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2040 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2100 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2047 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2107 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2113 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2132 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2151 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2179 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2192 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2222 + def visit_it_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)/ =~ 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#3385 + def _dispatch_0; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def _dispatch_1(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def _dispatch_2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def _dispatch_3(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def _dispatch_4(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def _dispatch_5(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + 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#3375 + 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#3413 + 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#3428 + def dedent_string(string, width); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_BEGIN(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_CHAR(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_END(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on___end__(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_alias_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_aref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_aref_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_arg_ambiguous(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_arg_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_args_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_args_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_args_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_args_forward; end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_array(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_aryptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_assign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_assign_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_assoc_new(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_assoc_splat(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_assoclist_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_backref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_backtick(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_bare_assoc_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_begin(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_binary(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_block_var(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_blockarg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_bodystmt(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_brace_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_break(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_call(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_case(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_class(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_class_name_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_comma(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_command(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_command_call(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_comment(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_const(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_const_path_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_const_path_ref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_cvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_def(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_defined(_); end + + # source://prism//lib/prism/translation/ripper.rb#3390 + def on_defs(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_do_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_dot2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_dot3(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_dyna_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_else(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_elsif(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embdoc(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embdoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embdoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embexpr_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embexpr_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_embvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ensure(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_excessed_comma; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_fcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_field(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_float(_); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_fndptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_for(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_gvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_heredoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_heredoc_dedent(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_heredoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_hshptn(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ident(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_if(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_if_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_ifop(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ignored_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ignored_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_imaginary(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_in(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_int(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ivar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_kw(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_kwrest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_label(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_label_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_lambda(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_lbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_lbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_lparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_magic_comment(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_massign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_method_add_arg(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_method_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mlhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mlhs_add_post(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mlhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_mlhs_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_module(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mrhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_mrhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_mrhs_new_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_next(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_nokw_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_op(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_opassign(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_operator_ambiguous(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_param_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3391 + def on_params(_, _, _, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_parse_error(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_period(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_program(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_qsymbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_qsymbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_qwords_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_qwords_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rational(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_redo; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_regexp_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_regexp_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_regexp_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_regexp_literal(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_rescue(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_rescue_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_retry; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_return(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_return0; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_rparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_sclass(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_semicolon(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_stmts_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_string_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_string_concat(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_string_content; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_string_dvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_string_embexpr(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_string_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_super(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_symbeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_symbol_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_symbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_symbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tlambda(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tlambeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_top_const_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_top_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tstring_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tstring_content(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_tstring_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_unary(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_undef(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_unless(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_unless_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_until(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_until_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_var_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_var_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_var_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_vcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_void_stmt; end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_when(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_while(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_while_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_word_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_words_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_words_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_words_sep(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_xstring_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_xstring_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_xstring_new; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_yield(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_yield0; end + + # source://prism//lib/prism/translation/ripper.rb#3385 + 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#3280 + 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#3319 + 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#3292 + 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#3337 + 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#3285 + 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#3404 + 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#3409 + def warning(fmt, *args); end + + class << self + # Tokenizes the Ruby program and returns an array of an array, + # which is formatted like + # [[lineno, column], type, token, state]. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # use the +raise_errors+ keyword to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.lex("def m(a) nil end") + # #=> [[[1, 0], :on_kw, "def", FNAME ], + # [[1, 3], :on_sp, " ", FNAME ], + # [[1, 4], :on_ident, "m", ENDFN ], + # [[1, 5], :on_lparen, "(", BEG|LABEL], + # [[1, 6], :on_ident, "a", ARG ], + # [[1, 7], :on_rparen, ")", ENDFN ], + # [[1, 8], :on_sp, " ", BEG ], + # [[1, 9], :on_kw, "nil", END ], + # [[1, 12], :on_sp, " ", END ], + # [[1, 13], :on_kw, "end", END ]] + # + # source://prism//lib/prism/translation/ripper.rb#72 + def lex(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses the given Ruby program read from +src+. + # +src+ must be a String or an IO or a object with a #gets method. + # + # source://prism//lib/prism/translation/ripper.rb#46 + def parse(src, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # Returns more readable tree rather than Ripper.sexp_raw. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp("def m(a) nil end") + # #=> [:program, + # [[:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil, nil, nil, nil]], + # [:bodystmt, [[:var_ref, [:@kw, "nil", [1, 9]]]], nil, nil, nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#381 + def sexp(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + + # Parses +src+ and create S-exp tree. + # This method is mainly for developer use. + # The +filename+ argument is mostly ignored. + # By default, this method does not handle syntax errors in +src+, + # returning +nil+ in such cases. Use the +raise_errors+ keyword + # to raise a SyntaxError for an error in +src+. + # + # require "ripper" + # require "pp" + # + # pp Ripper.sexp_raw("def m(a) nil end") + # #=> [:program, + # [:stmts_add, + # [:stmts_new], + # [:def, + # [:@ident, "m", [1, 4]], + # [:paren, [:params, [[:@ident, "a", [1, 6]]], nil, nil, nil]], + # [:bodystmt, + # [:stmts_add, [:stmts_new], [:var_ref, [:@kw, "nil", [1, 9]]]], + # nil, + # nil, + # nil]]]] + # + # source://prism//lib/prism/translation/ripper.rb#416 + def sexp_raw(src, filename = T.unsafe(nil), lineno = T.unsafe(nil), raise_errors: T.unsafe(nil)); end + end +end + +# A list of all of the Ruby binary operators. +# +# source://prism//lib/prism/translation/ripper.rb#337 +Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# This array contains name of all ripper events. +# +# source://prism//lib/prism/translation/ripper.rb#289 +Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) + +# A list of all of the Ruby keywords. +# +# source://prism//lib/prism/translation/ripper.rb#292 +Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) + +# This array contains name of parser events. +# +# source://prism//lib/prism/translation/ripper.rb#283 +Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the parser events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#84 +Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This array contains name of scanner events. +# +# source://prism//lib/prism/translation/ripper.rb#286 +Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the scanner events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#227 +Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#10 +class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper/sexp.rb#13 + def error; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_BEGIN(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_CHAR(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_END(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on___end__(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_forward(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_array(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aryptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_splat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoclist_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backref(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backtick(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bare_assoc_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_begin(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_binary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_block_var(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_blockarg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bodystmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_brace_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_break(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_case(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class_name_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comma(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comment(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_const(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_cvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_def(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defined(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defs(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_do_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot2(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot3(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dyna_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_else(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_elsif(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ensure(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_excessed_comma(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_float(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fndptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_for(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_gvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hshptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ident(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ifop(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_imaginary(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_in(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_int(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ivar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_kw(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_kwrest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_lambda(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_magic_comment(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_massign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_arg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_post(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_module(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_next(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_nokw_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_op(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_opassign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_operator_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_param_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_params(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_period(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_program(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qsymbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qwords_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rational(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_redo(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_retry(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_sclass(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_semicolon(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_concat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_content(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_dvar(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_embexpr(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_super(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambda(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_content(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_undef(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_vcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_void_stmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_when(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_sep(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_zsuper(*args); end + + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def compile_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#17 + def dedent_element(e, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#24 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_parse_error(mesg); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#74 +class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def _dispatch_event_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def _dispatch_event_push(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_args_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#79 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mlhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#109 + def on_mlhs_add_post(list, post); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#105 + def on_mlhs_add_star(list, star); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#101 + def on_mlhs_paren(list); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mrhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qsymbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qwords_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_regexp_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_stmts_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_string_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_symbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_word_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_words_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_xstring_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_xstring_new; end +end + +# 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#1598 + 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#1604 + 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#1626 + 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#1611 + 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#1617 + 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)/ =~ 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#1442 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1456 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1462 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1468 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1478 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1487 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1493 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1502 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1508 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ruby_parser.rb#1524 + 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#1531 + 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#1536 + 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#1546 + 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#1567 + 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#1581 + def visit_write_value(node); end +end + +# Represents the use of the literal `true` keyword. +# +# true +# ^^^^ +# +# source://prism//lib/prism/node.rb#15741 +class Prism::TrueNode < ::Prism::Node + # Initialize a new TrueNode node. + # + # @return [TrueNode] a new instance of TrueNode + # + # source://prism//lib/prism/node.rb#15743 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } + 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#15800 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15751 + 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#15756 + 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#15766 + 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#15761 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode + # + # source://prism//lib/prism/node.rb#15771 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::TrueNode) } + 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#15756 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } + # + # source://prism//lib/prism/node.rb#15779 + 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#15784 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15789 + 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#15794 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15809 +class Prism::UndefNode < ::Prism::Node + # Initialize a new UndefNode node. + # + # @return [UndefNode] a new instance of UndefNode + # + # source://prism//lib/prism/node.rb#15811 + 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 + ).void + end + 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#15885 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15821 + 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#15826 + 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#15836 + 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#15831 + sig { override.returns(T::Array[Prism::Node]) } + 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#15841 + sig do + params( + 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 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#15826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + 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#15849 + 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#15869 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15864 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15857 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] + # + # source://prism//lib/prism/node.rb#15854 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } + def names; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15874 + 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#15879 + 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#15900 +class Prism::UnlessNode < ::Prism::Node + # Initialize a new UnlessNode node. + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://prism//lib/prism/node.rb#15902 + 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) + ).void + end + 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#16051 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15916 + 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#15921 + 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#15935 + 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#15926 + sig { override.returns(T::Array[Prism::Node]) } + 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#15940 + sig do + params( + 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 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#15921 + 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, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } + # + # source://prism//lib/prism/node.rb#15948 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + 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#16001 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#16030 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword, if present. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#16007 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16035 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16020 + sig { returns(String) } + def keyword; end + + # The location of the `unless` keyword. + # + # unless cond then bar end + # ^^^^^^ + # + # bar unless cond + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#15959 + sig { returns(Prism::Location) } + 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#15972 + sig { returns(Prism::Node) } + 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#15995 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#16025 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword, if present. + # + # unless cond then bar end + # ^^^^ + # + # source://prism//lib/prism/node.rb#15978 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16040 + 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#16045 + 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#16069 +class Prism::UntilNode < ::Prism::Node + # Initialize a new UntilNode node. + # + # @return [UntilNode] a new instance of UntilNode + # + # source://prism//lib/prism/node.rb#16071 + 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#16176 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16083 + 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#16119 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16088 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#16155 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#16131 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16101 + 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#16093 + 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#16106 + 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#16088 + 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#16114 + 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#16160 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16150 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16124 + 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#16144 + sig { returns(Prism::Node) } + def predicate; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16147 + 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#16165 + 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#16170 + 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#16192 +class Prism::WhenNode < ::Prism::Node + # Initialize a new WhenNode node. + # + # @return [WhenNode] a new instance of WhenNode + # + # source://prism//lib/prism/node.rb#16194 + 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) + ).void + end + 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#16294 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16206 + 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#16211 + 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#16224 + 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#16216 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#16249 + sig { returns(T::Array[Prism::Node]) } + 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#16229 + sig do + params( + 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 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#16211 + 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, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } + # + # source://prism//lib/prism/node.rb#16237 + 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#16278 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16268 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16242 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16265 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#16273 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#16252 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16283 + 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#16288 + 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#16311 +class Prism::WhileNode < ::Prism::Node + # Initialize a new WhileNode node. + # + # @return [WhileNode] a new instance of WhileNode + # + # source://prism//lib/prism/node.rb#16313 + 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#16418 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16325 + 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#16361 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16330 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#16397 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#16373 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16343 + 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#16335 + 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#16348 + 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#16330 + 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#16356 + 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#16402 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16392 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16366 + 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#16386 + sig { returns(Prism::Node) } + def predicate; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#16389 + 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#16407 + 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#16412 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://prism//lib/prism/node.rb#16432 +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#16434 + 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#16544 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16446 + 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#16451 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#16523 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#16503 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16461 + 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#16456 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#16518 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#16496 + 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#16466 + 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#16451 + 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#16474 + 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#16484 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16479 + 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#16528 + sig { override.returns(String) } + def inspect; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#16513 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#16489 + 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#16533 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#16510 + 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#16538 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#16558 +class Prism::YieldNode < ::Prism::Node + # Initialize a new YieldNode node. + # + # @return [YieldNode] a new instance of YieldNode + # + # source://prism//lib/prism/node.rb#16560 + 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) + ).void + end + 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#16674 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#16572 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#16627 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#16577 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#16589 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#16582 + sig { override.returns(T::Array[Prism::Node]) } + 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#16594 + sig do + params( + 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 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#16577 + 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, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } + # + # source://prism//lib/prism/node.rb#16602 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#16658 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16643 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16607 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # source://prism//lib/prism/node.rb#16648 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#16614 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # source://prism//lib/prism/node.rb#16653 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#16630 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#16663 + 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#16668 + def type; end + end +end diff --git a/sorbet/rbi/gems/racc@1.8.1.rbi b/sorbet/rbi/gems/racc@1.8.1.rbi new file mode 100644 index 0000000..5f9113b --- /dev/null +++ b/sorbet/rbi/gems/racc@1.8.1.rbi @@ -0,0 +1,156 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `racc` gem. +# Please instead update this file by running `bin/tapioca gem racc`. + + +# source://racc//lib/racc/info.rb#17 +Racc::Copyright = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#184 +class Racc::Parser + # source://racc//lib/racc/parser.rb#279 + def _racc_do_parse_rb(arg, in_debug); end + + # source://racc//lib/racc/parser.rb#479 + def _racc_do_reduce(arg, act); end + + # common + # + # source://racc//lib/racc/parser.rb#382 + def _racc_evalact(act, arg); end + + # source://racc//lib/racc/parser.rb#232 + def _racc_init_sysvars; end + + # source://racc//lib/racc/parser.rb#220 + def _racc_setup; end + + # source://racc//lib/racc/parser.rb#329 + def _racc_yyparse_rb(recv, mid, arg, c_debug); end + + # source://racc//lib/racc/parser.rb#262 + def do_parse; end + + # The method to fetch next token. + # If you use #do_parse method, you must implement #next_token. + # + # The format of return value is [TOKEN_SYMBOL, VALUE]. + # +token-symbol+ is represented by Ruby's symbol by default, e.g. :IDENT + # for 'IDENT'. ";" (String) for ';'. + # + # The final symbol (End of file) must be false. + # + # @raise [NotImplementedError] + # + # source://racc//lib/racc/parser.rb#275 + def next_token; end + + # This method is called when a parse error is found. + # + # ERROR_TOKEN_ID is an internal ID of token which caused error. + # You can get string representation of this ID by calling + # #token_to_str. + # + # ERROR_VALUE is a value of error token. + # + # value_stack is a stack of symbol values. + # DO NOT MODIFY this object. + # + # This method raises ParseError by default. + # + # If this method returns, parsers enter "error recovering mode". + # + # @raise [ParseError] + # + # source://racc//lib/racc/parser.rb#535 + def on_error(t, val, vstack); end + + # source://racc//lib/racc/parser.rb#584 + def racc_accept; end + + # source://racc//lib/racc/parser.rb#589 + def racc_e_pop(state, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#596 + def racc_next_state(curstate, state); end + + # source://racc//lib/racc/parser.rb#602 + def racc_print_stacks(t, v); end + + # source://racc//lib/racc/parser.rb#611 + def racc_print_states(s); end + + # For debugging output + # + # source://racc//lib/racc/parser.rb#558 + def racc_read_token(t, tok, val); end + + # source://racc//lib/racc/parser.rb#571 + def racc_reduce(toks, sim, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#565 + def racc_shift(tok, tstack, vstack); end + + # source://racc//lib/racc/parser.rb#618 + def racc_token2str(tok); end + + # Convert internal ID of token symbol to the string. + # + # source://racc//lib/racc/parser.rb#624 + def token_to_str(t); end + + # Exit parser. + # Return value is +Symbol_Value_Stack[0]+. + # + # source://racc//lib/racc/parser.rb#548 + def yyaccept; end + + # Leave error recovering mode. + # + # source://racc//lib/racc/parser.rb#553 + def yyerrok; end + + # Enter error recovering mode. + # This method does not call #on_error. + # + # source://racc//lib/racc/parser.rb#542 + def yyerror; end + + # source://racc//lib/racc/parser.rb#324 + def yyparse(recv, mid); end + + class << self + # source://racc//lib/racc/parser.rb#216 + def racc_runtime_type; end + end +end + +# source://racc//lib/racc/parser.rb#205 +Racc::Parser::Racc_Main_Parsing_Routine = T.let(T.unsafe(nil), Symbol) + +Racc::Parser::Racc_Runtime_Core_Id_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#207 +Racc::Parser::Racc_Runtime_Core_Version = T.let(T.unsafe(nil), String) + +Racc::Parser::Racc_Runtime_Core_Version_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#187 +Racc::Parser::Racc_Runtime_Core_Version_R = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#208 +Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#186 +Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#206 +Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) + +# source://racc//lib/racc/info.rb#15 +Racc::VERSION = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/info.rb#16 +Racc::Version = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rainbow@3.1.1.rbi b/sorbet/rbi/gems/rainbow@3.1.1.rbi new file mode 100644 index 0000000..b042218 --- /dev/null +++ b/sorbet/rbi/gems/rainbow@3.1.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rainbow` gem. +# Please instead update this file by running `bin/tapioca gem rainbow`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rake@13.2.1.rbi b/sorbet/rbi/gems/rake@13.2.1.rbi new file mode 100644 index 0000000..755e993 --- /dev/null +++ b/sorbet/rbi/gems/rake@13.2.1.rbi @@ -0,0 +1,3028 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rake` gem. +# Please instead update this file by running `bin/tapioca gem rake`. + + +# :stopdoc: +# +# Some top level Constants. +# +# source://rake//lib/rake.rb#69 +FileList = Rake::FileList + +# -- +# This a FileUtils extension that defines several additional commands to be +# added to the FileUtils utility functions. +# +# source://rake//lib/rake/file_utils.rb#8 +module FileUtils + # Run a Ruby interpreter with the given arguments. + # + # Example: + # ruby %{-pe '$_.upcase!' ; rm # -rf /. + # + # If a block is given, upon command completion the block is called with an + # OK flag (true on a zero exit status) and a Process::Status object. + # Without a block a RuntimeError is raised when the command exits non-zero. + # + # Examples: + # + # sh 'ls -ltr' + # + # sh 'ls', 'file with spaces' + # + # # check exit status after command runs + # sh %{grep pattern file} do |ok, res| + # if !ok + # puts "pattern not found (status = #{res.exitstatus})" + # end + # end + # + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # Split a file path into individual directory names. + # + # Example: + # split_all("a/b/c") => ['a', 'b', 'c'] + # + # source://rake//lib/rake/file_utils.rb#126 + def split_all(path); end + + private + + # source://rake//lib/rake/file_utils.rb#61 + def create_shell_runner(cmd); end + + # source://rake//lib/rake/file_utils.rb#84 + def set_verbose_option(options); end + + # source://rake//lib/rake/file_utils.rb#71 + def sh_show_command(cmd); end +end + +# source://rake//lib/rake/file_utils.rb#106 +FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) + +# Path to the currently running Ruby program +# +# source://rake//lib/rake/file_utils.rb#10 +FileUtils::RUBY = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/ext/core.rb#2 +class Module + # Check for an existing method in the current class before extending. If + # the method already exists, then a warning is printed and the extension is + # not added. Otherwise the block is yielded and any definitions in the + # block will take effect. + # + # Usage: + # + # class String + # rake_extension("xyz") do + # def xyz + # ... + # end + # end + # end + # + # source://rake//lib/rake/ext/core.rb#18 + def rake_extension(method); end +end + +# source://rake//lib/rake.rb#24 +module Rake + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + class << self + # Add files to the rakelib list + # + # source://rake//lib/rake/rake_module.rb#33 + def add_rakelib(*files); end + + # Current Rake Application + # + # source://rake//lib/rake/rake_module.rb#8 + def application; end + + # Set the current Rake application object. + # + # source://rake//lib/rake/rake_module.rb#13 + def application=(app); end + + # Yield each file or directory component. + # + # source://rake//lib/rake/file_list.rb#418 + def each_dir_parent(dir); end + + # Convert Pathname and Pathname-like objects to strings; + # leave everything else alone + # + # source://rake//lib/rake/file_list.rb#429 + def from_pathname(path); end + + # Load a rakefile. + # + # source://rake//lib/rake/rake_module.rb#28 + def load_rakefile(path); end + + # Return the original directory where the Rake application was started. + # + # source://rake//lib/rake/rake_module.rb#23 + def original_dir; end + + # source://rake//lib/rake/rake_module.rb#17 + def suggested_thread_count; end + + # Make +block_application+ the default rake application inside a block so + # you can load rakefiles into a different application. + # + # This is useful when you want to run rake tasks inside a library without + # running rake in a sub-shell. + # + # Example: + # + # Dir.chdir 'other/directory' + # + # other_rake = Rake.with_application do |rake| + # rake.load_rakefile + # end + # + # puts other_rake.tasks + # + # source://rake//lib/rake/rake_module.rb#54 + def with_application(block_application = T.unsafe(nil)); end + end +end + +# Rake main application object. When invoking +rake+ from the +# command line, a Rake::Application object is created and run. +# +# source://rake//lib/rake/application.rb#19 +class Rake::Application + include ::Rake::TaskManager + include ::Rake::TraceOutput + + # Initialize a Rake::Application object. + # + # @return [Application] a new instance of Application + # + # source://rake//lib/rake/application.rb#49 + def initialize; end + + # Add a file to the list of files to be imported. + # + # source://rake//lib/rake/application.rb#807 + def add_import(fn); end + + # Add a loader to handle imported files ending in the extension + # +ext+. + # + # source://rake//lib/rake/application.rb#161 + def add_loader(ext, loader); end + + # Collect the list of tasks on the command line. If no tasks are + # given, return a list containing only the default task. + # Environmental assignments are processed at this time as well. + # + # `args` is the list of arguments to peruse to get the list of tasks. + # It should be the command line that was given to rake, less any + # recognised command-line options, which OptionParser.parse will + # have taken care of already. + # + # source://rake//lib/rake/application.rb#788 + def collect_command_line_tasks(args); end + + # Default task name ("default"). + # (May be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#802 + def default_task_name; end + + # Warn about deprecated usage. + # + # Example: + # Rake.application.deprecate("import", "Rake.import", caller.first) + # + # source://rake//lib/rake/application.rb#288 + def deprecate(old_usage, new_usage, call_site); end + + # source://rake//lib/rake/application.rb#250 + def display_cause_details(ex); end + + # Display the error message that caused the exception. + # + # source://rake//lib/rake/application.rb#234 + def display_error_message(ex); end + + # source://rake//lib/rake/application.rb#275 + def display_exception_backtrace(ex); end + + # source://rake//lib/rake/application.rb#242 + def display_exception_details(ex); end + + # source://rake//lib/rake/application.rb#257 + def display_exception_details_seen; end + + # source://rake//lib/rake/application.rb#265 + def display_exception_message_details(ex); end + + # Display the tasks and prerequisites + # + # source://rake//lib/rake/application.rb#411 + def display_prerequisites; end + + # Display the tasks and comments. + # + # source://rake//lib/rake/application.rb#328 + def display_tasks_and_comments; end + + # Calculate the dynamic width of the + # + # source://rake//lib/rake/application.rb#379 + def dynamic_width; end + + # source://rake//lib/rake/application.rb#383 + def dynamic_width_stty; end + + # source://rake//lib/rake/application.rb#387 + def dynamic_width_tput; end + + # Exit the program because of an unhandled exception. + # (may be overridden by subclasses) + # + # source://rake//lib/rake/application.rb#229 + def exit_because_of_exception(ex); end + + # source://rake//lib/rake/application.rb#708 + def find_rakefile_location; end + + # Read and handle the command line options. Returns the command line + # arguments that we didn't understand, which should (in theory) be just + # task names and env vars. + # + # source://rake//lib/rake/application.rb#674 + def handle_options(argv); end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#261 + def has_cause?(ex); end + + # True if one of the files in RAKEFILES is in the current directory. + # If a match is found, it is copied into @rakefile. + # + # source://rake//lib/rake/application.rb#304 + def have_rakefile; end + + # Initialize the command line parameters and app name. + # + # source://rake//lib/rake/application.rb#88 + def init(app_name = T.unsafe(nil), argv = T.unsafe(nil)); end + + # Invokes a task with arguments that are extracted from +task_string+ + # + # source://rake//lib/rake/application.rb#185 + def invoke_task(task_string); end + + # Load the pending list of imported files. + # + # source://rake//lib/rake/application.rb#812 + def load_imports; end + + # Find the rakefile and then load it and any pending imports. + # + # source://rake//lib/rake/application.rb#124 + def load_rakefile; end + + # The name of the application (typically 'rake') + # + # source://rake//lib/rake/application.rb#24 + def name; end + + # Application options from the command line + # + # source://rake//lib/rake/application.rb#167 + def options; end + + # The original directory where rake was invoked. + # + # source://rake//lib/rake/application.rb#27 + def original_dir; end + + # source://rake//lib/rake/application.rb#191 + def parse_task_string(string); end + + # source://rake//lib/rake/application.rb#720 + def print_rakefile_directory(location); end + + # Similar to the regular Ruby +require+ command, but will check + # for *.rake files in addition to *.rb files. + # + # source://rake//lib/rake/application.rb#694 + def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end + + # Name of the actual rakefile used. + # + # source://rake//lib/rake/application.rb#30 + def rakefile; end + + # source://rake//lib/rake/application.rb#828 + def rakefile_location(backtrace = T.unsafe(nil)); end + + # source://rake//lib/rake/application.rb#725 + def raw_load_rakefile; end + + # Run the Rake application. The run method performs the following + # three steps: + # + # * Initialize the command line options (+init+). + # * Define the tasks (+load_rakefile+). + # * Run the top level tasks (+top_level+). + # + # If you wish to build a custom rake command, you should call + # +init+ on your application. Then define any tasks. Finally, + # call +top_level+ to run your top level tasks. + # + # source://rake//lib/rake/application.rb#79 + def run(argv = T.unsafe(nil)); end + + # Run the given block with the thread startup and shutdown. + # + # source://rake//lib/rake/application.rb#144 + def run_with_threads; end + + # source://rake//lib/rake/application.rb#837 + def set_default_options; end + + # Provide standard exception handling for the given block. + # + # source://rake//lib/rake/application.rb#213 + def standard_exception_handling; end + + # A list of all the standard options used in rake, suitable for + # passing to OptionParser. + # + # source://rake//lib/rake/application.rb#432 + def standard_rake_options; end + + # The directory path containing the system wide rakefiles. + # + # source://rake//lib/rake/application.rb#757 + def system_dir; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns; end + + # Number of columns on the terminal + # + # source://rake//lib/rake/application.rb#33 + def terminal_columns=(_arg0); end + + # source://rake//lib/rake/application.rb#367 + def terminal_width; end + + # Return the thread pool used for multithreaded processing. + # + # source://rake//lib/rake/application.rb#178 + def thread_pool; end + + # Run the top level tasks of a Rake application. + # + # source://rake//lib/rake/application.rb#131 + def top_level; end + + # List of the top level task names (task names from the command line). + # + # source://rake//lib/rake/application.rb#36 + def top_level_tasks; end + + # source://rake//lib/rake/application.rb#418 + def trace(*strings); end + + # source://rake//lib/rake/application.rb#400 + def truncate(string, width); end + + # We will truncate output if we are outputting to a TTY or if we've been + # given an explicit column width to honor + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#323 + def truncate_output?; end + + # Override the detected TTY output state (mostly for testing) + # + # source://rake//lib/rake/application.rb#39 + def tty_output=(_arg0); end + + # True if we are outputting to TTY, false otherwise + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#317 + def tty_output?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#391 + def unix?; end + + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#396 + def windows?; end + + private + + # source://rake//lib/rake/application.rb#751 + def glob(path, &block); end + + # Does the exception have a task invocation chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/application.rb#297 + def has_chain?(exception); end + + # source://rake//lib/rake/application.rb#102 + def load_debug_at_stop_feature; end + + # source://rake//lib/rake/application.rb#650 + def select_tasks_to_show(options, show_tasks, value); end + + # source://rake//lib/rake/application.rb#657 + def select_trace_output(options, trace_option, value); end + + # source://rake//lib/rake/application.rb#423 + def sort_options(options); end + + # source://rake//lib/rake/application.rb#774 + def standard_system_dir; end +end + +# source://rake//lib/rake/application.rb#41 +Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#3 +module Rake::Backtrace + class << self + # source://rake//lib/rake/backtrace.rb#19 + def collapse(backtrace); end + end +end + +# source://rake//lib/rake/backtrace.rb#8 +Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#12 +Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/backtrace.rb#17 +Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rake//lib/rake/backtrace.rb#4 +Rake::Backtrace::SYS_KEYS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/backtrace.rb#5 +Rake::Backtrace::SYS_PATHS = T.let(T.unsafe(nil), Array) + +# Mixin for creating easily cloned objects. +# +# source://rake//lib/rake/cloneable.rb#6 +module Rake::Cloneable + private + + # The hook that is invoked by 'clone' and 'dup' methods. + # + # source://rake//lib/rake/cloneable.rb#8 + def initialize_copy(source); end +end + +# source://rake//lib/rake/application.rb#13 +class Rake::CommandLineOptionError < ::StandardError; end + +# Based on a script at: +# http://stackoverflow.com/questions/891537/ruby-detect-number-of-cpus-installed +# +# source://rake//lib/rake/cpu_counter.rb#6 +class Rake::CpuCounter + # source://rake//lib/rake/cpu_counter.rb#22 + def count; end + + # source://rake//lib/rake/cpu_counter.rb#11 + def count_with_default(default = T.unsafe(nil)); end + + class << self + # source://rake//lib/rake/cpu_counter.rb#7 + def count; end + end +end + +# DSL is a module that provides #task, #desc, #namespace, etc. Use this +# when you'd like to use rake outside the top level scope. +# +# For a Rakefile you run from the command line this module is automatically +# included. +# +# source://rake//lib/rake/dsl_definition.rb#14 +module Rake::DSL + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + + private + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # Describes the next rake task. Duplicate descriptions are discarded. + # Descriptions are shown with rake -T (up to the first + # sentence) and rake -D (the entire description). + # + # Example: + # desc "Run the Unit Tests" + # task test: [:build] do + # # ... run tests + # end + # + # source://rake//lib/rake/dsl_definition.rb#166 + def desc(description); end + + # Declare a set of files tasks to create the given directories on + # demand. + # + # Example: + # directory "testdata/doc" + # + # source://rake//lib/rake/dsl_definition.rb#92 + def directory(*args, &block); end + + # Declare a file task. + # + # Example: + # file "config.cfg" => ["config.template"] do + # open("config.cfg", "w") do |outfile| + # open("config.template") do |infile| + # while line = infile.gets + # outfile.puts line + # end + # end + # end + # end + # + # source://rake//lib/rake/dsl_definition.rb#76 + def file(*args, &block); end + + # Declare a file creation task. + # (Mainly used for the directory command). + # + # source://rake//lib/rake/dsl_definition.rb#82 + def file_create(*args, &block); end + + # Import the partial Rakefiles +fn+. Imported files are loaded + # _after_ the current file is completely loaded. This allows the + # import statement to appear anywhere in the importing file, and yet + # allowing the imported files to depend on objects defined in the + # importing file. + # + # A common use of the import statement is to include files + # containing dependency declarations. + # + # See also the --rakelibdir command line option. + # + # Example: + # import ".depend", "my_rules" + # + # source://rake//lib/rake/dsl_definition.rb#184 + def import(*fns); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # Declare a task that performs its prerequisites in + # parallel. Multitasks does *not* guarantee that its prerequisites + # will execute in any given order (which is obvious when you think + # about it) + # + # Example: + # multitask deploy: %w[deploy_gem deploy_rdoc] + # + # source://rake//lib/rake/dsl_definition.rb#113 + def multitask(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Create a new rake namespace and use it for evaluating the given + # block. Returns a NameSpace object that can be used to lookup + # tasks defined in the namespace. + # + # Example: + # + # ns = namespace "nested" do + # # the "nested:run" task + # task :run + # end + # task_run = ns[:run] # find :run in the given namespace. + # + # Tasks can also be defined in a namespace by using a ":" in the task + # name: + # + # task "nested:test" do + # # ... + # end + # + # source://rake//lib/rake/dsl_definition.rb#136 + def namespace(name = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#98 + def ruby(*args, **options, &block); end + + # Declare a rule for auto-tasks. + # + # Example: + # rule '.o' => '.c' do |t| + # sh 'cc', '-c', '-o', t.name, t.source + # end + # + # source://rake//lib/rake/dsl_definition.rb#152 + def rule(*args, &block); end + + # source://rake//lib/rake/file_utils.rb#110 + def safe_ln(*args, **options); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # source://rake//lib/rake/file_utils.rb#126 + def split_all(path); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # :call-seq: + # task(task_name) + # task(task_name: dependencies) + # task(task_name, arguments => dependencies) + # + # Declare a basic task. The +task_name+ is always the first argument. If + # the task name contains a ":" it is defined in that namespace. + # + # The +dependencies+ may be a single task name or an Array of task names. + # The +argument+ (a single name) or +arguments+ (an Array of names) define + # the arguments provided to the task. + # + # The task, argument and dependency names may be either symbols or + # strings. + # + # A task with a single dependency: + # + # task clobber: %w[clean] do + # rm_rf "html" + # end + # + # A task with an argument and a dependency: + # + # task :package, [:version] => :test do |t, args| + # # ... + # end + # + # To invoke this task from the command line: + # + # $ rake package[1.2.3] + # + # source://rake//lib/rake/dsl_definition.rb#59 + def task(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end +end + +# Default Rakefile loader used by +import+. +# +# source://rake//lib/rake/default_loader.rb#5 +class Rake::DefaultLoader + # Loads a rakefile into the current application from +fn+ + # + # source://rake//lib/rake/default_loader.rb#10 + def load(fn); end +end + +# source://rake//lib/rake/early_time.rb#21 +Rake::EARLY = T.let(T.unsafe(nil), Rake::EarlyTime) + +# source://rake//lib/rake/task_arguments.rb#108 +Rake::EMPTY_TASK_ARGS = T.let(T.unsafe(nil), Rake::TaskArguments) + +# EarlyTime is a fake timestamp that occurs _before_ any other time value. +# +# source://rake//lib/rake/early_time.rb#5 +class Rake::EarlyTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # The EarlyTime always comes before +other+! + # + # source://rake//lib/rake/early_time.rb#12 + def <=>(other); end + + # source://rake//lib/rake/early_time.rb#16 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# A FileCreationTask is a file task that when used as a dependency will be +# needed if and only if the file has not been created. Once created, it is +# not re-triggered if any of its dependencies are newer, nor does trigger +# any rebuilds of tasks that depend on it whenever it is updated. +# +# source://rake//lib/rake/file_creation_task.rb#12 +class Rake::FileCreationTask < ::Rake::FileTask + # Is this file task needed? Yes if it doesn't exist. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_creation_task.rb#14 + def needed?; end + + # Time stamp for file creation task. This time stamp is earlier + # than any other time stamp. + # + # source://rake//lib/rake/file_creation_task.rb#20 + def timestamp; end +end + +# A FileList is essentially an array with a few helper methods defined to +# make file manipulation a bit easier. +# +# FileLists are lazy. When given a list of glob patterns for possible files +# to be included in the file list, instead of searching the file structures +# to find the files, a FileList holds the pattern for latter use. +# +# This allows us to define a number of FileList to match any number of +# files, but only search out the actual files when then FileList itself is +# actually used. The key is that the first time an element of the +# FileList/Array is requested, the pending patterns are resolved into a real +# list of file names. +# +# source://rake//lib/rake/file_list.rb#22 +class Rake::FileList + include ::Rake::Cloneable + + # Create a file list from the globbable patterns given. If you wish to + # perform multiple includes or excludes at object build time, use the + # "yield self" pattern. + # + # Example: + # file_list = FileList.new('lib/**/*.rb', 'test/test*.rb') + # + # pkg_files = FileList.new('lib/**/*') do |fl| + # fl.exclude(/\bCVS\b/) + # end + # + # @return [FileList] a new instance of FileList + # @yield [_self] + # @yieldparam _self [Rake::FileList] the object that the method was called on + # + # source://rake//lib/rake/file_list.rb#99 + def initialize(*patterns); end + + # source://rake//lib/rake/file_list.rb#68 + def &(*args, &block); end + + # Redefine * to return either a string or a new file list. + # + # source://rake//lib/rake/file_list.rb#193 + def *(other); end + + # source://rake//lib/rake/file_list.rb#68 + def +(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def -(*args, &block); end + + # source://rake//lib/rake/file_list.rb#203 + def <<(obj); end + + # source://rake//lib/rake/file_list.rb#77 + def <=>(*args, &block); end + + # A FileList is equal through array equality. + # + # source://rake//lib/rake/file_list.rb#171 + def ==(array); end + + # source://rake//lib/rake/file_list.rb#77 + def [](*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def []=(*args, &block); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def add(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def all?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def any?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def append(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def assoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def bsearch_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chain(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def chunk_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def clear(*args, &block); end + + # Clear all the exclude patterns so that we exclude nothing. + # + # source://rake//lib/rake/file_list.rb#164 + def clear_exclude; end + + # source://rake//lib/rake/file_list.rb#68 + def collect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def collect_concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def compact(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def compact!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def concat(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def count(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def cycle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def deconstruct(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def delete_if(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def detect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def difference(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def dig(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def drop_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_cons(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_entry(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def each_with_object(*args, &block); end + + # Grep each of the files in the filelist using the given pattern. If a + # block is given, call the block on each matching line, passing the file + # name, line number, and the matching line of text. If no block is given, + # a standard emacs style file:linenumber:line message will be printed to + # standard out. Returns the number of matched items. + # + # source://rake//lib/rake/file_list.rb#293 + def egrep(pattern, *options); end + + # source://rake//lib/rake/file_list.rb#77 + def empty?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def entries(*args, &block); end + + # Register a list of file name patterns that should be excluded from the + # list. Patterns may be regular expressions, glob patterns or regular + # strings. In addition, a block given to exclude will remove entries that + # return true when given to the block. + # + # Note that glob patterns are expanded against the file system. If a file + # is explicitly added to a file list, but does not exist in the file + # system, then an glob pattern in the exclude list will not exclude the + # file. + # + # Examples: + # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c'] + # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c'] + # + # If "a.c" is a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c'] + # + # If "a.c" is not a file, then ... + # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c'] + # + # source://rake//lib/rake/file_list.rb#150 + def exclude(*patterns, &block); end + + # Should the given file name be excluded from the list? + # + # NOTE: This method was formerly named "exclude?", but Rails + # introduced an exclude? method as an array method and setup a + # conflict with file list. We renamed the method to avoid + # confusion. If you were using "FileList#exclude?" in your user + # code, you will need to update. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#364 + def excluded_from_list?(fn); end + + # Return a new file list that only contains file names from the current + # file list that exist on the file system. + # + # source://rake//lib/rake/file_list.rb#320 + def existing; end + + # Modify the current file list so that it contains only file name that + # exist on the file system. + # + # source://rake//lib/rake/file_list.rb#326 + def existing!; end + + # Return a new FileList with String#ext method applied to + # each member of the array. + # + # This method is a shortcut for: + # + # array.collect { |item| item.ext(newext) } + # + # +ext+ is a user added method for the Array class. + # + # source://rake//lib/rake/file_list.rb#284 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/file_list.rb#77 + def fetch(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def fill(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def filter_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def find_all(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def find_index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def first(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flat_map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def flatten(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def flatten!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def grep(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def grep_v(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def group_by(*args, &block); end + + # Return a new FileList with the results of running +gsub+ against each + # element of the original list. + # + # Example: + # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\") + # => ['lib\\test\\file', 'x\\y'] + # + # source://rake//lib/rake/file_list.rb#253 + def gsub(pat, rep); end + + # Same as +gsub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#264 + def gsub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#391 + def import(array); end + + # Add file names defined by glob patterns to the file list. If an array + # is given, add each element of the array. + # + # Example: + # file_list.include("*.java", "*.cfg") + # file_list.include %w( math.c lib.h *.o ) + # + # source://rake//lib/rake/file_list.rb#116 + def include(*filenames); end + + # source://rake//lib/rake/file_list.rb#77 + def include?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def index(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def insert(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def inspect(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersect?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def intersection(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def is_a?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def join(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def keep_if(*args, &block); end + + # Lie about our class. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_list.rb#187 + def kind_of?(klass); end + + # source://rake//lib/rake/file_list.rb#77 + def last(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def lazy(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def length(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def map(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def map!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def max_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def member?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def min_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def minmax_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def none?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def one?(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pack(*args, &block); end + + # FileList version of partition. Needed because the nested arrays should + # be FileLists in this version. + # + # source://rake//lib/rake/file_list.rb#334 + def partition(&block); end + + # Apply the pathmap spec to each of the included file names, returning a + # new file list with the modified paths. (See String#pathmap for + # details.) + # + # source://rake//lib/rake/file_list.rb#272 + def pathmap(spec = T.unsafe(nil), &block); end + + # source://rake//lib/rake/file_list.rb#77 + def permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def place(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def pop(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def prepend(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def product(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def push(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rassoc(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reduce(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def reject(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reject!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_combination(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def repeated_permutation(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def replace(*args, &block); end + + # Resolve all the pending adds now. + # + # source://rake//lib/rake/file_list.rb#210 + def resolve; end + + # source://rake//lib/rake/file_list.rb#77 + def reverse(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def reverse_each(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rindex(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def rotate!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sample(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def select(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def select!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shelljoin(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def shuffle!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def size(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_after(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_before(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def slice_when(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def sort_by(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def sort_by!(*args, &block); end + + # Return a new FileList with the results of running +sub+ against each + # element of the original list. + # + # Example: + # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o'] + # + # source://rake//lib/rake/file_list.rb#242 + def sub(pat, rep); end + + # Same as +sub+ except that the original file list is modified. + # + # source://rake//lib/rake/file_list.rb#258 + def sub!(pat, rep); end + + # source://rake//lib/rake/file_list.rb#77 + def sum(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def take_while(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def tally(*args, &block); end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#176 + def to_a; end + + # Return the internal array object. + # + # source://rake//lib/rake/file_list.rb#182 + def to_ary; end + + # source://rake//lib/rake/file_list.rb#77 + def to_h(*args, &block); end + + # Convert a FileList to a string by joining all elements with a space. + # + # source://rake//lib/rake/file_list.rb#344 + def to_s; end + + # source://rake//lib/rake/file_list.rb#77 + def to_set(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def transpose(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def union(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def uniq(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def uniq!(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def unshift(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def values_at(*args, &block); end + + # source://rake//lib/rake/file_list.rb#77 + def zip(*args, &block); end + + # source://rake//lib/rake/file_list.rb#68 + def |(*args, &block); end + + private + + # Add matching glob patterns. + # + # source://rake//lib/rake/file_list.rb#350 + def add_matching(pattern); end + + # source://rake//lib/rake/file_list.rb#220 + def resolve_add(fn); end + + # source://rake//lib/rake/file_list.rb#230 + def resolve_exclude; end + + class << self + # Create a new file list including the files listed. Similar to: + # + # FileList.new(*args) + # + # source://rake//lib/rake/file_list.rb#400 + def [](*args); end + + # Get a sorted list of files matching the pattern. This method + # should be preferred to Dir[pattern] and Dir.glob(pattern) because + # the files returned are guaranteed to be sorted. + # + # source://rake//lib/rake/file_list.rb#407 + def glob(pattern, *args); end + end +end + +# List of array methods (that are not in +Object+) that need to be +# delegated. +# +# source://rake//lib/rake/file_list.rb#44 +Rake::FileList::ARRAY_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#381 +Rake::FileList::DEFAULT_IGNORE_PATTERNS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#387 +Rake::FileList::DEFAULT_IGNORE_PROCS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#61 +Rake::FileList::DELEGATING_METHODS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/file_list.rb#86 +Rake::FileList::GLOB_PATTERN = T.let(T.unsafe(nil), Regexp) + +# List of additional methods that must be delegated. +# +# source://rake//lib/rake/file_list.rb#47 +Rake::FileList::MUST_DEFINE = T.let(T.unsafe(nil), Array) + +# List of methods that should not be delegated here (we define special +# versions of them explicitly below). +# +# source://rake//lib/rake/file_list.rb#51 +Rake::FileList::MUST_NOT_DEFINE = T.let(T.unsafe(nil), Array) + +# List of delegated methods that return new array values which need +# wrapping. +# +# source://rake//lib/rake/file_list.rb#55 +Rake::FileList::SPECIAL_RETURN = T.let(T.unsafe(nil), Array) + +# A FileTask is a task that includes time based dependencies. If any of a +# FileTask's prerequisites have a timestamp that is later than the file +# represented by this task, then the file must be rebuilt (using the +# supplied actions). +# +# source://rake//lib/rake/file_task.rb#12 +class Rake::FileTask < ::Rake::Task + # Is this file task needed? Yes if it doesn't exist, or if its time stamp + # is out of date. + # + # @return [Boolean] + # + # source://rake//lib/rake/file_task.rb#16 + def needed?; end + + # Time stamp for file task. + # + # source://rake//lib/rake/file_task.rb#25 + def timestamp; end + + private + + # Are there any prerequisites with a later time than the given time stamp? + # + # @return [Boolean] + # + # source://rake//lib/rake/file_task.rb#36 + def out_of_date?(stamp); end + + class << self + # Apply the scope to the task name according to the rules for this kind + # of task. File based tasks ignore the scope when creating the name. + # + # source://rake//lib/rake/file_task.rb#53 + def scope_name(scope, task_name); end + end +end + +# FileUtilsExt provides a custom version of the FileUtils methods +# that respond to the verbose and nowrite +# commands. +# +# source://rake//lib/rake/file_utils_ext.rb#10 +module Rake::FileUtilsExt + include ::FileUtils::StreamUtils_ + include ::FileUtils + extend ::FileUtils::StreamUtils_ + extend ::FileUtils + extend ::Rake::FileUtilsExt + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + + # Get/set the nowrite flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # nowrite # return the current value of the + # # nowrite flag + # nowrite(v) # set the nowrite flag to _v_. + # nowrite(v) { code } # Execute code with the nowrite flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # Check that the options do not contain options not listed in + # +optdecl+. An ArgumentError exception is thrown if non-declared + # options are found. + # + # @raise [ArgumentError] + # + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # Send the message to the default rake output (which is $stderr). + # + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # Get/set the verbose flag controlling output from the FileUtils + # utilities. If verbose is true, then the utility method is + # echoed to standard output. + # + # Examples: + # verbose # return the current value of the + # # verbose flag + # verbose(v) # set the verbose flag to _v_. + # verbose(v) { code } # Execute code with the verbose flag set + # # temporarily to _v_. Return to the + # # original value when code is done. + # + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # Use this function to prevent potentially destructive ruby code + # from running when the :nowrite flag is set. + # + # Example: + # + # when_writing("Building Project") do + # project.build + # end + # + # The following code will build the project under normal + # conditions. If the nowrite(true) flag is set, then the example + # will print: + # + # DRYRUN: Building Project + # + # instead of actually building the project. + # + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end + + class << self + # Returns the value of attribute nowrite_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag; end + + # Sets the attribute nowrite_flag + # + # @param value the value to set the attribute nowrite_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def nowrite_flag=(_arg0); end + + # Returns the value of attribute verbose_flag. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag; end + + # Sets the attribute verbose_flag + # + # @param value the value to set the attribute verbose_flag to. + # + # source://rake//lib/rake/file_utils_ext.rb#14 + def verbose_flag=(_arg0); end + end +end + +# source://rake//lib/rake/file_utils_ext.rb#17 +Rake::FileUtilsExt::DEFAULT = T.let(T.unsafe(nil), Object) + +# InvocationChain tracks the chain of task invocations to detect +# circular dependencies. +# +# source://rake//lib/rake/invocation_chain.rb#6 +class Rake::InvocationChain < ::Rake::LinkedList + # Append an invocation to the chain of invocations. It is an error + # if the invocation already listed. + # + # source://rake//lib/rake/invocation_chain.rb#15 + def append(invocation); end + + # Is the invocation already in the chain? + # + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#9 + def member?(invocation); end + + # Convert to string, ie: TOP => invocation => invocation + # + # source://rake//lib/rake/invocation_chain.rb#23 + def to_s; end + + private + + # source://rake//lib/rake/invocation_chain.rb#34 + def prefix; end + + class << self + # Class level append. + # + # source://rake//lib/rake/invocation_chain.rb#28 + def append(invocation, chain); end + end +end + +# source://rake//lib/rake/invocation_chain.rb#55 +Rake::InvocationChain::EMPTY = T.let(T.unsafe(nil), Rake::InvocationChain::EmptyInvocationChain) + +# Null object for an empty chain. +# +# source://rake//lib/rake/invocation_chain.rb#39 +class Rake::InvocationChain::EmptyInvocationChain < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/invocation_chain.rb#46 + def append(invocation); end + + # @return [Boolean] + # + # source://rake//lib/rake/invocation_chain.rb#42 + def member?(obj); end + + # source://rake//lib/rake/invocation_chain.rb#50 + def to_s; end +end + +# source://rake//lib/rake/invocation_exception_mixin.rb#3 +module Rake::InvocationExceptionMixin + # Return the invocation chain (list of Rake tasks) that were in + # effect when this exception was detected by rake. May be null if + # no tasks were active. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#7 + def chain; end + + # Set the invocation chain in effect when this exception was + # detected. + # + # source://rake//lib/rake/invocation_exception_mixin.rb#13 + def chain=(value); end +end + +# source://rake//lib/rake/late_time.rb#17 +Rake::LATE = T.let(T.unsafe(nil), Rake::LateTime) + +# LateTime is a fake timestamp that occurs _after_ any other time value. +# +# source://rake//lib/rake/late_time.rb#4 +class Rake::LateTime + include ::Comparable + include ::Singleton + extend ::Singleton::SingletonClassMethods + + # source://rake//lib/rake/late_time.rb#8 + def <=>(other); end + + # source://rake//lib/rake/late_time.rb#12 + def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end +end + +# Polylithic linked list structure used to implement several data +# structures in Rake. +# +# source://rake//lib/rake/linked_list.rb#6 +class Rake::LinkedList + include ::Enumerable + + # @return [LinkedList] a new instance of LinkedList + # + # source://rake//lib/rake/linked_list.rb#84 + def initialize(head, tail = T.unsafe(nil)); end + + # Lists are structurally equivalent. + # + # source://rake//lib/rake/linked_list.rb#25 + def ==(other); end + + # Polymorphically add a new element to the head of a list. The + # type of head node will be the same list type as the tail. + # + # source://rake//lib/rake/linked_list.rb#12 + def conj(item); end + + # For each item in the list. + # + # source://rake//lib/rake/linked_list.rb#48 + def each; end + + # Is the list empty? + # .make guards against a list being empty making any instantiated LinkedList + # object not empty by default + # You should consider overriding this method if you implement your own .make method + # + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#20 + def empty?; end + + # Returns the value of attribute head. + # + # source://rake//lib/rake/linked_list.rb#8 + def head; end + + # Same as +to_s+, but with inspected items. + # + # source://rake//lib/rake/linked_list.rb#42 + def inspect; end + + # Returns the value of attribute tail. + # + # source://rake//lib/rake/linked_list.rb#8 + def tail; end + + # Convert to string: LL(item, item...) + # + # source://rake//lib/rake/linked_list.rb#36 + def to_s; end + + class << self + # Cons a new head onto the tail list. + # + # source://rake//lib/rake/linked_list.rb#73 + def cons(head, tail); end + + # The standard empty list class for the given LinkedList class. + # + # source://rake//lib/rake/linked_list.rb#78 + def empty; end + + # Make a list out of the given arguments. This method is + # polymorphic + # + # source://rake//lib/rake/linked_list.rb#59 + def make(*args); end + end +end + +# source://rake//lib/rake/linked_list.rb#110 +Rake::LinkedList::EMPTY = T.let(T.unsafe(nil), Rake::LinkedList::EmptyLinkedList) + +# Represent an empty list, using the Null Object Pattern. +# +# When inheriting from the LinkedList class, you should implement +# a type specific Empty class as well. Make sure you set the class +# instance variable @parent to the associated list class (this +# allows conj, cons and make to work polymorphically). +# +# source://rake//lib/rake/linked_list.rb#95 +class Rake::LinkedList::EmptyLinkedList < ::Rake::LinkedList + # @return [EmptyLinkedList] a new instance of EmptyLinkedList + # + # source://rake//lib/rake/linked_list.rb#98 + def initialize; end + + # @return [Boolean] + # + # source://rake//lib/rake/linked_list.rb#101 + def empty?; end + + class << self + # source://rake//lib/rake/linked_list.rb#105 + def cons(head, tail); end + end +end + +# Same as a regular task, but the immediate prerequisites are done in +# parallel using Ruby threads. +# +# source://rake//lib/rake/multi_task.rb#7 +class Rake::MultiTask < ::Rake::Task + private + + # source://rake//lib/rake/multi_task.rb#10 + def invoke_prerequisites(task_args, invocation_chain); end +end + +# The NameSpace class will lookup task names in the scope defined by a +# +namespace+ command. +# +# source://rake//lib/rake/name_space.rb#6 +class Rake::NameSpace + # Create a namespace lookup object using the given task manager + # and the list of scopes. + # + # @return [NameSpace] a new instance of NameSpace + # + # source://rake//lib/rake/name_space.rb#12 + def initialize(task_manager, scope_list); end + + # Lookup a task named +name+ in the namespace. + # + # source://rake//lib/rake/name_space.rb#20 + def [](name); end + + # The scope of the namespace (a LinkedList) + # + # source://rake//lib/rake/name_space.rb#27 + def scope; end + + # Return the list of tasks defined in this and nested namespaces. + # + # source://rake//lib/rake/name_space.rb#34 + def tasks; end +end + +# Include PrivateReader to use +private_reader+. +# +# source://rake//lib/rake/private_reader.rb#5 +module Rake::PrivateReader + mixes_in_class_methods ::Rake::PrivateReader::ClassMethods + + class << self + # source://rake//lib/rake/private_reader.rb#7 + def included(base); end + end +end + +# source://rake//lib/rake/private_reader.rb#11 +module Rake::PrivateReader::ClassMethods + # Declare a list of private accessors + # + # source://rake//lib/rake/private_reader.rb#14 + def private_reader(*names); end +end + +# A Promise object represents a promise to do work (a chore) in the +# future. The promise is created with a block and a list of +# arguments for the block. Calling value will return the value of +# the promised chore. +# +# Used by ThreadPool. +# +# source://rake//lib/rake/promise.rb#11 +class Rake::Promise + # Create a promise to do the chore specified by the block. + # + # @return [Promise] a new instance of Promise + # + # source://rake//lib/rake/promise.rb#17 + def initialize(args, &block); end + + # source://rake//lib/rake/promise.rb#14 + def recorder; end + + # source://rake//lib/rake/promise.rb#14 + def recorder=(_arg0); end + + # Return the value of this promise. + # + # If the promised chore is not yet complete, then do the work + # synchronously. We will wait. + # + # source://rake//lib/rake/promise.rb#29 + def value; end + + # If no one else is working this promise, go ahead and do the chore. + # + # source://rake//lib/rake/promise.rb#42 + def work; end + + private + + # Perform the chore promised + # + # source://rake//lib/rake/promise.rb#57 + def chore; end + + # Are we done with the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#83 + def complete?; end + + # free up these items for the GC + # + # source://rake//lib/rake/promise.rb#88 + def discard; end + + # Did the promise throw an error + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#78 + def error?; end + + # Do we have a result for the promise + # + # @return [Boolean] + # + # source://rake//lib/rake/promise.rb#73 + def result?; end + + # Record execution statistics if there is a recorder + # + # source://rake//lib/rake/promise.rb#94 + def stat(*args); end +end + +# source://rake//lib/rake/promise.rb#12 +Rake::Promise::NOT_SET = T.let(T.unsafe(nil), Object) + +# Exit status class for times the system just gives us a nil. +# +# source://rake//lib/rake/pseudo_status.rb#6 +class Rake::PseudoStatus + # @return [PseudoStatus] a new instance of PseudoStatus + # + # source://rake//lib/rake/pseudo_status.rb#9 + def initialize(code = T.unsafe(nil)); end + + # source://rake//lib/rake/pseudo_status.rb#17 + def >>(n); end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#25 + def exited?; end + + # source://rake//lib/rake/pseudo_status.rb#7 + def exitstatus; end + + # @return [Boolean] + # + # source://rake//lib/rake/pseudo_status.rb#21 + def stopped?; end + + # source://rake//lib/rake/pseudo_status.rb#13 + def to_i; end +end + +# Error indicating a recursion overflow error in task selection. +# +# source://rake//lib/rake/rule_recursion_overflow_error.rb#5 +class Rake::RuleRecursionOverflowError < ::StandardError + # @return [RuleRecursionOverflowError] a new instance of RuleRecursionOverflowError + # + # source://rake//lib/rake/rule_recursion_overflow_error.rb#6 + def initialize(*args); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#11 + def add_target(target); end + + # source://rake//lib/rake/rule_recursion_overflow_error.rb#15 + def message; end +end + +# source://rake//lib/rake/scope.rb#3 +class Rake::Scope < ::Rake::LinkedList + # Path for the scope. + # + # source://rake//lib/rake/scope.rb#6 + def path; end + + # Path for the scope + the named path. + # + # source://rake//lib/rake/scope.rb#11 + def path_with_task_name(task_name); end + + # Trim +n+ innermost scope levels from the scope. In no case will + # this trim beyond the toplevel scope. + # + # source://rake//lib/rake/scope.rb#17 + def trim(n); end +end + +# Singleton null object for an empty scope. +# +# source://rake//lib/rake/scope.rb#41 +Rake::Scope::EMPTY = T.let(T.unsafe(nil), Rake::Scope::EmptyScope) + +# Scope lists always end with an EmptyScope object. See Null +# Object Pattern) +# +# source://rake//lib/rake/scope.rb#28 +class Rake::Scope::EmptyScope < ::Rake::LinkedList::EmptyLinkedList + # source://rake//lib/rake/scope.rb#31 + def path; end + + # source://rake//lib/rake/scope.rb#35 + def path_with_task_name(task_name); end +end + +# A Task is the basic unit of work in a Rakefile. Tasks have associated +# actions (possibly more than one) and a list of prerequisites. When +# invoked, a task will first ensure that all of its prerequisites have an +# opportunity to run and then it will execute its own actions. +# +# Tasks are not usually created directly using the new method, but rather +# use the +file+ and +task+ convenience methods. +# +# source://rake//lib/rake/task.rb#15 +class Rake::Task + # Create a task named +task_name+ with no actions or prerequisites. Use + # +enhance+ to add actions and prerequisites. + # + # @return [Task] a new instance of Task + # + # source://rake//lib/rake/task.rb#99 + def initialize(task_name, app); end + + # List of actions attached to a task. + # + # source://rake//lib/rake/task.rb#24 + def actions; end + + # Add a description to the task. The description can consist of an option + # argument list (enclosed brackets) and an optional comment. + # + # source://rake//lib/rake/task.rb#298 + def add_description(description); end + + # List of all unique prerequisite tasks including prerequisite tasks' + # prerequisites. + # Includes self when cyclic dependencies are found. + # + # source://rake//lib/rake/task.rb#77 + def all_prerequisite_tasks; end + + # Has this task already been invoked? Already invoked tasks + # will be skipped unless you reenable them. + # + # source://rake//lib/rake/task.rb#39 + def already_invoked; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application; end + + # Application owning this task. + # + # source://rake//lib/rake/task.rb#27 + def application=(_arg0); end + + # Argument description (nil if none). + # + # source://rake//lib/rake/task.rb#136 + def arg_description; end + + # Name of arguments for this task. + # + # source://rake//lib/rake/task.rb#141 + def arg_names; end + + # Clear the existing prerequisites, actions, comments, and arguments of a rake task. + # + # source://rake//lib/rake/task.rb#153 + def clear; end + + # Clear the existing actions on a rake task. + # + # source://rake//lib/rake/task.rb#168 + def clear_actions; end + + # Clear the existing arguments on a rake task. + # + # source://rake//lib/rake/task.rb#180 + def clear_args; end + + # Clear the existing comments on a rake task. + # + # source://rake//lib/rake/task.rb#174 + def clear_comments; end + + # Clear the existing prerequisites of a rake task. + # + # source://rake//lib/rake/task.rb#162 + def clear_prerequisites; end + + # First line (or sentence) of all comments. Multiple comments are + # separated by a "/". + # + # source://rake//lib/rake/task.rb#322 + def comment; end + + # source://rake//lib/rake/task.rb#304 + def comment=(comment); end + + # Enhance a task with prerequisites or actions. Returns self. + # + # source://rake//lib/rake/task.rb#115 + def enhance(deps = T.unsafe(nil), &block); end + + # Execute the actions associated with this task. + # + # source://rake//lib/rake/task.rb#270 + def execute(args = T.unsafe(nil)); end + + # Full collection of comments. Multiple comments are separated by + # newlines. + # + # source://rake//lib/rake/task.rb#316 + def full_comment; end + + # source://rake//lib/rake/task.rb#46 + def inspect; end + + # Return a string describing the internal state of a task. Useful for + # debugging. + # + # source://rake//lib/rake/task.rb#354 + def investigation; end + + # Invoke the task if it is needed. Prerequisites are invoked first. + # + # source://rake//lib/rake/task.rb#186 + def invoke(*args); end + + # Invoke all the prerequisites of a task. + # + # source://rake//lib/rake/task.rb#237 + def invoke_prerequisites(task_args, invocation_chain); end + + # Invoke all the prerequisites of a task in parallel. + # + # source://rake//lib/rake/task.rb#249 + def invoke_prerequisites_concurrently(task_args, invocation_chain); end + + # File/Line locations of each of the task definitions for this + # task (only valid if the task was defined with the detect + # location option set). + # + # source://rake//lib/rake/task.rb#35 + def locations; end + + # Name of the task, including any namespace qualifiers. + # + # source://rake//lib/rake/task.rb#122 + def name; end + + # Name of task with argument list description. + # + # source://rake//lib/rake/task.rb#127 + def name_with_args; end + + # Is this task needed? + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#286 + def needed?; end + + # List of order only prerequisites for a task. + # + # source://rake//lib/rake/task.rb#21 + def order_only_prerequisites; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prereqs; end + + # List of prerequisite tasks + # + # source://rake//lib/rake/task.rb#61 + def prerequisite_tasks; end + + # List of prerequisites for a task. + # + # source://rake//lib/rake/task.rb#17 + def prerequisites; end + + # Reenable the task, allowing its tasks to be executed if the task + # is invoked again. + # + # source://rake//lib/rake/task.rb#147 + def reenable; end + + # Array of nested namespaces names used for task lookup by this task. + # + # source://rake//lib/rake/task.rb#30 + def scope; end + + # Set the names of the arguments for this task. +args+ should be + # an array of symbols, one for each argument name. + # + # source://rake//lib/rake/task.rb#348 + def set_arg_names(args); end + + # First source from a rule (nil if no sources) + # + # source://rake//lib/rake/task.rb#93 + def source; end + + # source://rake//lib/rake/task.rb#52 + def sources; end + + # List of sources for task. + # + # source://rake//lib/rake/task.rb#51 + def sources=(_arg0); end + + # Timestamp for this task. Basic tasks return the current time for their + # time stamp. Other tasks can be more sophisticated. + # + # source://rake//lib/rake/task.rb#292 + def timestamp; end + + # Return task name + # + # source://rake//lib/rake/task.rb#42 + def to_s; end + + # Add order only dependencies. + # + # source://rake//lib/rake/task.rb#379 + def |(deps); end + + protected + + # source://rake//lib/rake/task.rb#83 + def collect_prerequisites(seen); end + + # Same as invoke, but explicitly pass a call chain to detect + # circular dependencies. + # + # If multiple tasks depend on this + # one in parallel, they will all fail if the first execution of + # this task fails. + # + # source://rake//lib/rake/task.rb#197 + def invoke_with_call_chain(task_args, invocation_chain); end + + private + + # source://rake//lib/rake/task.rb#229 + def add_chain_to(exception, new_chain); end + + # source://rake//lib/rake/task.rb#308 + def add_comment(comment); end + + # Get the first sentence in a string. The sentence is terminated + # by the first period, exclamation mark, or the end of the line. + # Decimal points do not count as periods. + # + # source://rake//lib/rake/task.rb#341 + def first_sentence(string); end + + # Format the trace flags for display. + # + # source://rake//lib/rake/task.rb#261 + def format_trace_flags; end + + # source://rake//lib/rake/task.rb#65 + def lookup_prerequisite(prerequisite_name); end + + # Transform the list of comments as specified by the block and + # join with the separator. + # + # source://rake//lib/rake/task.rb#328 + def transform_comments(separator, &block); end + + class << self + # Return a task with the given name. If the task is not currently + # known, try to synthesize one from the defined rules. If no rules are + # found, but an existing file matches the task name, assume it is a file + # task with no dependencies or actions. + # + # source://rake//lib/rake/task.rb#404 + def [](task_name); end + + # Clear the task list. This cause rake to immediately forget all the + # tasks that have been assigned. (Normally used in the unit tests.) + # + # source://rake//lib/rake/task.rb#391 + def clear; end + + # Define a rule for synthesizing tasks. + # + # source://rake//lib/rake/task.rb#421 + def create_rule(*args, &block); end + + # Define a task given +args+ and an option block. If a rule with the + # given name already exists, the prerequisites and actions are added to + # the existing task. Returns the defined task. + # + # source://rake//lib/rake/task.rb#416 + def define_task(*args, &block); end + + # Format dependencies parameter to pass to task. + # + # source://rake//lib/rake/task.rb#373 + def format_deps(deps); end + + # Apply the scope to the task name according to the rules for + # this kind of task. Generic tasks will accept the scope as + # part of the name. + # + # source://rake//lib/rake/task.rb#428 + def scope_name(scope, task_name); end + + # TRUE if the task name is already defined. + # + # @return [Boolean] + # + # source://rake//lib/rake/task.rb#409 + def task_defined?(task_name); end + + # List of all defined tasks. + # + # source://rake//lib/rake/task.rb#396 + def tasks; end + end +end + +# Error indicating an ill-formed task declaration. +# +# source://rake//lib/rake/task_argument_error.rb#5 +class Rake::TaskArgumentError < ::ArgumentError; end + +# TaskArguments manage the arguments passed to a task. +# +# source://rake//lib/rake/task_arguments.rb#7 +class Rake::TaskArguments + include ::Enumerable + + # Create a TaskArgument object with a list of argument +names+ and a set + # of associated +values+. +parent+ is the parent argument object. + # + # @return [TaskArguments] a new instance of TaskArguments + # + # source://rake//lib/rake/task_arguments.rb#15 + def initialize(names, values, parent = T.unsafe(nil)); end + + # Find an argument value by name or index. + # + # source://rake//lib/rake/task_arguments.rb#44 + def [](index); end + + # Enumerates the arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#56 + def each(&block); end + + # Retrieve the list of values not associated with named arguments + # + # source://rake//lib/rake/task_arguments.rb#32 + def extras; end + + # source://rake//lib/rake/task_arguments.rb#93 + def fetch(*args, &block); end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#88 + def has_key?(key); end + + # source://rake//lib/rake/task_arguments.rb#79 + def inspect; end + + # Returns true if +key+ is one of the arguments + # + # @return [Boolean] + # + # source://rake//lib/rake/task_arguments.rb#88 + def key?(key); end + + # Returns the value of the given argument via method_missing + # + # source://rake//lib/rake/task_arguments.rb#66 + def method_missing(sym, *args); end + + # Argument names + # + # source://rake//lib/rake/task_arguments.rb#11 + def names; end + + # Create a new argument scope using the prerequisite argument + # names. + # + # source://rake//lib/rake/task_arguments.rb#38 + def new_scope(names); end + + # Retrieve the complete array of sequential values + # + # source://rake//lib/rake/task_arguments.rb#27 + def to_a; end + + # Returns a Hash of arguments and their values + # + # source://rake//lib/rake/task_arguments.rb#71 + def to_hash; end + + # source://rake//lib/rake/task_arguments.rb#75 + def to_s; end + + # Extracts the argument values at +keys+ + # + # source://rake//lib/rake/task_arguments.rb#61 + def values_at(*keys); end + + # Specify a hash of default values for task arguments. Use the + # defaults only if there is no specific value for the given + # argument. + # + # source://rake//lib/rake/task_arguments.rb#51 + def with_defaults(defaults); end + + protected + + # source://rake//lib/rake/task_arguments.rb#99 + def lookup(name); end +end + +# Base class for Task Libraries. +# +# source://rake//lib/rake/tasklib.rb#7 +class Rake::TaskLib + include ::Rake::Cloneable + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL +end + +# The TaskManager module is a mixin for managing tasks. +# +# source://rake//lib/rake/task_manager.rb#5 +module Rake::TaskManager + # source://rake//lib/rake/task_manager.rb#9 + def initialize; end + + # Find a matching task for +task_name+. + # + # source://rake//lib/rake/task_manager.rb#54 + def [](task_name, scopes = T.unsafe(nil)); end + + # Clear all tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#182 + def clear; end + + # source://rake//lib/rake/task_manager.rb#17 + def create_rule(*args, &block); end + + # Return the list of scope names currently active in the task + # manager. + # + # source://rake//lib/rake/task_manager.rb#222 + def current_scope; end + + # source://rake//lib/rake/task_manager.rb#23 + def define_task(task_class, *args, &block); end + + # If a rule can be found that matches the task name, enhance the + # task with the prerequisites and actions from the rule. Set the + # source attribute of the task appropriately for the rule. Return + # the enhanced task or nil of no rule was found. + # + # source://rake//lib/rake/task_manager.rb#151 + def enhance_with_matching_rule(task_name, level = T.unsafe(nil)); end + + # source://rake//lib/rake/task_manager.rb#68 + def generate_did_you_mean_suggestions(task_name); end + + # source://rake//lib/rake/task_manager.rb#62 + def generate_message_for_undefined_task(task_name); end + + # Evaluate the block in a nested namespace named +name+. Create + # an anonymous namespace if +name+ is nil. + # + # source://rake//lib/rake/task_manager.rb#228 + def in_namespace(name); end + + # Lookup a task. Return an existing task if found, otherwise + # create a task of the current type. + # + # source://rake//lib/rake/task_manager.rb#49 + def intern(task_class, task_name); end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description; end + + # Track the last comment made in the Rakefile. + # + # source://rake//lib/rake/task_manager.rb#7 + def last_description=(_arg0); end + + # Lookup a task, using scope and the scope hints in the task name. + # This method performs straight lookups without trying to + # synthesize file tasks or rules. Special scope names (e.g. '^') + # are recognized. If no scope argument is supplied, use the + # current scope. Return nil if the task cannot be found. + # + # source://rake//lib/rake/task_manager.rb#192 + def lookup(task_name, initial_scope = T.unsafe(nil)); end + + # Resolve the arguments for a task/rule. Returns a tuple of + # [task_name, arg_name_list, prerequisites, order_only_prerequisites]. + # + # source://rake//lib/rake/task_manager.rb#88 + def resolve_args(args); end + + # source://rake//lib/rake/task_manager.rb#81 + def synthesize_file_task(task_name); end + + # List of all defined tasks in this application. + # + # source://rake//lib/rake/task_manager.rb#168 + def tasks; end + + # List of all the tasks defined in the given scope (and its + # sub-scopes). + # + # source://rake//lib/rake/task_manager.rb#174 + def tasks_in_scope(scope); end + + private + + # Add a location to the locations field of the given task. + # + # source://rake//lib/rake/task_manager.rb#241 + def add_location(task); end + + # Attempt to create a rule given the list of prerequisites. + # + # source://rake//lib/rake/task_manager.rb#271 + def attempt_rule(task_name, task_pattern, args, extensions, block, level); end + + # Find the location that called into the dsl layer. + # + # source://rake//lib/rake/task_manager.rb#248 + def find_location; end + + # Generate an anonymous namespace name. + # + # source://rake//lib/rake/task_manager.rb#259 + def generate_name; end + + # Return the current description, clearing it in the process. + # + # source://rake//lib/rake/task_manager.rb#319 + def get_description(task); end + + # Lookup the task name + # + # source://rake//lib/rake/task_manager.rb#208 + def lookup_in_scope(name, scope); end + + # Make a list of sources from the list of file name extensions / + # translation procs. + # + # source://rake//lib/rake/task_manager.rb#293 + def make_sources(task_name, task_pattern, extensions); end + + # Resolve task arguments for a task or rule when there are + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t, order_only: [:e] + # task :t => [:d] + # task :t => [:d], order_only: [:e] + # task :t, [a] => [:d] + # task :t, [a] => [:d], order_only: [:e] + # + # source://rake//lib/rake/task_manager.rb#127 + def resolve_args_with_dependencies(args, hash); end + + # Resolve task arguments for a task or rule when there are no + # dependencies declared. + # + # The patterns recognized by this argument resolving function are: + # + # task :t + # task :t, [:a] + # + # source://rake//lib/rake/task_manager.rb#105 + def resolve_args_without_dependencies(args); end + + # source://rake//lib/rake/task_manager.rb#265 + def trace_rule(level, message); end + + class << self + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata; end + + # source://rake//lib/rake/task_manager.rb#326 + def record_task_metadata=(_arg0); end + end +end + +# source://rake//lib/rake/thread_history_display.rb#6 +class Rake::ThreadHistoryDisplay + include ::Rake::PrivateReader + extend ::Rake::PrivateReader::ClassMethods + + # @return [ThreadHistoryDisplay] a new instance of ThreadHistoryDisplay + # + # source://rake//lib/rake/thread_history_display.rb#11 + def initialize(stats); end + + # source://rake//lib/rake/thread_history_display.rb#17 + def show; end + + private + + # source://rake//lib/rake/private_reader.rb#15 + def items; end + + # source://rake//lib/rake/thread_history_display.rb#35 + def rename(hash, key, renames); end + + # source://rake//lib/rake/private_reader.rb#15 + def stats; end + + # source://rake//lib/rake/private_reader.rb#15 + def threads; end +end + +# source://rake//lib/rake/thread_pool.rb#8 +class Rake::ThreadPool + # Creates a ThreadPool object. The +thread_count+ parameter is the size + # of the pool. + # + # @return [ThreadPool] a new instance of ThreadPool + # + # source://rake//lib/rake/thread_pool.rb#12 + def initialize(thread_count); end + + # Creates a future executed by the +ThreadPool+. + # + # The args are passed to the block when executing (similarly to + # Thread#new) The return value is an object representing + # a future which has been created and added to the queue in the + # pool. Sending #value to the object will sleep the + # current thread until the future is finished and will return the + # result (or raise an exception thrown from the future) + # + # source://rake//lib/rake/thread_pool.rb#33 + def future(*args, &block); end + + # Enable the gathering of history events. + # + # source://rake//lib/rake/thread_pool.rb#68 + def gather_history; end + + # Return a array of history events for the thread pool. + # + # History gathering must be enabled to be able to see the events + # (see #gather_history). Best to call this when the job is + # complete (i.e. after ThreadPool#join is called). + # + # source://rake//lib/rake/thread_pool.rb#77 + def history; end + + # Waits until the queue of futures is empty and all threads have exited. + # + # source://rake//lib/rake/thread_pool.rb#44 + def join; end + + # Return a hash of always collected statistics for the thread pool. + # + # source://rake//lib/rake/thread_pool.rb#84 + def statistics; end + + private + + # for testing only + # + # source://rake//lib/rake/thread_pool.rb#158 + def __queue__; end + + # processes one item on the queue. Returns true if there was an + # item to process, false if there was no item + # + # source://rake//lib/rake/thread_pool.rb#95 + def process_queue_item; end + + # source://rake//lib/rake/thread_pool.rb#111 + def safe_thread_count; end + + # source://rake//lib/rake/thread_pool.rb#117 + def start_thread; end + + # source://rake//lib/rake/thread_pool.rb#145 + def stat(event, data = T.unsafe(nil)); end +end + +# source://rake//lib/rake/trace_output.rb#3 +module Rake::TraceOutput + # Write trace output to output stream +out+. + # + # The write is done as a single IO call (to print) to lessen the + # chance that the trace output is interrupted by other tasks also + # producing output. + # + # source://rake//lib/rake/trace_output.rb#10 + def trace_on(out, *strings); end +end + +# source://rake//lib/rake/version.rb#3 +Rake::VERSION = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#5 +module Rake::Version; end + +# source://rake//lib/rake/version.rb#6 +Rake::Version::BUILD = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MAJOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::MINOR = T.let(T.unsafe(nil), String) + +# source://rake//lib/rake/version.rb#8 +Rake::Version::NUMBERS = T.let(T.unsafe(nil), Array) + +# source://rake//lib/rake/version.rb#6 +Rake::Version::OTHER = T.let(T.unsafe(nil), Array) + +# Win 32 interface methods for Rake. Windows specific functionality +# will be placed here to collect that knowledge in one spot. +# +# source://rake//lib/rake/win32.rb#7 +module Rake::Win32 + class << self + # Normalize a win32 path so that the slashes are all forward slashes. + # + # source://rake//lib/rake/win32.rb#45 + def normalize(path); end + + # The standard directory containing system wide rake files on + # Win 32 systems. Try the following environment variables (in + # order): + # + # * HOME + # * HOMEDRIVE + HOMEPATH + # * APPDATA + # * USERPROFILE + # + # If the above are not defined, the return nil. + # + # @raise [Win32HomeError] + # + # source://rake//lib/rake/win32.rb#30 + def win32_system_dir; end + + # True if running on a windows system. + # + # @return [Boolean] + # + # source://rake//lib/rake/win32.rb#16 + def windows?; end + end +end + +# Error indicating a problem in locating the home directory on a +# Win32 system. +# +# source://rake//lib/rake/win32.rb#11 +class Rake::Win32::Win32HomeError < ::RuntimeError; end + +# source://rake//lib/rake.rb#70 +RakeFileUtils = Rake::FileUtilsExt + +# source://rake//lib/rake/ext/string.rb#4 +class String + include ::Comparable + + # source://rake//lib/rake/ext/string.rb#14 + def ext(newext = T.unsafe(nil)); end + + # source://rake//lib/rake/ext/string.rb#138 + def pathmap(spec = T.unsafe(nil), &block); end + + protected + + # source://rake//lib/rake/ext/string.rb#27 + def pathmap_explode; end + + # source://rake//lib/rake/ext/string.rb#41 + def pathmap_partial(n); end + + # source://rake//lib/rake/ext/string.rb#59 + def pathmap_replace(patterns, &block); end +end diff --git a/sorbet/rbi/gems/rbi@0.2.1.rbi b/sorbet/rbi/gems/rbi@0.2.1.rbi new file mode 100644 index 0000000..e588108 --- /dev/null +++ b/sorbet/rbi/gems/rbi@0.2.1.rbi @@ -0,0 +1,4535 @@ +# 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] + # + # 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/rbs_printer.rb#996 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1002 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: 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] + # + # 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 + + # source://rbi//lib/rbi/rbs_printer.rb#1013 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1019 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: 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] + # + # 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/rbs_printer.rb#5 +class RBI::RBSPrinter < ::RBI::Visitor + # source://rbi//lib/rbi/rbs_printer.rb#18 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/rbs_printer.rb#35 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi//lib/rbi/rbs_printer.rb#30 + sig { void } + def indent; end + + # source://rbi//lib/rbi/rbs_printer.rb#12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#41 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/rbs_printer.rb#275 + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + # source://rbi//lib/rbi/rbs_printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def print_locs=(_arg0); end + + # source://rbi//lib/rbi/rbs_printer.rb#350 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig(node, sig); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#61 + 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/rbs_printer.rb#47 + 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/rbs_printer.rb#54 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#67 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/rbs_printer.rb#505 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#243 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#228 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#233 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#238 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#106 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#444 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#123 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#90 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#625 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#213 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#454 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#78 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + # source://rbi//lib/rbi/rbs_printer.rb#601 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#591 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#449 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#510 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#434 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#429 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#439 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#292 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#596 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#459 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#118 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#419 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#486 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#481 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#476 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#414 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#620 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#424 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#138 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#201 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#634 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#148 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#500 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#133 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#128 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#563 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#568 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#111 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#515 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#549 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#556 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#586 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#491 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#607 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + # source://rbi//lib/rbi/rbs_printer.rb#782 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_nilable_proc?(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#777 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_proc?(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#725 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # Parse a string containing a `T.let(x, X)` and extract the type + # + # Returns `nil` is the string is not a `T.let`. + # + # source://rbi//lib/rbi/rbs_printer.rb#759 + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + # source://rbi//lib/rbi/rbs_printer.rb#747 + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#650 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#669 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#699 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/rbs_printer.rb#675 + sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } + def print_sig_param(node, param); end + + # source://rbi//lib/rbi/rbs_printer.rb#717 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end +end + +# source://rbi//lib/rbi/rbs_printer.rb#6 +class RBI::RBSPrinter::Error < ::RBI::Error; 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.11647/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.11647/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] + # + # 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.4/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.4/lib/tapioca/rbi_ext/model.rb#45 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # source://tapioca/0.16.4/lib/tapioca/rbi_ext/model.rb#55 + sig { params(name: ::String).void } + def create_extend(name); end + + # source://tapioca/0.16.4/lib/tapioca/rbi_ext/model.rb#50 + sig { params(name: ::String).void } + def create_include(name); end + + # source://tapioca/0.16.4/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.4/lib/tapioca/rbi_ext/model.rb#60 + sig { params(name: ::String).void } + def create_mixes_in_class_methods(name); end + + # source://tapioca/0.16.4/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.4/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.4/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.4/lib/tapioca/rbi_ext/model.rb#123 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # source://tapioca/0.16.4/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 + + # source://rbi//lib/rbi/rbs_printer.rb#1030 + sig { returns(::String) } + def rbs_string; 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/rbs_printer.rb#787 +class RBI::TypePrinter + # source://rbi//lib/rbi/rbs_printer.rb#794 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rbs_printer.rb#791 + sig { returns(::String) } + def string; end + + # source://rbi//lib/rbi/rbs_printer.rb#799 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#907 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#917 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#864 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#889 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#848 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#969 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#900 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#853 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#894 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#874 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#948 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#884 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#937 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#843 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#927 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#964 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#879 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#869 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + # source://rbi//lib/rbi/rbs_printer.rb#978 + sig { params(type_name: ::String).returns(::String) } + def translate_t_type(type_name); 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/sorbet/rbi/gems/redis-client@0.22.2.rbi b/sorbet/rbi/gems/redis-client@0.22.2.rbi new file mode 100644 index 0000000..36323be --- /dev/null +++ b/sorbet/rbi/gems/redis-client@0.22.2.rbi @@ -0,0 +1,1254 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `redis-client` gem. +# Please instead update this file by running `bin/tapioca gem redis-client`. + + +module Process + extend ::RedisClient::PIDCache::CoreExt + extend ::ConnectionPool::ForkTracker +end + +# source://redis-client//lib/redis_client/version.rb#3 +class RedisClient + include ::RedisClient::Common + + # @return [RedisClient] a new instance of RedisClient + # + # source://redis-client//lib/redis_client.rb#188 + def initialize(config, **_arg1); end + + # source://redis-client//lib/redis_client.rb#335 + def blocking_call(timeout, *command, **kwargs); end + + # source://redis-client//lib/redis_client.rb#355 + def blocking_call_v(timeout, command); end + + # source://redis-client//lib/redis_client.rb#275 + def call(*command, **kwargs); end + + # source://redis-client//lib/redis_client.rb#305 + def call_once(*command, **kwargs); end + + # source://redis-client//lib/redis_client.rb#320 + def call_once_v(command); end + + # source://redis-client//lib/redis_client.rb#290 + def call_v(command); end + + # source://redis-client//lib/redis_client.rb#415 + def close; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client.rb#411 + def connected?; end + + # source://redis-client//lib/redis_client.rb#212 + def db; end + + # source://redis-client//lib/redis_client.rb#420 + def disable_reconnection(&block); end + + # source://redis-client//lib/redis_client.rb#216 + def host; end + + # source://redis-client//lib/redis_client.rb#393 + def hscan(key, *args, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#204 + def id; end + + # source://redis-client//lib/redis_client.rb#195 + def inspect; end + + # source://redis-client//lib/redis_client.rb#267 + def measure_round_trip_delay; end + + # source://redis-client//lib/redis_client.rb#442 + def multi(watch: T.unsafe(nil), &block); end + + # source://redis-client//lib/redis_client.rb#232 + def password; end + + # source://redis-client//lib/redis_client.rb#224 + def path; end + + # @yield [pipeline] + # + # source://redis-client//lib/redis_client.rb#424 + def pipelined(exception: T.unsafe(nil)); end + + # source://redis-client//lib/redis_client.rb#220 + def port; end + + # source://redis-client//lib/redis_client.rb#261 + def pubsub; end + + # source://redis-client//lib/redis_client.rb#251 + def read_timeout=(timeout); end + + # source://redis-client//lib/redis_client.rb#375 + def scan(*args, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#200 + def server_url; end + + # source://redis-client//lib/redis_client.rb#236 + def size; end + + # source://redis-client//lib/redis_client.rb#384 + def sscan(key, *args, **kwargs, &block); end + + # @yield [_self] + # @yieldparam _self [RedisClient] the object that the method was called on + # + # source://redis-client//lib/redis_client.rb#240 + def then(_options = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client.rb#208 + def timeout; end + + # source://redis-client//lib/redis_client.rb#245 + def timeout=(timeout); end + + # source://redis-client//lib/redis_client.rb#228 + def username; end + + # @yield [_self] + # @yieldparam _self [RedisClient] the object that the method was called on + # + # source://redis-client//lib/redis_client.rb#240 + def with(_options = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client.rb#256 + def write_timeout=(timeout); end + + # source://redis-client//lib/redis_client.rb#402 + def zscan(key, *args, **kwargs, &block); end + + private + + # @yield [transaction] + # + # source://redis-client//lib/redis_client.rb#649 + def build_transaction; end + + # source://redis-client//lib/redis_client.rb#737 + def connect; end + + # source://redis-client//lib/redis_client.rb#683 + def ensure_connected(retryable: T.unsafe(nil)); end + + # source://redis-client//lib/redis_client.rb#730 + def raw_connection; end + + # source://redis-client//lib/redis_client.rb#657 + def scan_list(cursor_index, command, &block); end + + # source://redis-client//lib/redis_client.rb#667 + def scan_pairs(cursor_index, command); end + + class << self + # source://redis-client//lib/redis_client.rb#165 + def config(**kwargs); end + + # source://redis-client//lib/redis_client.rb#33 + def default_driver; end + + # source://redis-client//lib/redis_client.rb#45 + def default_driver=(name); end + + # source://redis-client//lib/redis_client.rb#22 + def driver(name); end + + # source://redis-client//lib/redis_client.rb#173 + def new(arg = T.unsafe(nil), **kwargs); end + + # source://redis-client//lib/redis_client.rb#181 + def register(middleware); end + + # source://redis-client//lib/redis_client.rb#18 + def register_driver(name, &block); end + + # source://redis-client//lib/redis_client.rb#169 + def sentinel(**kwargs); end + end +end + +# source://redis-client//lib/redis_client.rb#144 +class RedisClient::AuthenticationError < ::RedisClient::CommandError; end + +# source://redis-client//lib/redis_client/middlewares.rb#4 +class RedisClient::BasicMiddleware + # @return [BasicMiddleware] a new instance of BasicMiddleware + # + # source://redis-client//lib/redis_client/middlewares.rb#7 + def initialize(client); end + + # @yield [command] + # + # source://redis-client//lib/redis_client/middlewares.rb#15 + def call(command, _config); end + + # @yield [command] + # + # source://redis-client//lib/redis_client/middlewares.rb#15 + def call_pipelined(command, _config); end + + # Returns the value of attribute client. + # + # source://redis-client//lib/redis_client/middlewares.rb#5 + def client; end + + # source://redis-client//lib/redis_client/middlewares.rb#11 + def connect(_config); end +end + +# source://redis-client//lib/redis_client.rb#108 +class RedisClient::CannotConnectError < ::RedisClient::ConnectionError; end + +# source://redis-client//lib/redis_client.rb#115 +class RedisClient::CheckoutTimeoutError < ::RedisClient::TimeoutError; end + +# source://redis-client//lib/redis_client/circuit_breaker.rb#4 +class RedisClient::CircuitBreaker + # @return [CircuitBreaker] a new instance of CircuitBreaker + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#23 + def initialize(error_threshold:, error_timeout:, error_threshold_timeout: T.unsafe(nil), success_threshold: T.unsafe(nil)); end + + # Returns the value of attribute error_threshold. + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#21 + def error_threshold; end + + # Returns the value of attribute error_threshold_timeout. + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#21 + def error_threshold_timeout; end + + # Returns the value of attribute error_timeout. + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#21 + def error_timeout; end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#34 + def protect; end + + # Returns the value of attribute success_threshold. + # + # source://redis-client//lib/redis_client/circuit_breaker.rb#21 + def success_threshold; end + + private + + # source://redis-client//lib/redis_client/circuit_breaker.rb#80 + def record_error; end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#95 + def record_success; end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#65 + def refresh_state; end +end + +# source://redis-client//lib/redis_client/circuit_breaker.rb#5 +module RedisClient::CircuitBreaker::Middleware + # source://redis-client//lib/redis_client/circuit_breaker.rb#10 + def call(_command, config); end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#14 + def call_pipelined(_commands, config); end + + # source://redis-client//lib/redis_client/circuit_breaker.rb#6 + def connect(config); end +end + +# source://redis-client//lib/redis_client/circuit_breaker.rb#19 +class RedisClient::CircuitBreaker::OpenCircuitError < ::RedisClient::CannotConnectError; end + +# source://redis-client//lib/redis_client/command_builder.rb#4 +module RedisClient::CommandBuilder + extend ::RedisClient::CommandBuilder + + # source://redis-client//lib/redis_client/command_builder.rb#8 + def generate(args, kwargs = T.unsafe(nil)); end +end + +# source://redis-client//lib/redis_client.rb#125 +class RedisClient::CommandError < ::RedisClient::Error + include ::RedisClient::HasCommand + + class << self + # source://redis-client//lib/redis_client.rb#129 + def parse(error_message); end + end +end + +# source://redis-client//lib/redis_client.rb#155 +RedisClient::CommandError::ERRORS = T.let(T.unsafe(nil), Hash) + +# source://redis-client//lib/redis_client.rb#55 +module RedisClient::Common + # source://redis-client//lib/redis_client.rb#59 + def initialize(config, id: T.unsafe(nil), connect_timeout: T.unsafe(nil), read_timeout: T.unsafe(nil), write_timeout: T.unsafe(nil)); end + + # Returns the value of attribute config. + # + # source://redis-client//lib/redis_client.rb#56 + def config; end + + # Returns the value of attribute connect_timeout. + # + # source://redis-client//lib/redis_client.rb#57 + def connect_timeout; end + + # Sets the attribute connect_timeout + # + # @param value the value to set the attribute connect_timeout to. + # + # source://redis-client//lib/redis_client.rb#57 + def connect_timeout=(_arg0); end + + # Returns the value of attribute id. + # + # source://redis-client//lib/redis_client.rb#56 + def id; end + + # Returns the value of attribute read_timeout. + # + # source://redis-client//lib/redis_client.rb#57 + def read_timeout; end + + # Sets the attribute read_timeout + # + # @param value the value to set the attribute read_timeout to. + # + # source://redis-client//lib/redis_client.rb#57 + def read_timeout=(_arg0); end + + # source://redis-client//lib/redis_client.rb#75 + def timeout=(timeout); end + + # Returns the value of attribute write_timeout. + # + # source://redis-client//lib/redis_client.rb#57 + def write_timeout; end + + # Sets the attribute write_timeout + # + # @param value the value to set the attribute write_timeout to. + # + # source://redis-client//lib/redis_client.rb#57 + def write_timeout=(_arg0); end +end + +# source://redis-client//lib/redis_client/config.rb#7 +class RedisClient::Config + include ::RedisClient::Config::Common + + # @return [Config] a new instance of Config + # + # source://redis-client//lib/redis_client/config.rb#185 + def initialize(url: T.unsafe(nil), host: T.unsafe(nil), port: T.unsafe(nil), path: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), **kwargs); end + + # Returns the value of attribute host. + # + # source://redis-client//lib/redis_client/config.rb#183 + def host; end + + # Returns the value of attribute path. + # + # source://redis-client//lib/redis_client/config.rb#183 + def path; end + + # Returns the value of attribute port. + # + # source://redis-client//lib/redis_client/config.rb#183 + def port; end +end + +# source://redis-client//lib/redis_client/config.rb#14 +module RedisClient::Config::Common + # source://redis-client//lib/redis_client/config.rb#21 + def initialize(username: T.unsafe(nil), password: T.unsafe(nil), db: T.unsafe(nil), id: T.unsafe(nil), timeout: T.unsafe(nil), read_timeout: T.unsafe(nil), write_timeout: T.unsafe(nil), connect_timeout: T.unsafe(nil), ssl: T.unsafe(nil), custom: T.unsafe(nil), ssl_params: T.unsafe(nil), driver: T.unsafe(nil), protocol: T.unsafe(nil), client_implementation: T.unsafe(nil), command_builder: T.unsafe(nil), inherit_socket: T.unsafe(nil), reconnect_attempts: T.unsafe(nil), middlewares: T.unsafe(nil), circuit_breaker: T.unsafe(nil)); end + + # Returns the value of attribute circuit_breaker. + # + # source://redis-client//lib/redis_client/config.rb#15 + def circuit_breaker; end + + # Returns the value of attribute command_builder. + # + # source://redis-client//lib/redis_client/config.rb#15 + def command_builder; end + + # Returns the value of attribute connect_timeout. + # + # source://redis-client//lib/redis_client/config.rb#15 + def connect_timeout; end + + # Returns the value of attribute connection_prelude. + # + # source://redis-client//lib/redis_client/config.rb#15 + def connection_prelude; end + + # Returns the value of attribute custom. + # + # source://redis-client//lib/redis_client/config.rb#15 + def custom; end + + # Returns the value of attribute db. + # + # source://redis-client//lib/redis_client/config.rb#15 + def db; end + + # Returns the value of attribute driver. + # + # source://redis-client//lib/redis_client/config.rb#15 + def driver; end + + # Returns the value of attribute id. + # + # source://redis-client//lib/redis_client/config.rb#15 + def id; end + + # Returns the value of attribute inherit_socket. + # + # source://redis-client//lib/redis_client/config.rb#15 + def inherit_socket; end + + # Returns the value of attribute middlewares_stack. + # + # source://redis-client//lib/redis_client/config.rb#15 + def middlewares_stack; end + + # source://redis-client//lib/redis_client/config.rb#107 + def new_client(**kwargs); end + + # source://redis-client//lib/redis_client/config.rb#102 + def new_pool(**kwargs); end + + # Returns the value of attribute password. + # + # source://redis-client//lib/redis_client/config.rb#15 + def password; end + + # Returns the value of attribute protocol. + # + # source://redis-client//lib/redis_client/config.rb#15 + def protocol; end + + # Returns the value of attribute read_timeout. + # + # source://redis-client//lib/redis_client/config.rb#15 + def read_timeout; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/config.rb#94 + def resolved?; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/config.rb#111 + def retry_connecting?(attempt, _error); end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/config.rb#98 + def sentinel?; end + + # source://redis-client//lib/redis_client/config.rb#129 + def server_url; end + + # Returns the value of attribute ssl. + # + # source://redis-client//lib/redis_client/config.rb#15 + def ssl; end + + # Returns the value of attribute ssl. + def ssl?; end + + # source://redis-client//lib/redis_client/config.rb#123 + def ssl_context; end + + # Returns the value of attribute ssl_params. + # + # source://redis-client//lib/redis_client/config.rb#15 + def ssl_params; end + + # source://redis-client//lib/redis_client/config.rb#90 + def username; end + + # Returns the value of attribute write_timeout. + # + # source://redis-client//lib/redis_client/config.rb#15 + def write_timeout; end + + private + + # source://redis-client//lib/redis_client/config.rb#152 + def build_connection_prelude; end +end + +# source://redis-client//lib/redis_client/config.rb#12 +RedisClient::Config::DEFAULT_DB = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/config.rb#9 +RedisClient::Config::DEFAULT_HOST = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client/config.rb#10 +RedisClient::Config::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/config.rb#8 +RedisClient::Config::DEFAULT_TIMEOUT = T.let(T.unsafe(nil), Float) + +# source://redis-client//lib/redis_client/config.rb#11 +RedisClient::Config::DEFAULT_USERNAME = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client.rb#107 +class RedisClient::ConnectionError < ::RedisClient::Error; end + +# source://redis-client//lib/redis_client/connection_mixin.rb#4 +module RedisClient::ConnectionMixin + # source://redis-client//lib/redis_client/connection_mixin.rb#5 + def initialize; end + + # source://redis-client//lib/redis_client/connection_mixin.rb#28 + def call(command, timeout); end + + # source://redis-client//lib/redis_client/connection_mixin.rb#42 + def call_pipelined(commands, timeouts, exception: T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/connection_mixin.rb#14 + def close; end + + # source://redis-client//lib/redis_client/connection_mixin.rb#77 + def connection_timeout(timeout); end + + # source://redis-client//lib/redis_client/connection_mixin.rb#9 + def reconnect; end + + # source://redis-client//lib/redis_client/connection_mixin.rb#19 + def revalidate; end +end + +# source://redis-client//lib/redis_client.rb#94 +class RedisClient::Error < ::StandardError + include ::RedisClient::HasConfig + + class << self + # source://redis-client//lib/redis_client.rb#97 + def with_config(message, config = T.unsafe(nil)); end + end +end + +# source://redis-client//lib/redis_client.rb#110 +class RedisClient::FailoverError < ::RedisClient::ConnectionError; end + +# source://redis-client//lib/redis_client.rb#117 +module RedisClient::HasCommand + # source://redis-client//lib/redis_client.rb#120 + def _set_command(command); end + + # Returns the value of attribute command. + # + # source://redis-client//lib/redis_client.rb#118 + def command; end +end + +# source://redis-client//lib/redis_client.rb#80 +module RedisClient::HasConfig + # source://redis-client//lib/redis_client.rb#83 + def _set_config(config); end + + # Returns the value of attribute config. + # + # source://redis-client//lib/redis_client.rb#81 + def config; end + + # source://redis-client//lib/redis_client.rb#87 + def message; end +end + +# source://redis-client//lib/redis_client.rb#152 +class RedisClient::MasterDownError < ::RedisClient::ConnectionError + include ::RedisClient::HasCommand +end + +# source://redis-client//lib/redis_client/middlewares.rb#21 +class RedisClient::Middlewares < ::RedisClient::BasicMiddleware; end + +# source://redis-client//lib/redis_client.rb#523 +class RedisClient::Multi + # @return [Multi] a new instance of Multi + # + # source://redis-client//lib/redis_client.rb#524 + def initialize(command_builder); end + + # source://redis-client//lib/redis_client.rb#566 + def _blocks; end + + # source://redis-client//lib/redis_client.rb#586 + def _coerce!(results); end + + # source://redis-client//lib/redis_client.rb#562 + def _commands; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client.rb#574 + def _empty?; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client.rb#582 + def _retryable?; end + + # source://redis-client//lib/redis_client.rb#570 + def _size; end + + # source://redis-client//lib/redis_client.rb#578 + def _timeouts; end + + # source://redis-client//lib/redis_client.rb#532 + def call(*command, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#546 + def call_once(*command, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#554 + def call_once_v(command, &block); end + + # source://redis-client//lib/redis_client.rb#539 + def call_v(command, &block); end +end + +# source://redis-client//lib/redis_client.rb#147 +class RedisClient::OutOfMemoryError < ::RedisClient::CommandError; end + +# source://redis-client//lib/redis_client/pid_cache.rb#4 +module RedisClient::PIDCache + class << self + # Returns the value of attribute pid. + # + # source://redis-client//lib/redis_client/pid_cache.rb#10 + def pid; end + + # source://redis-client//lib/redis_client/pid_cache.rb#12 + def update!; end + end +end + +# source://redis-client//lib/redis_client/pid_cache.rb#18 +module RedisClient::PIDCache::CoreExt + # source://redis-client//lib/redis_client/pid_cache.rb#19 + def _fork; end +end + +# source://redis-client//lib/redis_client.rb#145 +class RedisClient::PermissionError < ::RedisClient::CommandError; end + +# source://redis-client//lib/redis_client.rb#602 +class RedisClient::Pipeline < ::RedisClient::Multi + # @return [Pipeline] a new instance of Pipeline + # + # source://redis-client//lib/redis_client.rb#603 + def initialize(_command_builder); end + + # source://redis-client//lib/redis_client.rb#634 + def _coerce!(results); end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client.rb#630 + def _empty?; end + + # source://redis-client//lib/redis_client.rb#626 + def _timeouts; end + + # source://redis-client//lib/redis_client.rb#608 + def blocking_call(timeout, *command, **kwargs, &block); end + + # source://redis-client//lib/redis_client.rb#617 + def blocking_call_v(timeout, command, &block); end +end + +# source://redis-client//lib/redis_client/pooled.rb#6 +class RedisClient::Pooled + include ::RedisClient::Common + + # @return [Pooled] a new instance of Pooled + # + # source://redis-client//lib/redis_client/pooled.rb#11 + def initialize(config, id: T.unsafe(nil), connect_timeout: T.unsafe(nil), read_timeout: T.unsafe(nil), write_timeout: T.unsafe(nil), **kwargs); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def blocking_call(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def blocking_call_v(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def call(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def call_once(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def call_once_v(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def call_v(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#37 + def close; end + + # source://redis-client//lib/redis_client/pooled.rb#65 + def hscan(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def multi(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def pipelined(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#56 + def pubsub(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#65 + def scan(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#48 + def size; end + + # source://redis-client//lib/redis_client/pooled.rb#65 + def sscan(*args, **_arg1, &block); end + + # source://redis-client//lib/redis_client/pooled.rb#25 + def then(options = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/pooled.rb#25 + def with(options = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/pooled.rb#65 + def zscan(*args, **_arg1, &block); end + + private + + # source://redis-client//lib/redis_client/pooled.rb#82 + def new_pool; end + + # source://redis-client//lib/redis_client/pooled.rb#78 + def pool; end +end + +# source://redis-client//lib/redis_client/pooled.rb#7 +RedisClient::Pooled::EMPTY_HASH = T.let(T.unsafe(nil), Hash) + +# source://redis-client//lib/redis_client.rb#104 +class RedisClient::ProtocolError < ::RedisClient::Error; end + +# source://redis-client//lib/redis_client.rb#486 +class RedisClient::PubSub + # @return [PubSub] a new instance of PubSub + # + # source://redis-client//lib/redis_client.rb#487 + def initialize(raw_connection, command_builder); end + + # source://redis-client//lib/redis_client.rb#492 + def call(*command, **kwargs); end + + # source://redis-client//lib/redis_client.rb#497 + def call_v(command); end + + # source://redis-client//lib/redis_client.rb#502 + def close; end + + # source://redis-client//lib/redis_client.rb#508 + def next_event(timeout = T.unsafe(nil)); end + + private + + # Returns the value of attribute raw_connection. + # + # source://redis-client//lib/redis_client.rb#520 + def raw_connection; end +end + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#4 +module RedisClient::RESP3 + private + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#36 + def dump(command, buffer = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#57 + def dump_any(object, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#68 + def dump_array(array, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#84 + def dump_hash(hash, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#93 + def dump_numeric(numeric, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#76 + def dump_set(set, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#97 + def dump_string(string, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#103 + def dump_symbol(symbol, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#49 + def load(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#53 + def new_buffer; end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#112 + def parse(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#166 + def parse_array(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#218 + def parse_blob(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#155 + def parse_boolean(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#200 + def parse_double(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#151 + def parse_error(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#196 + def parse_integer(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#174 + def parse_map(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#213 + def parse_null(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#182 + def parse_push(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#186 + def parse_sequence(io, size); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#170 + def parse_set(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#145 + def parse_string(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#227 + def parse_verbatim_string(io); end + + class << self + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#36 + def dump(command, buffer = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#57 + def dump_any(object, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#68 + def dump_array(array, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#84 + def dump_hash(hash, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#93 + def dump_numeric(numeric, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#76 + def dump_set(set, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#97 + def dump_string(string, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#103 + def dump_symbol(symbol, buffer); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#49 + def load(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#53 + def new_buffer; end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#112 + def parse(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#166 + def parse_array(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#218 + def parse_blob(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#155 + def parse_boolean(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#200 + def parse_double(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#151 + def parse_error(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#196 + def parse_integer(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#174 + def parse_map(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#213 + def parse_null(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#182 + def parse_push(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#186 + def parse_sequence(io, size); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#170 + def parse_set(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#145 + def parse_string(io); end + + # source://redis-client//lib/redis_client/ruby_connection/resp3.rb#227 + def parse_verbatim_string(io); end + end +end + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#13 +RedisClient::RESP3::DUMP_TYPES = T.let(T.unsafe(nil), Hash) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#11 +RedisClient::RESP3::EOL = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#12 +RedisClient::RESP3::EOL_SIZE = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#7 +class RedisClient::RESP3::Error < ::RedisClient::Error; end + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#34 +RedisClient::RESP3::INTEGER_RANGE = T.let(T.unsafe(nil), Range) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#19 +RedisClient::RESP3::PARSER_TYPES = T.let(T.unsafe(nil), Hash) + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#9 +class RedisClient::RESP3::SyntaxError < ::RedisClient::RESP3::Error; end + +# source://redis-client//lib/redis_client/ruby_connection/resp3.rb#8 +class RedisClient::RESP3::UnknownType < ::RedisClient::RESP3::Error; end + +# source://redis-client//lib/redis_client.rb#149 +class RedisClient::ReadOnlyError < ::RedisClient::ConnectionError + include ::RedisClient::HasCommand +end + +# source://redis-client//lib/redis_client.rb#113 +class RedisClient::ReadTimeoutError < ::RedisClient::TimeoutError; end + +# source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#6 +class RedisClient::RubyConnection + include ::RedisClient::ConnectionMixin + + # @return [RubyConnection] a new instance of RubyConnection + # + # source://redis-client//lib/redis_client/ruby_connection.rb#45 + def initialize(config, connect_timeout:, read_timeout:, write_timeout:); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#58 + def close; end + + # Returns the value of attribute config. + # + # source://redis-client//lib/redis_client/ruby_connection.rb#43 + def config; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/ruby_connection.rb#54 + def connected?; end + + # source://redis-client//lib/redis_client/ruby_connection.rb#106 + def measure_round_trip_delay; end + + # source://redis-client//lib/redis_client/ruby_connection.rb#94 + def read(timeout = T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#63 + def read_timeout=(timeout); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#73 + def write(command); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#82 + def write_multi(commands); end + + # source://redis-client//lib/redis_client/ruby_connection.rb#68 + def write_timeout=(timeout); end + + private + + # source://redis-client//lib/redis_client/ruby_connection.rb#114 + def connect; end + + # unknown + # + # source://redis-client//lib/redis_client/ruby_connection.rb#172 + def enable_socket_keep_alive(socket); end + + class << self + # source://redis-client//lib/redis_client/ruby_connection.rb#14 + def ssl_context(ssl_params); end + end +end + +# source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#7 +class RedisClient::RubyConnection::BufferedIO + # @return [BufferedIO] a new instance of BufferedIO + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#16 + def initialize(io, read_timeout:, write_timeout:, chunk_size: T.unsafe(nil)); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#89 + def close; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#93 + def closed?; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#97 + def eof?; end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#150 + def getbyte; end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#26 + def gets_chomp; end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#159 + def gets_integer; end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#37 + def read_chomp(bytes); end + + # Returns the value of attribute read_timeout. + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#11 + def read_timeout; end + + # Sets the attribute read_timeout + # + # @param value the value to set the attribute read_timeout to. + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#11 + def read_timeout=(_arg0); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#121 + def skip(offset); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#101 + def with_timeout(new_timeout); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#127 + def write(string); end + + # Returns the value of attribute write_timeout. + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#11 + def write_timeout; end + + # Sets the attribute write_timeout + # + # @param value the value to set the attribute write_timeout to. + # + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#11 + def write_timeout=(_arg0); end + + private + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#44 + def ensure_line; end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#184 + def ensure_remaining(bytes); end + + # source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#191 + def fill_buffer(strict, size = T.unsafe(nil)); end +end + +# source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#14 +RedisClient::RubyConnection::BufferedIO::ENCODING = T.let(T.unsafe(nil), Encoding) + +# source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#8 +RedisClient::RubyConnection::BufferedIO::EOL = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client/ruby_connection/buffered_io.rb#9 +RedisClient::RubyConnection::BufferedIO::EOL_SIZE = T.let(T.unsafe(nil), Integer) + +# Same as hiredis defaults +# +# source://redis-client//lib/redis_client/ruby_connection.rb#157 +RedisClient::RubyConnection::KEEP_ALIVE_INTERVAL = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/ruby_connection.rb#159 +RedisClient::RubyConnection::KEEP_ALIVE_PROBES = T.let(T.unsafe(nil), Integer) + +# Longer than hiredis defaults +# +# source://redis-client//lib/redis_client/ruby_connection.rb#158 +RedisClient::RubyConnection::KEEP_ALIVE_TTL = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/ruby_connection.rb#41 +RedisClient::RubyConnection::SUPPORTS_RESOLV_TIMEOUT = T.let(T.unsafe(nil), TrueClass) + +# source://redis-client//lib/redis_client/sentinel_config.rb#4 +class RedisClient::SentinelConfig + include ::RedisClient::Config::Common + + # @return [SentinelConfig] a new instance of SentinelConfig + # + # source://redis-client//lib/redis_client/sentinel_config.rb#12 + def initialize(sentinels:, sentinel_password: T.unsafe(nil), sentinel_username: T.unsafe(nil), role: T.unsafe(nil), name: T.unsafe(nil), url: T.unsafe(nil), **client_config); end + + # source://redis-client//lib/redis_client/sentinel_config.rb#101 + def check_role!(role); end + + # source://redis-client//lib/redis_client/sentinel_config.rb#80 + def host; end + + # Returns the value of attribute name. + # + # source://redis-client//lib/redis_client/sentinel_config.rb#10 + def name; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#88 + def path; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#84 + def port; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#74 + def reset; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/sentinel_config.rb#115 + def resolved?; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/sentinel_config.rb#92 + def retry_connecting?(attempt, error); end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/sentinel_config.rb#97 + def sentinel?; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#68 + def sentinels; end + + private + + # source://redis-client//lib/redis_client/sentinel_config.rb#134 + def config; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#181 + def each_sentinel; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#207 + def refresh_sentinels(sentinel_client); end + + # source://redis-client//lib/redis_client/sentinel_config.rb#144 + def resolve_master; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#163 + def resolve_replica; end + + # source://redis-client//lib/redis_client/sentinel_config.rb#159 + def sentinel_client(sentinel_config); end + + # source://redis-client//lib/redis_client/sentinel_config.rb#123 + def sentinels_to_configs(sentinels); end +end + +# source://redis-client//lib/redis_client/sentinel_config.rb#8 +RedisClient::SentinelConfig::DEFAULT_RECONNECT_ATTEMPTS = T.let(T.unsafe(nil), Integer) + +# source://redis-client//lib/redis_client/sentinel_config.rb#7 +RedisClient::SentinelConfig::SENTINEL_DELAY = T.let(T.unsafe(nil), Float) + +# source://redis-client//lib/redis_client.rb#112 +class RedisClient::TimeoutError < ::RedisClient::ConnectionError; end + +# source://redis-client//lib/redis_client/url_config.rb#6 +class RedisClient::URLConfig + # @return [URLConfig] a new instance of URLConfig + # + # source://redis-client//lib/redis_client/url_config.rb#9 + def initialize(url); end + + # source://redis-client//lib/redis_client/url_config.rb#30 + def db; end + + # source://redis-client//lib/redis_client/url_config.rb#56 + def host; end + + # source://redis-client//lib/redis_client/url_config.rb#48 + def password; end + + # source://redis-client//lib/redis_client/url_config.rb#62 + def path; end + + # source://redis-client//lib/redis_client/url_config.rb#68 + def port; end + + # @return [Boolean] + # + # source://redis-client//lib/redis_client/url_config.rb#26 + def ssl?; end + + # Returns the value of attribute uri. + # + # source://redis-client//lib/redis_client/url_config.rb#7 + def uri; end + + # Returns the value of attribute url. + # + # source://redis-client//lib/redis_client/url_config.rb#7 + def url; end + + # source://redis-client//lib/redis_client/url_config.rb#44 + def username; end +end + +# source://redis-client//lib/redis_client.rb#105 +class RedisClient::UnsupportedServer < ::RedisClient::Error; end + +# source://redis-client//lib/redis_client/version.rb#4 +RedisClient::VERSION = T.let(T.unsafe(nil), String) + +# source://redis-client//lib/redis_client.rb#114 +class RedisClient::WriteTimeoutError < ::RedisClient::TimeoutError; end + +# source://redis-client//lib/redis_client.rb#146 +class RedisClient::WrongTypeError < ::RedisClient::CommandError; end diff --git a/sorbet/rbi/gems/redis-namespace@1.11.0.rbi b/sorbet/rbi/gems/redis-namespace@1.11.0.rbi new file mode 100644 index 0000000..0b5abe7 --- /dev/null +++ b/sorbet/rbi/gems/redis-namespace@1.11.0.rbi @@ -0,0 +1,826 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `redis-namespace` gem. +# Please instead update this file by running `bin/tapioca gem redis-namespace`. + + +# source://redis-namespace//lib/redis/namespace/version.rb#3 +class Redis + include ::Redis::Commands::Bitmaps + include ::Redis::Commands::Cluster + include ::Redis::Commands::Connection + include ::Redis::Commands::Geo + include ::Redis::Commands::Hashes + include ::Redis::Commands::HyperLogLog + include ::Redis::Commands::Keys + include ::Redis::Commands::Lists + include ::Redis::Commands::Pubsub + include ::Redis::Commands::Scripting + include ::Redis::Commands::Server + include ::Redis::Commands::Sets + include ::Redis::Commands::SortedSets + include ::Redis::Commands::Streams + include ::Redis::Commands::Strings + include ::Redis::Commands::Transactions + + # source://redis/5.3.0/lib/redis.rb#63 + def initialize(options = T.unsafe(nil)); end + + # source://redis/5.3.0/lib/redis.rb#98 + def _client; end + + # source://redis/5.3.0/lib/redis.rb#88 + def close; end + + # source://redis/5.3.0/lib/redis.rb#83 + def connected?; end + + # source://redis/5.3.0/lib/redis.rb#122 + def connection; end + + # source://redis/5.3.0/lib/redis.rb#88 + def disconnect!; end + + # source://redis/5.3.0/lib/redis.rb#118 + def dup; end + + # source://redis/5.3.0/lib/redis.rb#110 + def id; end + + # source://redis/5.3.0/lib/redis.rb#114 + def inspect; end + + # source://redis/5.3.0/lib/redis.rb#102 + def pipelined(exception: T.unsafe(nil)); end + + # source://redis/5.3.0/lib/redis.rb#94 + def with; end + + # source://redis/5.3.0/lib/redis.rb#78 + def without_reconnect(&block); end + + private + + # source://redis/5.3.0/lib/redis.rb#164 + def _subscription(method, timeout, channels, block); end + + # source://redis/5.3.0/lib/redis.rb#134 + def initialize_client(options); end + + # source://redis/5.3.0/lib/redis.rb#158 + def send_blocking_command(command, timeout, &block); end + + # source://redis/5.3.0/lib/redis.rb#150 + def send_command(command, &block); end + + # source://redis/5.3.0/lib/redis.rb#146 + def synchronize; end + + class << self + # source://redis/5.3.0/lib/redis.rb#14 + def deprecate!(message); end + + # source://redis/5.3.0/lib/redis.rb#12 + def raise_deprecations; end + + # source://redis/5.3.0/lib/redis.rb#12 + def raise_deprecations=(_arg0); end + + # source://redis/5.3.0/lib/redis.rb#12 + def silence_deprecations; end + + # source://redis/5.3.0/lib/redis.rb#12 + def silence_deprecations=(_arg0); end + end +end + +# source://redis-namespace//lib/redis/namespace/version.rb#4 +class Redis::Namespace + # @return [Namespace] a new instance of Namespace + # + # source://redis-namespace//lib/redis/namespace.rb#260 + def initialize(namespace, options = T.unsafe(nil)); end + + # source://redis-namespace//lib/redis/namespace.rb#286 + def _client; end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def append(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def auth(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def bgrewriteaof(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def bgsave(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def bitcount(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def bitop(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def bitpos(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def blpop(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def brpop(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def brpoplpush(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def bzpopmax(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def bzpopmin(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#441 + def call_with_namespace(command, *args, **_arg2, &block); end + + # This operation can run for a very long time if the namespace contains lots of keys! + # It should be used in tests, or when the namespace is small enough + # and you are sure you know what you are doing. + # + # source://redis-namespace//lib/redis/namespace.rb#350 + def clear; end + + # source://redis-namespace//lib/redis/namespace.rb#280 + def client; end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def close(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def config(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#334 + def connection; end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def dbsize(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def debug(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def decr(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def decrby(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def del(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://redis-namespace//lib/redis/namespace.rb#272 + def deprecations?; end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def discard(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def disconnect!(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def dump(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def echo(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#342 + def eval(*args, **_arg1); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def evalsha(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#338 + def exec; end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def exists(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def exists?(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def expire(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def expireat(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def expiretime(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def flushall(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def flushdb(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#330 + def full_namespace; end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def get(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def getbit(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def getex(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def getrange(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def getset(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hdel(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hexists(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hget(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hgetall(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hincrby(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hincrbyfloat(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hkeys(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hlen(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hmget(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hmset(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hscan(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hscan_each(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hset(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hsetnx(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def hvals(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def incr(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def incrby(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def incrbyfloat(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def info(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#423 + def inspect; end + + # source://redis-namespace//lib/redis/namespace.rb#305 + def keys(query = T.unsafe(nil)); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def lastsave(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def lindex(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def linsert(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def llen(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def lpop(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def lpush(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def lpushx(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def lrange(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def lrem(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def lset(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def ltrim(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def mapped_hmget(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def mapped_hmset(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def mapped_mget(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def mapped_mset(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def mapped_msetnx(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#400 + def method_missing(command, *args, **_arg2, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def mget(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def monitor(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def move(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def mset(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def msetnx(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#309 + def multi(&block); end + + # source://redis-namespace//lib/redis/namespace.rb#321 + def namespace(desired_namespace = T.unsafe(nil)); end + + # Sets the attribute namespace + # + # @param value the value to set the attribute namespace to. + # + # source://redis-namespace//lib/redis/namespace.rb#256 + def namespace=(_arg0); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def object(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def persist(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def pexpire(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def pexpireat(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def pexpiretime(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def pfadd(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def pfcount(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def pfmerge(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def ping(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#317 + def pipelined(&block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def psetex(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def psubscribe(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def pttl(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def publish(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def punsubscribe(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def quit(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def randomkey(*args, **_arg1, &block); end + + # Returns the value of attribute redis. + # + # source://redis-namespace//lib/redis/namespace.rb#257 + def redis; end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def rename(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def renamenx(*args, **_arg1, &block); end + + # emulate Ruby 1.9+ and keep respond_to_missing? logic together. + # + # @return [Boolean] + # + # source://redis-namespace//lib/redis/namespace.rb#299 + def respond_to?(command, include_private = T.unsafe(nil)); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def restore(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def rpop(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def rpoplpush(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def rpush(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def rpushx(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sadd(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sadd?(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def save(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def scan(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def scan_each(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def scard(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def script(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sdiff(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sdiffstore(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def select(*args, **_arg1, &block); end + + def self_respond_to?(*_arg0); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def set(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def setbit(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def setex(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def setnx(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def setrange(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def shutdown(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sinter(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sinterstore(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sismember(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#374 + def slaveof(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def smembers(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def smismember(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def smove(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sort(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def spop(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def srandmember(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def srem(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def srem?(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sscan(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sscan_each(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def strlen(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def subscribe(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sunion(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def sunionstore(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def time(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def ttl(*args, **_arg1, &block); end + + # Ruby defines a now deprecated type method so we need to override it here + # since it will never hit method_missing + # + # source://redis-namespace//lib/redis/namespace.rb#292 + def type(key); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def unlink(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def unsubscribe(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def unwatch(*args, **_arg1, &block); end + + # Returns the value of attribute warning. + # + # source://redis-namespace//lib/redis/namespace.rb#258 + def warning; end + + # Sets the attribute warning + # + # @param value the value to set the attribute warning to. + # + # source://redis-namespace//lib/redis/namespace.rb#258 + def warning=(_arg0); end + + # @return [Boolean] + # + # source://redis-namespace//lib/redis/namespace.rb#276 + def warning?; end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def watch(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zadd(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zcard(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zcount(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zincrby(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zinterstore(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zpopmax(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zpopmin(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zrange(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zrangebylex(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zrangebyscore(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zrank(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zrem(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zremrangebylex(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zremrangebyrank(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zremrangebyscore(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zrevrange(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zrevrangebylex(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zrevrangebyscore(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zrevrank(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zscan(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zscan_each(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zscore(*args, **_arg1, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#394 + def zunionstore(*args, **_arg1, &block); end + + protected + + # source://redis-namespace//lib/redis/namespace.rb#542 + def redis=(redis); end + + private + + # source://redis-namespace//lib/redis/namespace.rb#592 + def add_namespace(key); end + + # source://redis-namespace//lib/redis/namespace.rb#579 + def call_site; end + + # Avoid modifying the caller's (pass-by-reference) arguments. + # + # source://redis-namespace//lib/redis/namespace.rb#569 + def clone_args(arg); end + + # source://redis-namespace//lib/redis/namespace.rb#623 + def create_enumerator(&block); end + + # source://redis-namespace//lib/redis/namespace.rb#583 + def namespaced_block(command, &block); end + + # source://redis-namespace//lib/redis/namespace.rb#606 + def rem_namespace(key); end + + # @return [Boolean] + # + # source://redis-namespace//lib/redis/namespace.rb#428 + def respond_to_missing?(command, include_all = T.unsafe(nil)); end + + # source://redis-namespace//lib/redis/namespace.rb#549 + def ruby2_keywords_hash(kwargs); end + + # @return [Boolean] + # + # source://redis-namespace//lib/redis/namespace.rb#635 + def supports_scan?; end + + # source://redis-namespace//lib/redis/namespace.rb#558 + def wrapped_send(redis_client, command, args = T.unsafe(nil), &block); end + + class << self + # Returns the value of attribute sadd_returns_boolean. + # + # source://redis-namespace//lib/redis/namespace.rb#253 + def sadd_returns_boolean; end + + # Sets the attribute sadd_returns_boolean + # + # @param value the value to set the attribute sadd_returns_boolean to. + # + # source://redis-namespace//lib/redis/namespace.rb#253 + def sadd_returns_boolean=(_arg0); end + + # Returns the value of attribute srem_returns_boolean. + # + # source://redis-namespace//lib/redis/namespace.rb#253 + def srem_returns_boolean; end + + # Sets the attribute srem_returns_boolean + # + # @param value the value to set the attribute srem_returns_boolean to. + # + # source://redis-namespace//lib/redis/namespace.rb#253 + def srem_returns_boolean=(_arg0); end + end +end + +# source://redis-namespace//lib/redis/namespace.rb#214 +Redis::Namespace::ADMINISTRATIVE_COMMANDS = T.let(T.unsafe(nil), Hash) + +# source://redis-namespace//lib/redis/namespace.rb#236 +Redis::Namespace::COMMANDS = T.let(T.unsafe(nil), Hash) + +# source://redis-namespace//lib/redis/namespace.rb#232 +Redis::Namespace::DEPRECATED_COMMANDS = T.let(T.unsafe(nil), Hash) + +# source://redis-namespace//lib/redis/namespace.rb#206 +Redis::Namespace::HELPER_COMMANDS = T.let(T.unsafe(nil), Hash) + +# The following tables define how input parameters and result +# values should be modified for the namespace. +# +# COMMANDS is a hash. Each key is the name of a command and each +# value is a two element array. +# +# The first element in the value array describes how to modify the +# arguments passed. It can be one of: +# +# nil +# Do nothing. +# :first +# Add the namespace to the first argument passed, e.g. +# GET key => GET namespace:key +# :all +# Add the namespace to all arguments passed, e.g. +# MGET key1 key2 => MGET namespace:key1 namespace:key2 +# :exclude_first +# Add the namespace to all arguments but the first, e.g. +# :exclude_last +# Add the namespace to all arguments but the last, e.g. +# BLPOP key1 key2 timeout => +# BLPOP namespace:key1 namespace:key2 timeout +# :exclude_options +# Add the namespace to all arguments, except the last argument, +# if the last argument is a hash of options. +# ZUNIONSTORE key1 2 key2 key3 WEIGHTS 2 1 => +# ZUNIONSTORE namespace:key1 2 namespace:key2 namespace:key3 WEIGHTS 2 1 +# :alternate +# Add the namespace to every other argument, e.g. +# MSET key1 value1 key2 value2 => +# MSET namespace:key1 value1 namespace:key2 value2 +# :sort +# Add namespace to first argument if it is non-nil +# Add namespace to second arg's :by and :store if second arg is a Hash +# Add namespace to each element in second arg's :get if second arg is +# a Hash; forces second arg's :get to be an Array if present. +# :eval_style +# Add namespace to each element in keys argument (via options hash or multi-args) +# :scan_style +# Add namespace to :match option, or supplies "#{namespace}:*" if not present. +# +# The second element in the value array describes how to modify +# the return value of the Redis call. It can be one of: +# +# nil +# Do nothing. +# :all +# Add the namespace to all elements returned, e.g. +# key1 key2 => namespace:key1 namespace:key2 +# +# source://redis-namespace//lib/redis/namespace.rb#56 +Redis::Namespace::NAMESPACED_COMMANDS = T.let(T.unsafe(nil), Hash) + +# source://redis-namespace//lib/redis/namespace.rb#199 +Redis::Namespace::TRANSACTION_COMMANDS = T.let(T.unsafe(nil), Hash) + +# source://redis-namespace//lib/redis/namespace/version.rb#5 +Redis::Namespace::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/redis@5.3.0.rbi b/sorbet/rbi/gems/redis@5.3.0.rbi new file mode 100644 index 0000000..37bc1b6 --- /dev/null +++ b/sorbet/rbi/gems/redis@5.3.0.rbi @@ -0,0 +1,3317 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `redis` gem. +# Please instead update this file by running `bin/tapioca gem redis`. + + +# source://redis//lib/redis/errors.rb#3 +class Redis + include ::Redis::Commands::Bitmaps + include ::Redis::Commands::Cluster + include ::Redis::Commands::Connection + include ::Redis::Commands::Geo + include ::Redis::Commands::Hashes + include ::Redis::Commands::HyperLogLog + include ::Redis::Commands::Keys + include ::Redis::Commands::Lists + include ::Redis::Commands::Pubsub + include ::Redis::Commands::Scripting + include ::Redis::Commands::Server + include ::Redis::Commands::Sets + include ::Redis::Commands::SortedSets + include ::Redis::Commands::Streams + include ::Redis::Commands::Strings + include ::Redis::Commands::Transactions + include ::Redis::Commands + + # Create a new client instance + # + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @option options + # @param options [Hash] + # @return [Redis] a new client instance + # + # source://redis//lib/redis.rb#63 + def initialize(options = T.unsafe(nil)); end + + # source://redis//lib/redis.rb#98 + def _client; end + + # Disconnect the client as quickly and silently as possible. + # + # source://redis//lib/redis.rb#88 + def close; end + + # Test whether or not the client is connected + # + # @return [Boolean] + # + # source://redis//lib/redis.rb#83 + def connected?; end + + # source://redis//lib/redis.rb#122 + def connection; end + + # Disconnect the client as quickly and silently as possible. + # + # source://redis//lib/redis.rb#88 + def disconnect!; end + + # source://redis//lib/redis.rb#118 + def dup; end + + # source://redis//lib/redis.rb#110 + def id; end + + # source://redis//lib/redis.rb#114 + def inspect; end + + # source://redis//lib/redis.rb#102 + def pipelined(exception: T.unsafe(nil)); end + + # @yield [_self] + # @yieldparam _self [Redis] the object that the method was called on + # + # source://redis//lib/redis.rb#94 + def with; end + + # Run code without the client reconnecting + # + # source://redis//lib/redis.rb#78 + def without_reconnect(&block); end + + private + + # source://redis//lib/redis.rb#164 + def _subscription(method, timeout, channels, block); end + + # source://redis//lib/redis.rb#134 + def initialize_client(options); end + + # source://redis//lib/redis.rb#158 + def send_blocking_command(command, timeout, &block); end + + # source://redis//lib/redis.rb#150 + def send_command(command, &block); end + + # source://redis//lib/redis.rb#146 + def synchronize; end + + class << self + # source://redis//lib/redis.rb#14 + def deprecate!(message); end + + # Returns the value of attribute raise_deprecations. + # + # source://redis//lib/redis.rb#12 + def raise_deprecations; end + + # Sets the attribute raise_deprecations + # + # @param value the value to set the attribute raise_deprecations to. + # + # source://redis//lib/redis.rb#12 + def raise_deprecations=(_arg0); end + + # Returns the value of attribute silence_deprecations. + # + # source://redis//lib/redis.rb#12 + def silence_deprecations; end + + # Sets the attribute silence_deprecations + # + # @param value the value to set the attribute silence_deprecations to. + # + # source://redis//lib/redis.rb#12 + def silence_deprecations=(_arg0); end + end +end + +# source://redis//lib/redis.rb#8 +Redis::BASE_PATH = T.let(T.unsafe(nil), String) + +# Base error for connection related errors. +# +# source://redis//lib/redis/errors.rb#33 +class Redis::BaseConnectionError < ::Redis::BaseError; end + +# Base error for all redis-rb errors. +# +# source://redis//lib/redis/errors.rb#5 +class Redis::BaseError < ::StandardError; end + +# Raised when connection to a Redis server cannot be made. +# +# source://redis//lib/redis/errors.rb#37 +class Redis::CannotConnectError < ::Redis::BaseConnectionError; end + +# source://redis//lib/redis/client.rb#6 +class Redis::Client < ::RedisClient + # source://redis//lib/redis/client.rb#95 + def blocking_call_v(timeout, command, &block); end + + # source://redis//lib/redis/client.rb#89 + def call_v(command, &block); end + + # source://redis//lib/redis/client.rb#60 + def db; end + + # source://redis//lib/redis/client.rb#64 + def host; end + + # source://redis//lib/redis/client.rb#48 + def id; end + + # source://redis//lib/redis/client.rb#120 + def inherit_socket!; end + + # source://redis//lib/redis/client.rb#114 + def multi(watch: T.unsafe(nil)); end + + # source://redis//lib/redis/client.rb#80 + def password; end + + # source://redis//lib/redis/client.rb#72 + def path; end + + # source://redis//lib/redis/client.rb#108 + def pipelined(exception: T.unsafe(nil)); end + + # source://redis//lib/redis/client.rb#68 + def port; end + + # source://redis//lib/redis/client.rb#52 + def server_url; end + + # source://redis//lib/redis/client.rb#56 + def timeout; end + + # source://redis//lib/redis/client.rb#76 + def username; end + + class << self + # source://redis//lib/redis/client.rb#22 + def config(**kwargs); end + + # source://redis//lib/redis/client.rb#26 + def sentinel(**kwargs); end + + # @raise [redis_error] + # + # source://redis//lib/redis/client.rb#30 + def translate_error!(error, mapping: T.unsafe(nil)); end + + private + + # source://redis//lib/redis/client.rb#37 + def translate_error_class(error_class, mapping: T.unsafe(nil)); end + end +end + +# source://redis//lib/redis/client.rb#7 +Redis::Client::ERROR_MAPPING = T.let(T.unsafe(nil), Hash) + +# Raised by the client when command execution returns an error reply. +# +# source://redis//lib/redis/errors.rb#20 +class Redis::CommandError < ::Redis::BaseError; end + +# source://redis//lib/redis/commands/bitmaps.rb#4 +module Redis::Commands + include ::Redis::Commands::Bitmaps + include ::Redis::Commands::Cluster + include ::Redis::Commands::Connection + include ::Redis::Commands::Geo + include ::Redis::Commands::Hashes + include ::Redis::Commands::HyperLogLog + include ::Redis::Commands::Keys + include ::Redis::Commands::Lists + include ::Redis::Commands::Pubsub + include ::Redis::Commands::Scripting + include ::Redis::Commands::Server + include ::Redis::Commands::Sets + include ::Redis::Commands::SortedSets + include ::Redis::Commands::Streams + include ::Redis::Commands::Strings + include ::Redis::Commands::Transactions + + # Sends a command to Redis and returns its reply. + # + # Replies are converted to Ruby objects according to the RESP protocol, so + # you can expect a Ruby array, integer or nil when Redis sends one. Higher + # level transformations, such as converting an array of pairs into a Ruby + # hash, are up to consumers. + # + # Redis error replies are raised as Ruby exceptions. + # + # source://redis//lib/redis/commands.rb#202 + def call(*command); end + + # Interact with the sentinel command (masters, master, slaves, failover) + # + # @param subcommand [String] e.g. `masters`, `master`, `slaves` + # @param args [Array] depends on subcommand + # @return [Array, Hash, String] depends on subcommand + # + # source://redis//lib/redis/commands.rb#211 + def sentinel(subcommand, *args); end + + private + + # source://redis//lib/redis/commands.rb#233 + def method_missing(*command); end +end + +# source://redis//lib/redis/commands/bitmaps.rb#5 +module Redis::Commands::Bitmaps + # Count the number of set bits in a range of the string value stored at key. + # + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @param scale [String, Symbol] the scale of the offset range + # e.g. 'BYTE' - interpreted as a range of bytes, 'BIT' - interpreted as a range of bits + # @return [Integer] the number of bits set to 1 + # + # source://redis//lib/redis/commands/bitmaps.rb#33 + def bitcount(key, start = T.unsafe(nil), stop = T.unsafe(nil), scale: T.unsafe(nil)); end + + # Perform a bitwise operation between strings and store the resulting string in a key. + # + # @param operation [String] e.g. `and`, `or`, `xor`, `not` + # @param destkey [String] destination key + # @param keys [String, Array] one or more source keys to perform `operation` + # @return [Integer] the length of the string stored in `destkey` + # + # source://redis//lib/redis/commands/bitmaps.rb#45 + def bitop(operation, destkey, *keys); end + + # Return the position of the first bit set to 1 or 0 in a string. + # + # @param key [String] + # @param bit [Integer] whether to look for the first 1 or 0 bit + # @param start [Integer] start index + # @param stop [Integer] stop index + # @param scale [String, Symbol] the scale of the offset range + # e.g. 'BYTE' - interpreted as a range of bytes, 'BIT' - interpreted as a range of bits + # @raise [ArgumentError] + # @return [Integer] the position of the first 1/0 bit. + # -1 if looking for 1 and it is not found or start and stop are given. + # + # source://redis//lib/redis/commands/bitmaps.rb#62 + def bitpos(key, bit, start = T.unsafe(nil), stop = T.unsafe(nil), scale: T.unsafe(nil)); end + + # Returns the bit value at offset in the string value stored at key. + # + # @param key [String] + # @param offset [Integer] bit offset + # @return [Integer] `0` or `1` + # + # source://redis//lib/redis/commands/bitmaps.rb#21 + def getbit(key, offset); end + + # Sets or clears the bit at offset in the string value stored at key. + # + # @param key [String] + # @param offset [Integer] bit offset + # @param value [Integer] bit value `0` or `1` + # @return [Integer] the original bit value stored at `offset` + # + # source://redis//lib/redis/commands/bitmaps.rb#12 + def setbit(key, offset, value); end +end + +# Commands returning 1 for true and 0 for false may be executed in a pipeline +# where the method call will return nil. Propagate the nil instead of falsely +# returning false. +# +# source://redis//lib/redis/commands.rb#42 +Redis::Commands::Boolify = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#46 +Redis::Commands::BoolifySet = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands/cluster.rb#5 +module Redis::Commands::Cluster + # Sends `ASKING` command to random node and returns its reply. + # + # @return [String] `'OK'` + # @see https://redis.io/topics/cluster-spec#ask-redirection ASK redirection + # + # source://redis//lib/redis/commands/cluster.rb#23 + def asking; end + + # Sends `CLUSTER *` command to random node and returns its reply. + # + # @param subcommand [String, Symbol] the subcommand of cluster command + # e.g. `:slots`, `:nodes`, `:slaves`, `:info` + # @return [Object] depends on the subcommand + # @see https://redis.io/commands#cluster Reference of cluster command + # + # source://redis//lib/redis/commands/cluster.rb#14 + def cluster(subcommand, *args); end +end + +# source://redis//lib/redis/commands/connection.rb#5 +module Redis::Commands::Connection + # Authenticate to the server. + # + # @param args [Array] includes both username and password + # or only password + # @return [String] `OK` + # @see https://redis.io/commands/auth AUTH command + # + # source://redis//lib/redis/commands/connection.rb#12 + def auth(*args); end + + # Echo the given string. + # + # @param value [String] + # @return [String] + # + # source://redis//lib/redis/commands/connection.rb#28 + def echo(value); end + + # Ping the server. + # + # @param message [optional, String] + # @return [String] `PONG` + # + # source://redis//lib/redis/commands/connection.rb#20 + def ping(message = T.unsafe(nil)); end + + # Close the connection. + # + # @return [String] `OK` + # + # source://redis//lib/redis/commands/connection.rb#43 + def quit; end + + # Change the selected database for the current connection. + # + # @param db [Integer] zero-based index of the DB to use (0 to 15) + # @return [String] `OK` + # + # source://redis//lib/redis/commands/connection.rb#36 + def select(db); end +end + +# source://redis//lib/redis/commands.rb#110 +Redis::Commands::EMPTY_STREAM_RESPONSE = T.let(T.unsafe(nil), Array) + +# source://redis//lib/redis/commands.rb#73 +Redis::Commands::Floatify = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#86 +Redis::Commands::FloatifyPairs = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands/geo.rb#5 +module Redis::Commands::Geo + # Adds the specified geospatial items (latitude, longitude, name) to the specified key + # + # @param key [String] + # @param member [Array] arguemnts for member or members: longitude, latitude, name + # @return [Integer] number of elements added to the sorted set + # + # source://redis//lib/redis/commands/geo.rb#11 + def geoadd(key, *member); end + + # Returns the distance between two members of a geospatial index + # + # @param key [String] + # @param members [Array] + # @param unit ['m', 'km', 'mi', 'ft'] + # @return [String, nil] returns distance in spefied unit if both members present, nil otherwise. + # + # source://redis//lib/redis/commands/geo.rb#70 + def geodist(key, member1, member2, unit = T.unsafe(nil)); end + + # Returns geohash string representing position for specified members of the specified key. + # + # @param key [String] + # @param member [String, Array] one member or array of members + # @return [Array] returns array containg geohash string if member is present, nil otherwise + # + # source://redis//lib/redis/commands/geo.rb#20 + def geohash(key, member); end + + # Returns longitude and latitude of members of a geospatial index + # + # @param key [String] + # @param member [String, Array] one member or array of members + # @return [Array, nil>] returns array of elements, where each + # element is either array of longitude and latitude or nil + # + # source://redis//lib/redis/commands/geo.rb#60 + def geopos(key, member); end + + # Query a sorted set representing a geospatial index to fetch members matching a + # given maximum distance from a point + # + # @param args [Array] key, longitude, latitude, radius, unit(m|km|ft|mi) + # @param sort ['asc', 'desc'] sort returned items from the nearest to the farthest + # or the farthest to the nearest relative to the center + # @param count [Integer] limit the results to the first N matching items + # @param options ['WITHDIST', 'WITHCOORD', 'WITHHASH'] to return additional information + # @return [Array] may be changed with `options` + # + # source://redis//lib/redis/commands/geo.rb#33 + def georadius(*args, **geoptions); end + + # Query a sorted set representing a geospatial index to fetch members matching a + # given maximum distance from an already existing member + # + # @param args [Array] key, member, radius, unit(m|km|ft|mi) + # @param sort ['asc', 'desc'] sort returned items from the nearest to the farthest or the farthest + # to the nearest relative to the center + # @param count [Integer] limit the results to the first N matching items + # @param options ['WITHDIST', 'WITHCOORD', 'WITHHASH'] to return additional information + # @return [Array] may be changed with `options` + # + # source://redis//lib/redis/commands/geo.rb#48 + def georadiusbymember(*args, **geoptions); end + + private + + # source://redis//lib/redis/commands/geo.rb#76 + def _geoarguments(*args, options: T.unsafe(nil), sort: T.unsafe(nil), count: T.unsafe(nil)); end +end + +# source://redis//lib/redis/commands/hashes.rb#5 +module Redis::Commands::Hashes + # Delete one or more hash fields. + # + # @param key [String] + # @param field [String, Array] + # @return [Integer] the number of fields that were removed from the hash + # + # source://redis//lib/redis/commands/hashes.rb#156 + def hdel(key, *fields); end + + # Determine if a hash field exists. + # + # @param key [String] + # @param field [String] + # @return [Boolean] whether or not the field exists in the hash + # + # source://redis//lib/redis/commands/hashes.rb#166 + def hexists(key, field); end + + # Get the value of a hash field. + # + # @param key [String] + # @param field [String] + # @return [String] + # + # source://redis//lib/redis/commands/hashes.rb#74 + def hget(key, field); end + + # Get all the fields and values in a hash. + # + # @param key [String] + # @return [Hash] + # + # source://redis//lib/redis/commands/hashes.rb#210 + def hgetall(key); end + + # Increment the integer value of a hash field by the given integer number. + # + # @param key [String] + # @param field [String] + # @param increment [Integer] + # @return [Integer] value of the field after incrementing it + # + # source://redis//lib/redis/commands/hashes.rb#176 + def hincrby(key, field, increment); end + + # Increment the numeric value of a hash field by the given float number. + # + # @param key [String] + # @param field [String] + # @param increment [Float] + # @return [Float] value of the field after incrementing it + # + # source://redis//lib/redis/commands/hashes.rb#186 + def hincrbyfloat(key, field, increment); end + + # Get all the fields in a hash. + # + # @param key [String] + # @return [Array] + # + # source://redis//lib/redis/commands/hashes.rb#194 + def hkeys(key); end + + # Get the number of fields in a hash. + # + # @param key [String] + # @return [Integer] number of fields in the hash + # + # source://redis//lib/redis/commands/hashes.rb#10 + def hlen(key); end + + # Get the values of all the given hash fields. + # + # @example + # redis.hmget("hash", "f1", "f2") + # # => ["v1", "v2"] + # @param key [String] + # @param fields [Array] array of fields + # @return [Array] an array of values for the specified fields + # @see #mapped_hmget + # + # source://redis//lib/redis/commands/hashes.rb#89 + def hmget(key, *fields, &blk); end + + # Set one or more hash values. + # + # @example + # redis.hmset("hash", "f1", "v1", "f2", "v2") + # # => "OK" + # @param key [String] + # @param attrs [Array] array of fields and values + # @return [String] `"OK"` + # @see #mapped_hmset + # + # source://redis//lib/redis/commands/hashes.rb#50 + def hmset(key, *attrs); end + + # Get one or more random fields from a hash. + # + # @example Get one random field + # redis.hrandfield("hash") + # # => "f1" + # @example Get multiple random fields + # redis.hrandfield("hash", 2) + # # => ["f1, "f2"] + # @example Get multiple random fields with values + # redis.hrandfield("hash", 2, with_values: true) + # # => [["f1", "s1"], ["f2", "s2"]] + # @param key [String] + # @param count [Integer] + # @param options [Hash] - `:with_values => true`: include values in output + # @return [nil, String, Array, Array<[String, Float]>] - when `key` does not exist, `nil` + # - when `count` is not specified, a field name + # - when `count` is specified and `:with_values` is not specified, an array of field names + # - when `:with_values` is specified, an array with `[field, value]` pairs + # + # source://redis//lib/redis/commands/hashes.rb#138 + def hrandfield(key, count = T.unsafe(nil), withvalues: T.unsafe(nil), with_values: T.unsafe(nil)); end + + # Scan a hash + # + # See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details + # + # @example Retrieve the first batch of key/value pairs in a hash + # redis.hscan("hash", 0) + # @param cursor [String, Integer] the cursor of the iteration + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [String, Array<[String, String]>] the next cursor and all found keys + # + # source://redis//lib/redis/commands/hashes.rb#227 + def hscan(key, cursor, **options); end + + # Scan a hash + # + # See the [Redis Server HSCAN documentation](https://redis.io/docs/latest/commands/hscan/) for further details + # + # @example Retrieve all of the key/value pairs in a hash + # redis.hscan_each("hash").to_a + # # => [["key70", "70"], ["key80", "80"]] + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [Enumerator] an enumerator for all found keys + # + # source://redis//lib/redis/commands/hashes.rb#246 + def hscan_each(key, **options, &block); end + + # Set one or more hash values. + # + # @example + # redis.hset("hash", "f1", "v1", "f2", "v2") # => 2 + # redis.hset("hash", { "f1" => "v1", "f2" => "v2" }) # => 2 + # @param key [String] + # @param attrs [Array | Hash] array or hash of fields and values + # @return [Integer] The number of fields that were added to the hash + # + # source://redis//lib/redis/commands/hashes.rb#23 + def hset(key, *attrs); end + + # Set the value of a hash field, only if the field does not exist. + # + # @param key [String] + # @param field [String] + # @param value [String] + # @return [Boolean] whether or not the field was **added** to the hash + # + # source://redis//lib/redis/commands/hashes.rb#35 + def hsetnx(key, field, value); end + + # Get all the values in a hash. + # + # @param key [String] + # @return [Array] + # + # source://redis//lib/redis/commands/hashes.rb#202 + def hvals(key); end + + # Get the values of all the given hash fields. + # + # @example + # redis.mapped_hmget("hash", "f1", "f2") + # # => { "f1" => "v1", "f2" => "v2" } + # @param key [String] + # @param fields [Array] array of fields + # @return [Hash] a hash mapping the specified fields to their values + # @see #hmget + # + # source://redis//lib/redis/commands/hashes.rb#105 + def mapped_hmget(key, *fields); end + + # Set one or more hash values. + # + # @example + # redis.mapped_hmset("hash", { "f1" => "v1", "f2" => "v2" }) + # # => "OK" + # @param key [String] + # @param hash [Hash] a non-empty hash with fields mapping to values + # @return [String] `"OK"` + # @see #hmset + # + # source://redis//lib/redis/commands/hashes.rb#65 + def mapped_hmset(key, hash); end +end + +# source://redis//lib/redis/commands.rb#57 +Redis::Commands::Hashify = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#155 +Redis::Commands::HashifyClusterNodeInfo = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#184 +Redis::Commands::HashifyClusterNodes = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#188 +Redis::Commands::HashifyClusterSlaves = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#170 +Redis::Commands::HashifyClusterSlots = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#94 +Redis::Commands::HashifyInfo = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#119 +Redis::Commands::HashifyStreamAutoclaim = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#128 +Redis::Commands::HashifyStreamAutoclaimJustId = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#113 +Redis::Commands::HashifyStreamEntries = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#144 +Redis::Commands::HashifyStreamPendingDetails = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#135 +Redis::Commands::HashifyStreamPendings = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#101 +Redis::Commands::HashifyStreams = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands/hyper_log_log.rb#5 +module Redis::Commands::HyperLogLog + # Add one or more members to a HyperLogLog structure. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Boolean] true if at least 1 HyperLogLog internal register was altered. false otherwise. + # + # source://redis//lib/redis/commands/hyper_log_log.rb#11 + def pfadd(key, member); end + + # Get the approximate cardinality of members added to HyperLogLog structure. + # + # If called with multiple keys, returns the approximate cardinality of the + # union of the HyperLogLogs contained in the keys. + # + # @param keys [String, Array] + # @return [Integer] + # + # source://redis//lib/redis/commands/hyper_log_log.rb#22 + def pfcount(*keys); end + + # Merge multiple HyperLogLog values into an unique value that will approximate the cardinality of the union of + # the observed Sets of the source HyperLogLog structures. + # + # @param dest_key [String] destination key + # @param source_key [String, Array] source key, or array of keys + # @return [Boolean] + # + # source://redis//lib/redis/commands/hyper_log_log.rb#32 + def pfmerge(dest_key, *source_key); end +end + +# source://redis//lib/redis/commands/keys.rb#5 +module Redis::Commands::Keys + # Copy a value from one key to another. + # + # @example Copy a value to another key + # redis.set "foo", "value" + # # => "OK" + # redis.copy "foo", "bar" + # # => true + # redis.get "bar" + # # => "value" + # @example Copy a value to a key in another database + # redis.set "foo", "value" + # # => "OK" + # redis.copy "foo", "bar", db: 2 + # # => true + # redis.select 2 + # # => "OK" + # redis.get "bar" + # # => "value" + # @param source [String] + # @param destination [String] + # @param db [Integer] + # @param replace [Boolean] removes the `destination` key before copying value to it + # @return [Boolean] whether the key was copied or not + # + # source://redis//lib/redis/commands/keys.rb#349 + def copy(source, destination, db: T.unsafe(nil), replace: T.unsafe(nil)); end + + # Delete one or more keys. + # + # @param keys [String, Array] + # @return [Integer] number of keys that were deleted + # + # source://redis//lib/redis/commands/keys.rb#252 + def del(*keys); end + + # Return a serialized version of the value stored at a key. + # + # @param key [String] + # @return [String] serialized_value + # + # source://redis//lib/redis/commands/keys.rb#203 + def dump(key); end + + # Determine how many of the keys exists. + # + # @param keys [String, Array] + # @return [Integer] + # + # source://redis//lib/redis/commands/keys.rb#271 + def exists(*keys); end + + # Determine if any of the keys exists. + # + # @param keys [String, Array] + # @return [Boolean] + # + # source://redis//lib/redis/commands/keys.rb#279 + def exists?(*keys); end + + # Set a key's time to live in seconds. + # + # @param key [String] + # @param seconds [Integer] time to live + # @param options [Hash] - `:nx => true`: Set expiry only when the key has no expiry. + # - `:xx => true`: Set expiry only when the key has an existing expiry. + # - `:gt => true`: Set expiry only when the new expiry is greater than current one. + # - `:lt => true`: Set expiry only when the new expiry is less than current one. + # @return [Boolean] whether the timeout was set or not + # + # source://redis//lib/redis/commands/keys.rb#82 + def expire(key, seconds, nx: T.unsafe(nil), xx: T.unsafe(nil), gt: T.unsafe(nil), lt: T.unsafe(nil)); end + + # Set the expiration for a key as a UNIX timestamp. + # + # @param key [String] + # @param unix_time [Integer] expiry time specified as a UNIX timestamp + # @param options [Hash] - `:nx => true`: Set expiry only when the key has no expiry. + # - `:xx => true`: Set expiry only when the key has an existing expiry. + # - `:gt => true`: Set expiry only when the new expiry is greater than current one. + # - `:lt => true`: Set expiry only when the new expiry is less than current one. + # @return [Boolean] whether the timeout was set or not + # + # source://redis//lib/redis/commands/keys.rb#102 + def expireat(key, unix_time, nx: T.unsafe(nil), xx: T.unsafe(nil), gt: T.unsafe(nil), lt: T.unsafe(nil)); end + + # Get a key's expiry time specified as number of seconds from UNIX Epoch + # + # @param key [String] + # @return [Integer] expiry time specified as number of seconds from UNIX Epoch + # + # source://redis//lib/redis/commands/keys.rb#116 + def expiretime(key); end + + # Find all keys matching the given pattern. + # + # See the [Redis Server KEYS documentation](https://redis.io/docs/latest/commands/keys/) for further details + # + # @param pattern [String] + # @return [Array] + # + # source://redis//lib/redis/commands/keys.rb#291 + def keys(pattern = T.unsafe(nil)); end + + # Transfer a key from the connected instance to another instance. + # + # @param key [String, Array] + # @param options [Hash] - `:host => String`: host of instance to migrate to + # - `:port => Integer`: port of instance to migrate to + # - `:db => Integer`: database to migrate to (default: same as source) + # - `:timeout => Integer`: timeout (default: same as connection timeout) + # - `:copy => Boolean`: Do not remove the key from the local instance. + # - `:replace => Boolean`: Replace existing key on the remote instance. + # @return [String] `"OK"` + # + # source://redis//lib/redis/commands/keys.rb#234 + def migrate(key, options); end + + # Move a key to another database. + # + # @example Move a key to another database + # redis.set "foo", "bar" + # # => "OK" + # redis.move "foo", 2 + # # => true + # redis.exists "foo" + # # => false + # redis.select 2 + # # => "OK" + # redis.exists "foo" + # # => true + # redis.get "foo" + # # => "bar" + # @param key [String] + # @param db [Integer] + # @return [Boolean] whether the key was moved or not + # + # source://redis//lib/redis/commands/keys.rb#320 + def move(key, db); end + + # source://redis//lib/redis/commands/keys.rb#357 + def object(*args); end + + # Remove the expiration from a key. + # + # @param key [String] + # @return [Boolean] whether the timeout was removed or not + # + # source://redis//lib/redis/commands/keys.rb#68 + def persist(key); end + + # Set a key's time to live in milliseconds. + # + # @param key [String] + # @param milliseconds [Integer] time to live + # @param options [Hash] - `:nx => true`: Set expiry only when the key has no expiry. + # - `:xx => true`: Set expiry only when the key has an existing expiry. + # - `:gt => true`: Set expiry only when the new expiry is greater than current one. + # - `:lt => true`: Set expiry only when the new expiry is less than current one. + # @return [Boolean] whether the timeout was set or not + # + # source://redis//lib/redis/commands/keys.rb#146 + def pexpire(key, milliseconds, nx: T.unsafe(nil), xx: T.unsafe(nil), gt: T.unsafe(nil), lt: T.unsafe(nil)); end + + # Set the expiration for a key as number of milliseconds from UNIX Epoch. + # + # @param key [String] + # @param ms_unix_time [Integer] expiry time specified as number of milliseconds from UNIX Epoch. + # @param options [Hash] - `:nx => true`: Set expiry only when the key has no expiry. + # - `:xx => true`: Set expiry only when the key has an existing expiry. + # - `:gt => true`: Set expiry only when the new expiry is greater than current one. + # - `:lt => true`: Set expiry only when the new expiry is less than current one. + # @return [Boolean] whether the timeout was set or not + # + # source://redis//lib/redis/commands/keys.rb#166 + def pexpireat(key, ms_unix_time, nx: T.unsafe(nil), xx: T.unsafe(nil), gt: T.unsafe(nil), lt: T.unsafe(nil)); end + + # Get a key's expiry time specified as number of milliseconds from UNIX Epoch + # + # @param key [String] + # @return [Integer] expiry time specified as number of milliseconds from UNIX Epoch + # + # source://redis//lib/redis/commands/keys.rb#180 + def pexpiretime(key); end + + # Get the time to live (in milliseconds) for a key. + # + # In Redis 2.6 or older the command returns -1 if the key does not exist or if + # the key exist but has no associated expire. + # + # Starting with Redis 2.8 the return value in case of error changed: + # + # - The command returns -2 if the key does not exist. + # - The command returns -1 if the key exists but has no associated expire. + # + # @param key [String] + # @return [Integer] remaining time to live in milliseconds + # + # source://redis//lib/redis/commands/keys.rb#195 + def pttl(key); end + + # Return a random key from the keyspace. + # + # @return [String] + # + # source://redis//lib/redis/commands/keys.rb#364 + def randomkey; end + + # Rename a key. If the new key already exists it is overwritten. + # + # @param old_name [String] + # @param new_name [String] + # @return [String] `OK` + # + # source://redis//lib/redis/commands/keys.rb#373 + def rename(old_name, new_name); end + + # Rename a key, only if the new key does not exist. + # + # @param old_name [String] + # @param new_name [String] + # @return [Boolean] whether the key was renamed or not + # + # source://redis//lib/redis/commands/keys.rb#382 + def renamenx(old_name, new_name); end + + # Create a key using the serialized value, previously obtained using DUMP. + # + # @param key [String] + # @param ttl [String] + # @param serialized_value [String] + # @param options [Hash] - `:replace => Boolean`: if false, raises an error if key already exists + # @raise [Redis::CommandError] + # @return [String] `"OK"` + # + # source://redis//lib/redis/commands/keys.rb#216 + def restore(key, ttl, serialized_value, replace: T.unsafe(nil)); end + + # Scan the keyspace + # + # See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details + # + # @example Retrieve the first batch of keys + # redis.scan(0) + # # => ["4", ["key:21", "key:47", "key:42"]] + # @example Retrieve a batch of keys matching a pattern + # redis.scan(4, :match => "key:1?") + # # => ["92", ["key:13", "key:18"]] + # @example Retrieve a batch of keys of a certain type + # redis.scan(92, :type => "zset") + # # => ["173", ["sortedset:14", "sortedset:78"]] + # @param cursor [String, Integer] the cursor of the iteration + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # - `:type => String`: return keys only of the given type + # @return [String, Array] the next cursor and all found keys + # + # source://redis//lib/redis/commands/keys.rb#27 + def scan(cursor, **options); end + + # Scan the keyspace + # + # See the [Redis Server SCAN documentation](https://redis.io/docs/latest/commands/scan/) for further details + # + # @example Retrieve all of the keys (with possible duplicates) + # redis.scan_each.to_a + # # => ["key:21", "key:47", "key:42"] + # @example Execute block for each key matching a pattern + # redis.scan_each(:match => "key:1?") {|key| puts key} + # # => key:13 + # # => key:18 + # @example Execute block for each key of a type + # redis.scan_each(:type => "hash") {|key| puts redis.type(key)} + # # => "hash" + # # => "hash" + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # - `:type => String`: return keys only of the given type + # @return [Enumerator] an enumerator for all found keys + # + # source://redis//lib/redis/commands/keys.rb#53 + def scan_each(**options, &block); end + + # Sort the elements in a list, set or sorted set. + # + # @example Retrieve the first 2 elements from an alphabetically sorted "list" + # redis.sort("list", :order => "alpha", :limit => [0, 2]) + # # => ["a", "b"] + # @example Store an alphabetically descending list in "target" + # redis.sort("list", :order => "desc alpha", :store => "target") + # # => 26 + # @param key [String] + # @param options [Hash] - `:by => String`: use external key to sort elements by + # - `:limit => [offset, count]`: skip `offset` elements, return a maximum + # of `count` elements + # - `:get => [String, Array]`: single key or array of keys to + # retrieve per element in the result + # - `:order => String`: combination of `ASC`, `DESC` and optionally `ALPHA` + # - `:store => String`: key to store the result at + # @return [Array, Array>, Integer] - when `:get` is not specified, or holds a single element, an array of elements + # - when `:get` is specified, and holds more than one element, an array of + # elements where every element is an array with the result for every + # element specified in `:get` + # - when `:store` is specified, the number of elements in the stored result + # + # source://redis//lib/redis/commands/keys.rb#411 + def sort(key, by: T.unsafe(nil), limit: T.unsafe(nil), get: T.unsafe(nil), order: T.unsafe(nil), store: T.unsafe(nil)); end + + # Get the time to live (in seconds) for a key. + # + # In Redis 2.6 or older the command returns -1 if the key does not exist or if + # the key exist but has no associated expire. + # + # Starting with Redis 2.8 the return value in case of error changed: + # + # - The command returns -2 if the key does not exist. + # - The command returns -1 if the key exists but has no associated expire. + # + # @param key [String] + # @return [Integer] remaining time to live in seconds. + # + # source://redis//lib/redis/commands/keys.rb#132 + def ttl(key); end + + # Determine the type stored at key. + # + # @param key [String] + # @return [String] `string`, `list`, `set`, `zset`, `hash` or `none` + # + # source://redis//lib/redis/commands/keys.rb#441 + def type(key); end + + # Unlink one or more keys. + # + # @param keys [String, Array] + # @return [Integer] number of keys that were unlinked + # + # source://redis//lib/redis/commands/keys.rb#263 + def unlink(*keys); end + + private + + # source://redis//lib/redis/commands/keys.rb#447 + def _scan(command, cursor, args, match: T.unsafe(nil), count: T.unsafe(nil), type: T.unsafe(nil), &block); end +end + +# source://redis//lib/redis/commands/lists.rb#5 +module Redis::Commands::Lists + # Remove the first/last element in a list and append/prepend it + # to another list and return it, or block until one is available. + # + # @example Without timeout + # element = redis.blmove("foo", "bar", "LEFT", "RIGHT") + # # => "element" + # @example With timeout + # element = redis.blmove("foo", "bar", "LEFT", "RIGHT", timeout: 5) + # # => nil on timeout + # # => "element" on success + # @param destination [String] destination key + # @param where_destination [String, Symbol] where to push the element to the source list + # e.g. 'LEFT' - to head, 'RIGHT' - to tail + # @param options [Hash] - `:timeout => [Float, Integer]`: timeout in seconds, defaults to no timeout + # @param where_source [String, Symbol] from where to remove the element from the source list + # e.g. 'LEFT' - from head, 'RIGHT' - from tail + # @param source [String] source key + # @return [nil, String] the element, or nil when the source key does not exist or the timeout expired + # + # source://redis//lib/redis/commands/lists.rb#55 + def blmove(source, destination, where_source, where_destination, timeout: T.unsafe(nil)); end + + # Pops one or more elements from the first non-empty list key from the list + # of provided key names. If lists are empty, blocks until timeout has passed. + # + # @example Popping a element + # redis.blmpop(1.0, 'list') + # #=> ['list', ['a']] + # @example With count option + # redis.blmpop(1.0, 'list', count: 2) + # #=> ['list', ['a', 'b']] + # @raise [ArgumentError] + # @return [Array>] list of popped elements or nil + # + # source://redis//lib/redis/commands/lists.rb#205 + def blmpop(timeout, *keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + + # Remove and get the first element in a list, or block until one is available. + # + # @example With timeout + # list, element = redis.blpop("list", :timeout => 5) + # # => nil on timeout + # # => ["list", "element"] on success + # @example Without timeout + # list, element = redis.blpop("list") + # # => ["list", "element"] + # @example Blocking pop on multiple lists + # list, element = redis.blpop(["list", "another_list"]) + # # => ["list", "element"] + # @param keys [String, Array] one or more keys to perform the + # blocking pop on + # @param options [Hash] - `:timeout => [Float, Integer]`: timeout in seconds, defaults to no timeout + # @return [nil, [String, String]] - `nil` when the operation timed out + # - tuple of the list that was popped from and element was popped otherwise + # + # source://redis//lib/redis/commands/lists.rb#150 + def blpop(*args); end + + # Remove and get the last element in a list, or block until one is available. + # + # @param keys [String, Array] one or more keys to perform the + # blocking pop on + # @param options [Hash] - `:timeout => [Float, Integer]`: timeout in seconds, defaults to no timeout + # @return [nil, [String, String]] - `nil` when the operation timed out + # - tuple of the list that was popped from and element was popped otherwise + # @see #blpop + # + # source://redis//lib/redis/commands/lists.rb#166 + def brpop(*args); end + + # Pop a value from a list, push it to another list and return it; or block + # until one is available. + # + # @param source [String] source key + # @param destination [String] destination key + # @param options [Hash] - `:timeout => [Float, Integer]`: timeout in seconds, defaults to no timeout + # @return [nil, String] - `nil` when the operation timed out + # - the element was popped and pushed otherwise + # + # source://redis//lib/redis/commands/lists.rb#181 + def brpoplpush(source, destination, timeout: T.unsafe(nil)); end + + # Get an element from a list by its index. + # + # @param key [String] + # @param index [Integer] + # @return [String] + # + # source://redis//lib/redis/commands/lists.rb#245 + def lindex(key, index); end + + # Insert an element before or after another element in a list. + # + # @param key [String] + # @param where [String, Symbol] `BEFORE` or `AFTER` + # @param pivot [String] reference element + # @param value [String] + # @return [Integer] length of the list after the insert operation, or `-1` + # when the element `pivot` was not found + # + # source://redis//lib/redis/commands/lists.rb#257 + def linsert(key, where, pivot, value); end + + # Get the length of a list. + # + # @param key [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/lists.rb#10 + def llen(key); end + + # Remove the first/last element in a list, append/prepend it to another list and return it. + # + # @note This command comes in place of the now deprecated RPOPLPUSH. + # Doing LMOVE RIGHT LEFT is equivalent. + # @param source [String] source key + # @param destination [String] destination key + # @param where_source [String, Symbol] from where to remove the element from the source list + # e.g. 'LEFT' - from head, 'RIGHT' - from tail + # @param where_destination [String, Symbol] where to push the element to the source list + # e.g. 'LEFT' - to head, 'RIGHT' - to tail + # @return [nil, String] the element, or nil when the source key does not exist + # + # source://redis//lib/redis/commands/lists.rb#27 + def lmove(source, destination, where_source, where_destination); end + + # Pops one or more elements from the first non-empty list key from the list + # of provided key names. + # + # @example Popping a element + # redis.lmpop('list') + # #=> ['list', ['a']] + # @example With count option + # redis.lmpop('list', count: 2) + # #=> ['list', ['a', 'b']] + # @raise [ArgumentError] + # @return [Array>] list of popped elements or nil + # + # source://redis//lib/redis/commands/lists.rb#231 + def lmpop(*keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + + # Remove and get the first elements in a list. + # + # @param key [String] + # @param count [Integer] number of elements to remove + # @return [nil, String, Array] the values of the first elements + # + # source://redis//lib/redis/commands/lists.rb#103 + def lpop(key, count = T.unsafe(nil)); end + + # Prepend one or more values to a list, creating the list if it doesn't exist + # + # @param key [String] + # @param value [String, Array] string value, or array of string values to push + # @return [Integer] the length of the list after the push operation + # + # source://redis//lib/redis/commands/lists.rb#67 + def lpush(key, value); end + + # Prepend a value to a list, only if the list exists. + # + # @param key [String] + # @param value [String] + # @return [Integer] the length of the list after the push operation + # + # source://redis//lib/redis/commands/lists.rb#76 + def lpushx(key, value); end + + # Get a range of elements from a list. + # + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @return [Array] + # + # source://redis//lib/redis/commands/lists.rb#267 + def lrange(key, start, stop); end + + # Remove elements from a list. + # + # @param key [String] + # @param count [Integer] number of elements to remove. Use a positive + # value to remove the first `count` occurrences of `value`. A negative + # value to remove the last `count` occurrences of `value`. Or zero, to + # remove all occurrences of `value` from the list. + # @param value [String] + # @return [Integer] the number of removed elements + # + # source://redis//lib/redis/commands/lists.rb#280 + def lrem(key, count, value); end + + # Set the value of an element in a list by its index. + # + # @param key [String] + # @param index [Integer] + # @param value [String] + # @return [String] `OK` + # + # source://redis//lib/redis/commands/lists.rb#290 + def lset(key, index, value); end + + # Trim a list to the specified range. + # + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @return [String] `OK` + # + # source://redis//lib/redis/commands/lists.rb#300 + def ltrim(key, start, stop); end + + # Remove and get the last elements in a list. + # + # @param key [String] + # @param count [Integer] number of elements to remove + # @return [nil, String, Array] the values of the last elements + # + # source://redis//lib/redis/commands/lists.rb#114 + def rpop(key, count = T.unsafe(nil)); end + + # Remove the last element in a list, append it to another list and return it. + # + # @param source [String] source key + # @param destination [String] destination key + # @return [nil, String] the element, or nil when the source key does not exist + # + # source://redis//lib/redis/commands/lists.rb#125 + def rpoplpush(source, destination); end + + # Append one or more values to a list, creating the list if it doesn't exist + # + # @param key [String] + # @param value [String, Array] string value, or array of string values to push + # @return [Integer] the length of the list after the push operation + # + # source://redis//lib/redis/commands/lists.rb#85 + def rpush(key, value); end + + # Append a value to a list, only if the list exists. + # + # @param key [String] + # @param value [String] + # @return [Integer] the length of the list after the push operation + # + # source://redis//lib/redis/commands/lists.rb#94 + def rpushx(key, value); end + + private + + # source://redis//lib/redis/commands/lists.rb#306 + def _bpop(cmd, args, &blk); end + + # source://redis//lib/redis/commands/lists.rb#323 + def _normalize_move_wheres(where_source, where_destination); end +end + +# source://redis//lib/redis/commands.rb#192 +Redis::Commands::Noop = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands.rb#65 +Redis::Commands::Pairify = T.let(T.unsafe(nil), Proc) + +# source://redis//lib/redis/commands/pubsub.rb#5 +module Redis::Commands::Pubsub + # Listen for messages published to channels matching the given patterns. + # See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) + # for further details + # + # source://redis//lib/redis/commands/pubsub.rb#34 + def psubscribe(*channels, &block); end + + # Listen for messages published to channels matching the given patterns. + # Throw a timeout error if there is no messages for a timeout period. + # See the [Redis Server PSUBSCRIBE documentation](https://redis.io/docs/latest/commands/psubscribe/) + # for further details + # + # source://redis//lib/redis/commands/pubsub.rb#42 + def psubscribe_with_timeout(timeout, *channels, &block); end + + # Post a message to a channel. + # + # source://redis//lib/redis/commands/pubsub.rb#7 + def publish(channel, message); end + + # Inspect the state of the Pub/Sub subsystem. + # Possible subcommands: channels, numsub, numpat. + # + # source://redis//lib/redis/commands/pubsub.rb#55 + def pubsub(subcommand, *args); end + + # Stop listening for messages posted to channels matching the given patterns. + # See the [Redis Server PUNSUBSCRIBE documentation](https://redis.io/docs/latest/commands/punsubscribe/) + # for further details + # + # source://redis//lib/redis/commands/pubsub.rb#49 + def punsubscribe(*channels); end + + # Post a message to a channel in a shard. + # + # source://redis//lib/redis/commands/pubsub.rb#60 + def spublish(channel, message); end + + # Listen for messages published to the given channels in a shard. + # + # source://redis//lib/redis/commands/pubsub.rb#65 + def ssubscribe(*channels, &block); end + + # Listen for messages published to the given channels in a shard. + # Throw a timeout error if there is no messages for a timeout period. + # + # source://redis//lib/redis/commands/pubsub.rb#71 + def ssubscribe_with_timeout(timeout, *channels, &block); end + + # Listen for messages published to the given channels. + # + # source://redis//lib/redis/commands/pubsub.rb#16 + def subscribe(*channels, &block); end + + # Listen for messages published to the given channels. Throw a timeout error + # if there is no messages for a timeout period. + # + # source://redis//lib/redis/commands/pubsub.rb#22 + def subscribe_with_timeout(timeout, *channels, &block); end + + # @return [Boolean] + # + # source://redis//lib/redis/commands/pubsub.rb#11 + def subscribed?; end + + # Stop listening for messages posted to the given channels in a shard. + # + # source://redis//lib/redis/commands/pubsub.rb#76 + def sunsubscribe(*channels); end + + # Stop listening for messages posted to the given channels. + # + # source://redis//lib/redis/commands/pubsub.rb#27 + def unsubscribe(*channels); end +end + +# source://redis//lib/redis/commands/scripting.rb#5 +module Redis::Commands::Scripting + # Evaluate Lua script. + # + # @example EVAL with KEYS and ARGV as array arguments + # redis.eval("return { KEYS, ARGV }", ["k1", "k2"], ["a1", "a2"]) + # # => [["k1", "k2"], ["a1", "a2"]] + # @example EVAL without KEYS nor ARGV + # redis.eval("return 1") + # # => 1 + # @example EVAL with KEYS and ARGV in a hash argument + # redis.eval("return { KEYS, ARGV }", :keys => ["k1", "k2"], :argv => ["a1", "a2"]) + # # => [["k1", "k2"], ["a1", "a2"]] + # @param argv [Array] optional array with arguments to pass to the script + # @param keys [Array] optional array with keys to pass to the script + # @param options [Hash] - `:keys => Array`: optional array with keys to pass to the script + # - `:argv => Array`: optional array with arguments to pass to the script + # @return depends on the script + # @see #script + # @see #evalsha + # + # source://redis//lib/redis/commands/scripting.rb#71 + def eval(*args); end + + # Evaluate Lua script by its SHA. + # + # @example EVALSHA with KEYS and ARGV as array arguments + # redis.evalsha(sha, ["k1", "k2"], ["a1", "a2"]) + # # => + # @example EVALSHA without KEYS nor ARGV + # redis.evalsha(sha) + # # => + # @example EVALSHA with KEYS and ARGV in a hash argument + # redis.evalsha(sha, :keys => ["k1", "k2"], :argv => ["a1", "a2"]) + # # => + # @param argv [Array] optional array with arguments to pass to the script + # @param keys [Array] optional array with keys to pass to the script + # @param options [Hash] - `:keys => Array`: optional array with keys to pass to the script + # - `:argv => Array`: optional array with arguments to pass to the script + # @return depends on the script + # @see #script + # @see #eval + # + # source://redis//lib/redis/commands/scripting.rb#96 + def evalsha(*args); end + + # Control remote script registry. + # + # @example Load a script + # sha = redis.script(:load, "return 1") + # # => + # @example Check if a script exists + # redis.script(:exists, sha) + # # => true + # @example Check if multiple scripts exist + # redis.script(:exists, [sha, other_sha]) + # # => [true, false] + # @example Flush the script registry + # redis.script(:flush) + # # => "OK" + # @example Kill a running script + # redis.script(:kill) + # # => "OK" + # @param subcommand [String] e.g. `exists`, `flush`, `load`, `kill` + # @param args [Array] depends on subcommand + # @return [String, Boolean, Array, ...] depends on subcommand + # @see #eval + # @see #evalsha + # + # source://redis//lib/redis/commands/scripting.rb#30 + def script(subcommand, *args); end + + private + + # source://redis//lib/redis/commands/scripting.rb#102 + def _eval(cmd, args); end +end + +# source://redis//lib/redis/commands/server.rb#5 +module Redis::Commands::Server + # Asynchronously rewrite the append-only file. + # + # @return [String] `OK` + # + # source://redis//lib/redis/commands/server.rb#9 + def bgrewriteaof; end + + # Asynchronously save the dataset to disk. + # + # @return [String] `OK` + # + # source://redis//lib/redis/commands/server.rb#16 + def bgsave; end + + # Manage client connections. + # + # @param subcommand [String, Symbol] e.g. `kill`, `list`, `getname`, `setname` + # @return [String, Hash] depends on subcommand + # + # source://redis//lib/redis/commands/server.rb#39 + def client(subcommand, *args); end + + # Get or set server configuration parameters. + # + # @param action [Symbol] e.g. `:get`, `:set`, `:resetstat` + # @return [String, Hash] string reply, or hash when retrieving more than one + # property with `CONFIG GET` + # + # source://redis//lib/redis/commands/server.rb#25 + def config(action, *args); end + + # Return the number of keys in the selected database. + # + # @return [Integer] + # + # source://redis//lib/redis/commands/server.rb#55 + def dbsize; end + + # source://redis//lib/redis/commands/server.rb#183 + def debug(*args); end + + # Remove all keys from all databases. + # + # @param options [Hash] - `:async => Boolean`: async flush (default: false) + # @return [String] `OK` + # + # source://redis//lib/redis/commands/server.rb#64 + def flushall(options = T.unsafe(nil)); end + + # Remove all keys from the current database. + # + # @param options [Hash] - `:async => Boolean`: async flush (default: false) + # @return [String] `OK` + # + # source://redis//lib/redis/commands/server.rb#77 + def flushdb(options = T.unsafe(nil)); end + + # Get information and statistics about the server. + # + # @param cmd [String, Symbol] e.g. "commandstats" + # @return [Hash] + # + # source://redis//lib/redis/commands/server.rb#89 + def info(cmd = T.unsafe(nil)); end + + # Get the UNIX time stamp of the last successful save to disk. + # + # @return [Integer] + # + # source://redis//lib/redis/commands/server.rb#110 + def lastsave; end + + # Listen for all requests received by the server in real time. + # + # There is no way to interrupt this command. + # + # @yield a block to be called for every line of output + # @yieldparam line [String] timestamp and command that was executed + # + # source://redis//lib/redis/commands/server.rb#120 + def monitor; end + + # Synchronously save the dataset to disk. + # + # @return [String] + # + # source://redis//lib/redis/commands/server.rb#133 + def save; end + + # Synchronously save the dataset to disk and then shut down the server. + # + # source://redis//lib/redis/commands/server.rb#138 + def shutdown; end + + # Make the server a slave of another instance, or promote it as master. + # + # source://redis//lib/redis/commands/server.rb#150 + def slaveof(host, port); end + + # Interact with the slowlog (get, len, reset) + # + # @param subcommand [String] e.g. `get`, `len`, `reset` + # @param length [Integer] maximum number of entries to return + # @return [Array, Integer, String] depends on subcommand + # + # source://redis//lib/redis/commands/server.rb#159 + def slowlog(subcommand, length = T.unsafe(nil)); end + + # Internal command used for replication. + # + # source://redis//lib/redis/commands/server.rb#166 + def sync; end + + # Return the server time. + # + # @example + # r.time # => [ 1333093196, 606806 ] + # @return [Array] tuple of seconds since UNIX epoch and + # microseconds in the current second + # + # source://redis//lib/redis/commands/server.rb#177 + def time; end +end + +# source://redis//lib/redis/commands/sets.rb#5 +module Redis::Commands::Sets + # Add one or more members to a set. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Integer] The number of members that were successfully added + # + # source://redis//lib/redis/commands/sets.rb#19 + def sadd(key, *members); end + + # Add one or more members to a set. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Boolean] Wether at least one member was successfully added. + # + # source://redis//lib/redis/commands/sets.rb#29 + def sadd?(key, *members); end + + # Get the number of members in a set. + # + # @param key [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/sets.rb#10 + def scard(key); end + + # Subtract multiple sets. + # + # @param keys [String, Array] keys pointing to sets to subtract + # @return [Array] members in the difference + # + # source://redis//lib/redis/commands/sets.rb#123 + def sdiff(*keys); end + + # Subtract multiple sets and store the resulting set in a key. + # + # @param destination [String] destination key + # @param keys [String, Array] keys pointing to sets to subtract + # @return [Integer] number of elements in the resulting set + # + # source://redis//lib/redis/commands/sets.rb#133 + def sdiffstore(destination, *keys); end + + # Intersect multiple sets. + # + # @param keys [String, Array] keys pointing to sets to intersect + # @return [Array] members in the intersection + # + # source://redis//lib/redis/commands/sets.rb#142 + def sinter(*keys); end + + # Intersect multiple sets and store the resulting set in a key. + # + # @param destination [String] destination key + # @param keys [String, Array] keys pointing to sets to intersect + # @return [Integer] number of elements in the resulting set + # + # source://redis//lib/redis/commands/sets.rb#152 + def sinterstore(destination, *keys); end + + # Determine if a given value is a member of a set. + # + # @param key [String] + # @param member [String] + # @return [Boolean] + # + # source://redis//lib/redis/commands/sets.rb#95 + def sismember(key, member); end + + # Get all the members in a set. + # + # @param key [String] + # @return [Array] + # + # source://redis//lib/redis/commands/sets.rb#115 + def smembers(key); end + + # Determine if multiple values are members of a set. + # + # @param key [String] + # @param members [String, Array] + # @return [Array] + # + # source://redis//lib/redis/commands/sets.rb#104 + def smismember(key, *members); end + + # Move a member from one set to another. + # + # @param source [String] source key + # @param destination [String] destination key + # @param member [String] member to move from `source` to `destination` + # @return [Boolean] + # + # source://redis//lib/redis/commands/sets.rb#86 + def smove(source, destination, member); end + + # Remove and return one or more random member from a set. + # + # @param key [String] + # @param count [Integer] + # @return [String] + # + # source://redis//lib/redis/commands/sets.rb#59 + def spop(key, count = T.unsafe(nil)); end + + # Get one or more random members from a set. + # + # @param key [String] + # @param count [Integer] + # @return [String] + # + # source://redis//lib/redis/commands/sets.rb#72 + def srandmember(key, count = T.unsafe(nil)); end + + # Remove one or more members from a set. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Integer] The number of members that were successfully removed + # + # source://redis//lib/redis/commands/sets.rb#39 + def srem(key, *members); end + + # Remove one or more members from a set. + # + # @param key [String] + # @param member [String, Array] one member, or array of members + # @return [Boolean] Wether at least one member was successfully removed. + # + # source://redis//lib/redis/commands/sets.rb#49 + def srem?(key, *members); end + + # Scan a set + # + # See the [Redis Server SSCAN documentation](https://redis.io/docs/latest/commands/sscan/) for further details + # + # @example Retrieve the first batch of keys in a set + # redis.sscan("set", 0) + # @param cursor [String, Integer] the cursor of the iteration + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [String, Array] the next cursor and all found members + # + # source://redis//lib/redis/commands/sets.rb#189 + def sscan(key, cursor, **options); end + + # Scan a set + # + # See the [Redis Server SSCAN documentation](https://redis.io/docs/latest/commands/sscan/) for further details + # + # @example Retrieve all of the keys in a set + # redis.sscan_each("set").to_a + # # => ["key1", "key2", "key3"] + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [Enumerator] an enumerator for all keys in the set + # + # source://redis//lib/redis/commands/sets.rb#206 + def sscan_each(key, **options, &block); end + + # Add multiple sets. + # + # @param keys [String, Array] keys pointing to sets to unify + # @return [Array] members in the union + # + # source://redis//lib/redis/commands/sets.rb#161 + def sunion(*keys); end + + # Add multiple sets and store the resulting set in a key. + # + # @param destination [String] destination key + # @param keys [String, Array] keys pointing to sets to unify + # @return [Integer] number of elements in the resulting set + # + # source://redis//lib/redis/commands/sets.rb#171 + def sunionstore(destination, *keys); end +end + +# source://redis//lib/redis/commands/sorted_sets.rb#5 +module Redis::Commands::SortedSets + # Removes and returns up to count members with scores in the sorted set stored at key. + # + # @example Popping a member + # redis.bzmpop('zset') + # #=> ['zset', ['a', 1.0]] + # @example With count option + # redis.bzmpop('zset', count: 2) + # #=> ['zset', [['a', 1.0], ['b', 2.0]] + # @raise [ArgumentError] + # @return [Array>] list of popped elements and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#188 + def bzmpop(timeout, *keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + + # Removes and returns up to count members with the highest scores in the sorted set stored at keys, + # or block until one is available. + # + # @example Popping a member from a sorted set + # redis.bzpopmax('zset', 1) + # #=> ['zset', 'b', 2.0] + # @example Popping a member from multiple sorted sets + # redis.bzpopmax('zset1', 'zset2', 1) + # #=> ['zset1', 'b', 2.0] + # @return [Array] a touple of key, member and score + # @return [nil] when no element could be popped and the timeout expired + # + # source://redis//lib/redis/commands/sorted_sets.rb#251 + def bzpopmax(*args); end + + # Removes and returns up to count members with the lowest scores in the sorted set stored at keys, + # or block until one is available. + # + # @example Popping a member from a sorted set + # redis.bzpopmin('zset', 1) + # #=> ['zset', 'a', 1.0] + # @example Popping a member from multiple sorted sets + # redis.bzpopmin('zset1', 'zset2', 1) + # #=> ['zset1', 'a', 1.0] + # @return [Array] a touple of key, member and score + # @return [nil] when no element could be popped and the timeout expired + # + # source://redis//lib/redis/commands/sorted_sets.rb#272 + def bzpopmin(*args); end + + # Add one or more members to a sorted set, or update the score for members + # that already exist. + # + # @example Add a single `[score, member]` pair to a sorted set + # redis.zadd("zset", 32.0, "member") + # @example Add an array of `[score, member]` pairs to a sorted set + # redis.zadd("zset", [[32.0, "a"], [64.0, "b"]]) + # @param key [String] + # @param args [[Float, String], Array<[Float, String]>] - a single `[score, member]` pair + # - an array of `[score, member]` pairs + # @param options [Hash] - `:xx => true`: Only update elements that already exist (never + # add elements) + # - `:nx => true`: Don't update already existing elements (always + # add new elements) + # - `:lt => true`: Only update existing elements if the new score + # is less than the current score + # - `:gt => true`: Only update existing elements if the new score + # is greater than the current score + # - `:ch => true`: Modify the return value from the number of new + # elements added, to the total number of elements changed (CH is an + # abbreviation of changed); changed elements are new elements added + # and elements already existing for which the score was updated + # - `:incr => true`: When this option is specified ZADD acts like + # ZINCRBY; only one score-element pair can be specified in this mode + # @return [Boolean, Integer, Float] - `Boolean` when a single pair is specified, holding whether or not it was + # **added** to the sorted set. + # - `Integer` when an array of pairs is specified, holding the number of + # pairs that were **added** to the sorted set. + # - `Float` when option :incr is specified, holding the score of the member + # after incrementing it. + # + # source://redis//lib/redis/commands/sorted_sets.rb#53 + def zadd(key, *args, nx: T.unsafe(nil), xx: T.unsafe(nil), lt: T.unsafe(nil), gt: T.unsafe(nil), ch: T.unsafe(nil), incr: T.unsafe(nil)); end + + # Get the number of members in a sorted set. + # + # @example + # redis.zcard("zset") + # # => 4 + # @param key [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/sorted_sets.rb#14 + def zcard(key); end + + # Count the members in a sorted set with scores within the given values. + # + # @example Count members with score `>= 5` and `< 100` + # redis.zcount("zset", "5", "(100") + # # => 2 + # @example Count members with scores `> 5` + # redis.zcount("zset", "(5", "+inf") + # # => 2 + # @param key [String] + # @param min [String] - inclusive minimum score is specified verbatim + # - exclusive minimum score is specified by prefixing `(` + # @param max [String] - inclusive maximum score is specified verbatim + # - exclusive maximum score is specified by prefixing `(` + # @return [Integer] number of members in within the specified range + # + # source://redis//lib/redis/commands/sorted_sets.rb#678 + def zcount(key, min, max); end + + # Return the difference between the first and all successive input sorted sets + # + # @example + # redis.zadd("zsetA", [[1.0, "v1"], [2.0, "v2"]]) + # redis.zadd("zsetB", [[3.0, "v2"], [2.0, "v3"]]) + # redis.zdiff("zsetA", "zsetB") + # => ["v1"] + # @example With scores + # redis.zadd("zsetA", [[1.0, "v1"], [2.0, "v2"]]) + # redis.zadd("zsetB", [[3.0, "v2"], [2.0, "v3"]]) + # redis.zdiff("zsetA", "zsetB", :with_scores => true) + # => [["v1", 1.0]] + # @param keys [String, Array] one or more keys to compute the difference + # @param options [Hash] - `:with_scores => true`: include scores in output + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#787 + def zdiff(*keys, with_scores: T.unsafe(nil)); end + + # Compute the difference between the first and all successive input sorted sets + # and store the resulting sorted set in a new key + # + # @example + # redis.zadd("zsetA", [[1.0, "v1"], [2.0, "v2"]]) + # redis.zadd("zsetB", [[3.0, "v2"], [2.0, "v3"]]) + # redis.zdiffstore("zsetA", "zsetB") + # # => 1 + # @param destination [String] destination key + # @param keys [Array] source keys + # @return [Integer] number of elements in the resulting sorted set + # + # source://redis//lib/redis/commands/sorted_sets.rb#803 + def zdiffstore(*args, **_arg1); end + + # Increment the score of a member in a sorted set. + # + # @example + # redis.zincrby("zset", 32.0, "a") + # # => 64.0 + # @param key [String] + # @param increment [Float] + # @param member [String] + # @return [Float] score of the member after incrementing it + # + # source://redis//lib/redis/commands/sorted_sets.rb#86 + def zincrby(key, increment, member); end + + # Return the intersection of multiple sorted sets + # + # @example Retrieve the intersection of `2*zsetA` and `1*zsetB` + # redis.zinter("zsetA", "zsetB", :weights => [2.0, 1.0]) + # # => ["v1", "v2"] + # @example Retrieve the intersection of `2*zsetA` and `1*zsetB`, and their scores + # redis.zinter("zsetA", "zsetB", :weights => [2.0, 1.0], :with_scores => true) + # # => [["v1", 3.0], ["v2", 6.0]] + # @param keys [String, Array] one or more keys to intersect + # @param options [Hash] - `:weights => [Float, Float, ...]`: weights to associate with source + # sorted sets + # - `:aggregate => String`: aggregate function to use (sum, min, max, ...) + # - `:with_scores => true`: include scores in output + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#701 + def zinter(*args, **_arg1); end + + # Intersect multiple sorted sets and store the resulting sorted set in a new + # key. + # + # @example Compute the intersection of `2*zsetA` with `1*zsetB`, summing their scores + # redis.zinterstore("zsetC", ["zsetA", "zsetB"], :weights => [2.0, 1.0], :aggregate => "sum") + # # => 4 + # @param destination [String] destination key + # @param keys [Array] source keys + # @param options [Hash] - `:weights => [Array]`: weights to associate with source + # sorted sets + # - `:aggregate => String`: aggregate function to use (sum, min, max) + # @return [Integer] number of elements in the resulting sorted set + # + # source://redis//lib/redis/commands/sorted_sets.rb#720 + def zinterstore(*args, **_arg1); end + + # Count the members, with the same score in a sorted set, within the given lexicographical range. + # + # @example Count members matching a + # redis.zlexcount("zset", "[a", "[a\xff") + # # => 1 + # @example Count members matching a-z + # redis.zlexcount("zset", "[a", "[z\xff") + # # => 26 + # @param key [String] + # @param min [String] - inclusive minimum is specified by prefixing `(` + # - exclusive minimum is specified by prefixing `[` + # @param max [String] - inclusive maximum is specified by prefixing `(` + # - exclusive maximum is specified by prefixing `[` + # @return [Integer] number of members within the specified lexicographical range + # + # source://redis//lib/redis/commands/sorted_sets.rb#509 + def zlexcount(key, min, max); end + + # Removes and returns up to count members with scores in the sorted set stored at key. + # + # @example Popping a member + # redis.zmpop('zset') + # #=> ['zset', ['a', 1.0]] + # @example With count option + # redis.zmpop('zset', count: 2) + # #=> ['zset', [['a', 1.0], ['b', 2.0]] + # @raise [ArgumentError] + # @return [Array>] list of popped elements and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#220 + def zmpop(*keys, modifier: T.unsafe(nil), count: T.unsafe(nil)); end + + # Get the scores associated with the given members in a sorted set. + # + # @example Get the scores for members "a" and "b" + # redis.zmscore("zset", "a", "b") + # # => [32.0, 48.0] + # @param key [String] + # @param members [String, Array] + # @return [Array] scores of the members + # + # source://redis//lib/redis/commands/sorted_sets.rb#300 + def zmscore(key, *members); end + + # Removes and returns up to count members with the highest scores in the sorted set stored at key. + # + # @example Popping a member + # redis.zpopmax('zset') + # #=> ['b', 2.0] + # @example With count option + # redis.zpopmax('zset', 2) + # #=> [['b', 2.0], ['a', 1.0]] + # @return [Array] element and score pair if count is not specified + # @return [Array>] list of popped elements and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#138 + def zpopmax(key, count = T.unsafe(nil)); end + + # Removes and returns up to count members with the lowest scores in the sorted set stored at key. + # + # @example Popping a member + # redis.zpopmin('zset') + # #=> ['a', 1.0] + # @example With count option + # redis.zpopmin('zset', 2) + # #=> [['a', 1.0], ['b', 2.0]] + # @return [Array] element and score pair if count is not specified + # @return [Array>] list of popped elements and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#161 + def zpopmin(key, count = T.unsafe(nil)); end + + # Get one or more random members from a sorted set. + # + # @example Get one random member + # redis.zrandmember("zset") + # # => "a" + # @example Get multiple random members + # redis.zrandmember("zset", 2) + # # => ["a", "b"] + # @example Get multiple random members with scores + # redis.zrandmember("zset", 2, with_scores: true) + # # => [["a", 2.0], ["b", 3.0]] + # @param key [String] + # @param count [Integer] + # @param options [Hash] - `:with_scores => true`: include scores in output + # @return [nil, String, Array, Array<[String, Float]>] - when `key` does not exist or set is empty, `nil` + # - when `count` is not specified, a member + # - when `count` is specified and `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#328 + def zrandmember(key, count = T.unsafe(nil), withscores: T.unsafe(nil), with_scores: T.unsafe(nil)); end + + # Return a range of members in a sorted set, by index, score or lexicographical ordering. + # + # @example Retrieve all members from a sorted set, by index + # redis.zrange("zset", 0, -1) + # # => ["a", "b"] + # @example Retrieve all members and their scores from a sorted set + # redis.zrange("zset", 0, -1, :with_scores => true) + # # => [["a", 32.0], ["b", 64.0]] + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @param options [Hash] - `:by_score => false`: return members by score + # - `:by_lex => false`: return members by lexicographical ordering + # - `:rev => false`: reverse the ordering, from highest to lowest + # - `:limit => [offset, count]`: skip `offset` members, return a maximum of + # `count` members + # - `:with_scores => true`: include scores in output + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#367 + def zrange(key, start, stop, byscore: T.unsafe(nil), by_score: T.unsafe(nil), bylex: T.unsafe(nil), by_lex: T.unsafe(nil), rev: T.unsafe(nil), limit: T.unsafe(nil), withscores: T.unsafe(nil), with_scores: T.unsafe(nil)); end + + # Return a range of members with the same score in a sorted set, by lexicographical ordering + # + # @example Retrieve members matching a + # redis.zrangebylex("zset", "[a", "[a\xff") + # # => ["aaren", "aarika", "abagael", "abby"] + # @example Retrieve the first 2 members matching a + # redis.zrangebylex("zset", "[a", "[a\xff", :limit => [0, 2]) + # # => ["aaren", "aarika"] + # @param key [String] + # @param min [String] - inclusive minimum is specified by prefixing `(` + # - exclusive minimum is specified by prefixing `[` + # @param max [String] - inclusive maximum is specified by prefixing `(` + # - exclusive maximum is specified by prefixing `[` + # @param options [Hash] - `:limit => [offset, count]`: skip `offset` members, return a maximum of + # `count` members + # @return [Array, Array<[String, Float]>] + # + # source://redis//lib/redis/commands/sorted_sets.rb#534 + def zrangebylex(key, min, max, limit: T.unsafe(nil)); end + + # Return a range of members in a sorted set, by score. + # + # @example Retrieve members with score `>= 5` and `< 100` + # redis.zrangebyscore("zset", "5", "(100") + # # => ["a", "b"] + # @example Retrieve members and their scores with scores `> 5` + # redis.zrangebyscore("zset", "(5", "+inf", :with_scores => true) + # # => [["a", 32.0], ["b", 64.0]] + # @example Retrieve the first 2 members with score `>= 0` + # redis.zrangebyscore("zset", "0", "+inf", :limit => [0, 2]) + # # => ["a", "b"] + # @param options [Hash] - `:with_scores => true`: include scores in output + # - `:limit => [offset, count]`: skip `offset` members, return a maximum of + # `count` members + # @param min [String] - inclusive minimum score is specified verbatim + # - exclusive minimum score is specified by prefixing `(` + # @param key [String] + # @param max [String] - inclusive maximum score is specified verbatim + # - exclusive maximum score is specified by prefixing `(` + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#594 + def zrangebyscore(key, min, max, withscores: T.unsafe(nil), with_scores: T.unsafe(nil), limit: T.unsafe(nil)); end + + # Select a range of members in a sorted set, by index, score or lexicographical ordering + # and store the resulting sorted set in a new key. + # + # @example + # redis.zadd("foo", [[1.0, "s1"], [2.0, "s2"], [3.0, "s3"]]) + # redis.zrangestore("bar", "foo", 0, 1) + # # => 2 + # redis.zrange("bar", 0, -1) + # # => ["s1", "s2"] + # @return [Integer] the number of elements in the resulting sorted set + # @see #zrange + # + # source://redis//lib/redis/commands/sorted_sets.rb#409 + def zrangestore(dest_key, src_key, start, stop, byscore: T.unsafe(nil), by_score: T.unsafe(nil), bylex: T.unsafe(nil), by_lex: T.unsafe(nil), rev: T.unsafe(nil), limit: T.unsafe(nil)); end + + # Determine the index of a member in a sorted set. + # + # @param key [String] + # @param member [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/sorted_sets.rb#460 + def zrank(key, member); end + + # Remove one or more members from a sorted set. + # + # @example Remove a single member from a sorted set + # redis.zrem("zset", "a") + # @example Remove an array of members from a sorted set + # redis.zrem("zset", ["a", "b"]) + # @param key [String] + # @param member [String, Array] - a single member + # - an array of members + # @return [Boolean, Integer] - `Boolean` when a single member is specified, holding whether or not it + # was removed from the sorted set + # - `Integer` when an array of pairs is specified, holding the number of + # members that were removed to the sorted set + # + # source://redis//lib/redis/commands/sorted_sets.rb#107 + def zrem(key, member); end + + # Remove all members in a sorted set within the given indexes. + # + # @example Remove first 5 members + # redis.zremrangebyrank("zset", 0, 4) + # # => 5 + # @example Remove last 5 members + # redis.zremrangebyrank("zset", -5, -1) + # # => 5 + # @param key [String] + # @param start [Integer] start index + # @param stop [Integer] stop index + # @return [Integer] number of members that were removed + # + # source://redis//lib/redis/commands/sorted_sets.rb#487 + def zremrangebyrank(key, start, stop); end + + # Remove all members in a sorted set within the given scores. + # + # @example Remove members with score `>= 5` and `< 100` + # redis.zremrangebyscore("zset", "5", "(100") + # # => 2 + # @example Remove members with scores `> 5` + # redis.zremrangebyscore("zset", "(5", "+inf") + # # => 2 + # @param key [String] + # @param min [String] - inclusive minimum score is specified verbatim + # - exclusive minimum score is specified by prefixing `(` + # @param max [String] - inclusive maximum score is specified verbatim + # - exclusive maximum score is specified by prefixing `(` + # @return [Integer] number of members that were removed + # + # source://redis//lib/redis/commands/sorted_sets.rb#657 + def zremrangebyscore(key, min, max); end + + # Return a range of members in a sorted set, by index, with scores ordered + # from high to low. + # + # @example Retrieve all members from a sorted set + # redis.zrevrange("zset", 0, -1) + # # => ["b", "a"] + # @example Retrieve all members and their scores from a sorted set + # redis.zrevrange("zset", 0, -1, :with_scores => true) + # # => [["b", 64.0], ["a", 32.0]] + # @see #zrange + # + # source://redis//lib/redis/commands/sorted_sets.rb#444 + def zrevrange(key, start, stop, withscores: T.unsafe(nil), with_scores: T.unsafe(nil)); end + + # Return a range of members with the same score in a sorted set, by reversed lexicographical ordering. + # Apart from the reversed ordering, #zrevrangebylex is similar to #zrangebylex. + # + # @example Retrieve members matching a + # redis.zrevrangebylex("zset", "[a", "[a\xff") + # # => ["abbygail", "abby", "abagael", "aaren"] + # @example Retrieve the last 2 members matching a + # redis.zrevrangebylex("zset", "[a", "[a\xff", :limit => [0, 2]) + # # => ["abbygail", "abby"] + # @see #zrangebylex + # + # source://redis//lib/redis/commands/sorted_sets.rb#556 + def zrevrangebylex(key, max, min, limit: T.unsafe(nil)); end + + # Return a range of members in a sorted set, by score, with scores ordered + # from high to low. + # + # @example Retrieve members with score `< 100` and `>= 5` + # redis.zrevrangebyscore("zset", "(100", "5") + # # => ["b", "a"] + # @example Retrieve the first 2 members with score `<= 0` + # redis.zrevrangebyscore("zset", "0", "-inf", :limit => [0, 2]) + # # => ["b", "a"] + # @example Retrieve members and their scores with scores `> 5` + # redis.zrevrangebyscore("zset", "+inf", "(5", :with_scores => true) + # # => [["b", 64.0], ["a", 32.0]] + # @see #zrangebyscore + # + # source://redis//lib/redis/commands/sorted_sets.rb#624 + def zrevrangebyscore(key, max, min, withscores: T.unsafe(nil), with_scores: T.unsafe(nil), limit: T.unsafe(nil)); end + + # Determine the index of a member in a sorted set, with scores ordered from + # high to low. + # + # @param key [String] + # @param member [String] + # @return [Integer] + # + # source://redis//lib/redis/commands/sorted_sets.rb#470 + def zrevrank(key, member); end + + # Scan a sorted set + # + # See the [Redis Server ZSCAN documentation](https://redis.io/docs/latest/commands/zscan/) for further details + # + # @example Retrieve the first batch of key/value pairs in a hash + # redis.zscan("zset", 0) + # @param cursor [String, Integer] the cursor of the iteration + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [String, Array<[String, Float]>] the next cursor and all found + # members and scores + # + # source://redis//lib/redis/commands/sorted_sets.rb#822 + def zscan(key, cursor, **options); end + + # Scan a sorted set + # + # See the [Redis Server ZSCAN documentation](https://redis.io/docs/latest/commands/zscan/) for further details + # + # @example Retrieve all of the members/scores in a sorted set + # redis.zscan_each("zset").to_a + # # => [["key70", "70"], ["key80", "80"]] + # @param options [Hash] - `:match => String`: only return keys matching the pattern + # - `:count => Integer`: return count keys at most per iteration + # @return [Enumerator] an enumerator for all found scores and members + # + # source://redis//lib/redis/commands/sorted_sets.rb#841 + def zscan_each(key, **options, &block); end + + # Get the score associated with the given member in a sorted set. + # + # @example Get the score for member "a" + # redis.zscore("zset", "a") + # # => 32.0 + # @param key [String] + # @param member [String] + # @return [Float] score of the member + # + # source://redis//lib/redis/commands/sorted_sets.rb#287 + def zscore(key, member); end + + # Return the union of multiple sorted sets + # + # @example Retrieve the union of `2*zsetA` and `1*zsetB` + # redis.zunion("zsetA", "zsetB", :weights => [2.0, 1.0]) + # # => ["v1", "v2"] + # @example Retrieve the union of `2*zsetA` and `1*zsetB`, and their scores + # redis.zunion("zsetA", "zsetB", :weights => [2.0, 1.0], :with_scores => true) + # # => [["v1", 3.0], ["v2", 6.0]] + # @param keys [String, Array] one or more keys to union + # @param options [Hash] - `:weights => [Array]`: weights to associate with source + # sorted sets + # - `:aggregate => String`: aggregate function to use (sum, min, max) + # - `:with_scores => true`: include scores in output + # @return [Array, Array<[String, Float]>] - when `:with_scores` is not specified, an array of members + # - when `:with_scores` is specified, an array with `[member, score]` pairs + # + # source://redis//lib/redis/commands/sorted_sets.rb#744 + def zunion(*args, **_arg1); end + + # Add multiple sorted sets and store the resulting sorted set in a new key. + # + # @example Compute the union of `2*zsetA` with `1*zsetB`, summing their scores + # redis.zunionstore("zsetC", ["zsetA", "zsetB"], :weights => [2.0, 1.0], :aggregate => "sum") + # # => 8 + # @param destination [String] destination key + # @param keys [Array] source keys + # @param options [Hash] - `:weights => [Float, Float, ...]`: weights to associate with source + # sorted sets + # - `:aggregate => String`: aggregate function to use (sum, min, max, ...) + # @return [Integer] number of elements in the resulting sorted set + # + # source://redis//lib/redis/commands/sorted_sets.rb#762 + def zunionstore(*args, **_arg1); end + + private + + # source://redis//lib/redis/commands/sorted_sets.rb#854 + def _zsets_operation(cmd, *keys, weights: T.unsafe(nil), aggregate: T.unsafe(nil), with_scores: T.unsafe(nil)); end + + # source://redis//lib/redis/commands/sorted_sets.rb#873 + def _zsets_operation_store(cmd, destination, keys, weights: T.unsafe(nil), aggregate: T.unsafe(nil)); end +end + +# source://redis//lib/redis/commands/streams.rb#5 +module Redis::Commands::Streams + # Removes one or multiple entries from the pending entries list of a stream consumer group. + # + # @example With a entry id + # redis.xack('mystream', 'mygroup', '1526569495631-0') + # @example With splatted entry ids + # redis.xack('mystream', 'mygroup', '0-1', '0-2') + # @example With arrayed entry ids + # redis.xack('mystream', 'mygroup', %w[0-1 0-2]) + # @param key [String] the stream key + # @param group [String] the consumer group name + # @param ids [Array] one or multiple entry ids + # @return [Integer] the number of entries successfully acknowledged + # + # source://redis//lib/redis/commands/streams.rb#266 + def xack(key, group, *ids); end + + # Add new entry to the stream. + # + # @example With options + # redis.xadd('mystream', { f1: 'v1', f2: 'v2' }, id: '0-0', maxlen: 1000, approximate: true, nomkstream: true) + # @example Without options + # redis.xadd('mystream', f1: 'v1', f2: 'v2') + # @option opts + # @option opts + # @option opts + # @option opts + # @param key [String] the stream key + # @param entry [Hash] one or multiple field-value pairs + # @param opts [Hash] several options for `XADD` command + # @return [String] the entry id + # + # source://redis//lib/redis/commands/streams.rb#49 + def xadd(key, entry, approximate: T.unsafe(nil), maxlen: T.unsafe(nil), nomkstream: T.unsafe(nil), id: T.unsafe(nil)); end + + # Transfers ownership of pending stream entries that match the specified criteria. + # + # @example Claim next pending message after this id stuck > 5 minutes and mark as retry + # redis.xautoclaim('mystream', 'mygroup', 'consumer1', 3600000, '1641321233-0') + # @example Claim 50 next pending messages stuck > 5 minutes and mark as retry + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, '0-0', count: 50) + # @example Claim next pending message stuck > 5 minutes and don't mark as retry + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, '0-0', justid: true) + # @example Claim next pending message stuck > 5 minutes and mark as retry + # redis.xautoclaim('mystream', 'mygroup', 'consumer1', 3600000, '0-0') + # @param start [String] entry id to start scanning from or 0-0 for everything + # @param count [Integer] number of messages to claim (default 1) + # @param justid [Boolean] whether to fetch just an array of entry ids or not. + # Does not increment retry count when true + # @param consumer [String] the consumer name + # @param key [String] the stream key + # @param group [String] the consumer group name + # @param min_idle_time [Integer] the number of milliseconds + # @return [Hash{String => Hash}] the entries successfully claimed + # @return [Array] the entry ids successfully claimed if justid option is `true` + # + # source://redis//lib/redis/commands/streams.rb#336 + def xautoclaim(key, group, consumer, min_idle_time, start, count: T.unsafe(nil), justid: T.unsafe(nil)); end + + # Changes the ownership of a pending entry + # + # @example With arrayed entry ids + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2]) + # @example With idle option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], idle: 1000) + # @example With time option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], time: 1542866959000) + # @example With splatted entry ids + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, '0-1', '0-2') + # @example With retrycount option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], retrycount: 10) + # @example With force option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], force: true) + # @example With justid option + # redis.xclaim('mystream', 'mygroup', 'consumer1', 3600000, %w[0-1 0-2], justid: true) + # @option opts + # @option opts + # @option opts + # @option opts + # @option opts + # @param key [String] the stream key + # @param group [String] the consumer group name + # @param consumer [String] the consumer name + # @param min_idle_time [Integer] the number of milliseconds + # @param ids [Array] one or multiple entry ids + # @param opts [Hash] several options for `XCLAIM` command + # @return [Hash{String => Hash}] the entries successfully claimed + # @return [Array] the entry ids successfully claimed if justid option is `true` + # + # source://redis//lib/redis/commands/streams.rb#303 + def xclaim(key, group, consumer, min_idle_time, *ids, **opts); end + + # Delete entries by entry ids. + # + # @example With splatted entry ids + # redis.xdel('mystream', '0-1', '0-2') + # @example With arrayed entry ids + # redis.xdel('mystream', ['0-1', '0-2']) + # @param key [String] the stream key + # @param ids [Array] one or multiple entry ids + # @return [Integer] the number of entries actually deleted + # + # source://redis//lib/redis/commands/streams.rb#106 + def xdel(key, *ids); end + + # Manages the consumer group of the stream. + # + # @example With `create` subcommand + # redis.xgroup(:create, 'mystream', 'mygroup', '$') + # @example With `destroy` subcommand + # redis.xgroup(:destroy, 'mystream', 'mygroup') + # @example With `delconsumer` subcommand + # redis.xgroup(:delconsumer, 'mystream', 'mygroup', 'consumer1') + # @example With `setid` subcommand + # redis.xgroup(:setid, 'mystream', 'mygroup', '$') + # @param mkstream [Boolean] whether to create an empty stream automatically or not + # @param key [String] the stream key + # @param subcommand [String] `create` `setid` `destroy` `delconsumer` + # @param group [String] the consumer group name + # @param id_or_consumer [String] * the entry id or `$`, required if subcommand is `create` or `setid` + # * the consumer name, required if subcommand is `delconsumer` + # @return [String] `OK` if subcommand is `create` or `setid` + # @return [Integer] effected count if subcommand is `destroy` or `delconsumer` + # + # source://redis//lib/redis/commands/streams.rb#214 + def xgroup(subcommand, key, group, id_or_consumer = T.unsafe(nil), mkstream: T.unsafe(nil)); end + + # Returns the stream information each subcommand. + # + # @example groups + # redis.xinfo(:groups, 'mystream') + # @example stream + # redis.xinfo(:stream, 'mystream') + # @example consumers + # redis.xinfo(:consumers, 'mystream', 'mygroup') + # @param key [String] the stream key + # @param subcommand [String] e.g. `stream` `groups` `consumers` + # @param group [String] the consumer group name, required if subcommand is `consumers` + # @return [Hash] information of the stream if subcommand is `stream` + # @return [Array] information of the consumer groups if subcommand is `groups` + # @return [Array] information of the consumers if subcommand is `consumers` + # + # source://redis//lib/redis/commands/streams.rb#22 + def xinfo(subcommand, key, group = T.unsafe(nil)); end + + # Returns the number of entries inside a stream. + # + # @example With key + # redis.xlen('mystream') + # @param key [String] the stream key + # @return [Integer] the number of entries + # + # source://redis//lib/redis/commands/streams.rb#165 + def xlen(key); end + + # Fetches not acknowledging pending entries + # + # @example With key and group + # redis.xpending('mystream', 'mygroup') + # @example With range and consumer options + # redis.xpending('mystream', 'mygroup', '-', '+', 10, 'consumer1') + # @example With range options + # redis.xpending('mystream', 'mygroup', '-', '+', 10) + # @example With range and idle time options + # redis.xpending('mystream', 'mygroup', '-', '+', 10, idle: 9000) + # @option opts + # @param consumer [String] the consumer name + # @param opts [Hash] a customizable set of options + # @param start [String] start first entry id of range + # @param key [String] the stream key + # @param group [String] the consumer group name + # @param end [String] end last entry id of range + # @param count [Integer] count the number of entries as limit + # @return [Hash] the summary of pending entries + # @return [Array] the pending entries details if options were specified + # + # source://redis//lib/redis/commands/streams.rb#368 + def xpending(key, group, *args, idle: T.unsafe(nil)); end + + # Fetches entries of the stream in ascending order. + # + # @example Without options + # redis.xrange('mystream') + # @example With a specific start + # redis.xrange('mystream', '0-1') + # @example With a specific start and end + # redis.xrange('mystream', '0-1', '0-3') + # @example With count options + # redis.xrange('mystream', count: 10) + # @param key [String] the stream key + # @param start [String] first entry id of range, default value is `-` + # @param end [String] last entry id of range, default value is `+` + # @param count [Integer] the number of entries as limit + # @return [Array>] the ids and entries pairs + # + # source://redis//lib/redis/commands/streams.rb#128 + def xrange(key, start = T.unsafe(nil), range_end = T.unsafe(nil), count: T.unsafe(nil)); end + + # Fetches entries from one or multiple streams. Optionally blocking. + # + # @example With a key + # redis.xread('mystream', '0-0') + # @example With multiple keys + # redis.xread(%w[mystream1 mystream2], %w[0-0 0-0]) + # @example With count option + # redis.xread('mystream', '0-0', count: 2) + # @example With block option + # redis.xread('mystream', '$', block: 1000) + # @param keys [Array] one or multiple stream keys + # @param ids [Array] one or multiple entry ids + # @param count [Integer] the number of entries as limit per stream + # @param block [Integer] the number of milliseconds as blocking timeout + # @return [Hash{String => Hash{String => Hash}}] the entries + # + # source://redis//lib/redis/commands/streams.rb#186 + def xread(keys, ids, count: T.unsafe(nil), block: T.unsafe(nil)); end + + # Fetches a subset of the entries from one or multiple streams related with the consumer group. + # Optionally blocking. + # + # @example With multiple keys + # redis.xreadgroup('mygroup', 'consumer1', %w[mystream1 mystream2], %w[> >]) + # @example With count option + # redis.xreadgroup('mygroup', 'consumer1', 'mystream', '>', count: 2) + # @example With a key + # redis.xreadgroup('mygroup', 'consumer1', 'mystream', '>') + # @example With block option + # redis.xreadgroup('mygroup', 'consumer1', 'mystream', '>', block: 1000) + # @example With noack option + # redis.xreadgroup('mygroup', 'consumer1', 'mystream', '>', noack: true) + # @option opts + # @option opts + # @option opts + # @param group [String] the consumer group name + # @param consumer [String] the consumer name + # @param keys [Array] one or multiple stream keys + # @param ids [Array] one or multiple entry ids + # @param opts [Hash] several options for `XREADGROUP` command + # @return [Hash{String => Hash{String => Hash}}] the entries + # + # source://redis//lib/redis/commands/streams.rb#244 + def xreadgroup(group, consumer, keys, ids, count: T.unsafe(nil), block: T.unsafe(nil), noack: T.unsafe(nil)); end + + # Fetches entries of the stream in descending order. + # + # @example Without options + # redis.xrevrange('mystream') + # @example With a specific end + # redis.xrevrange('mystream', '0-3') + # @example With a specific end and start + # redis.xrevrange('mystream', '0-3', '0-1') + # @example With count options + # redis.xrevrange('mystream', count: 10) + # @param key [String] the stream key + # @param end [String] first entry id of range, default value is `+` + # @param start [String] last entry id of range, default value is `-` + # @return [Array>] the ids and entries pairs + # + # source://redis//lib/redis/commands/streams.rb#151 + def xrevrange(key, range_end = T.unsafe(nil), start = T.unsafe(nil), count: T.unsafe(nil)); end + + # Trims older entries of the stream if needed. + # + # @example Without options + # redis.xtrim('mystream', 1000) + # @example With options + # redis.xtrim('mystream', 1000, approximate: true) + # @example With strategy + # redis.xtrim('mystream', '1-0', strategy: 'MINID') + # @overload xtrim + # @overload xtrim + # @return [Integer] the number of entries actually deleted + # + # source://redis//lib/redis/commands/streams.rb#85 + def xtrim(key, len_or_id, strategy: T.unsafe(nil), approximate: T.unsafe(nil), limit: T.unsafe(nil)); end + + private + + # source://redis//lib/redis/commands/streams.rb#385 + def _xread(args, keys, ids, blocking_timeout_msec); end +end + +# source://redis//lib/redis/commands/strings.rb#5 +module Redis::Commands::Strings + # Append a value to a key. + # + # @param key [String] + # @param value [String] value to append + # @return [Integer] length of the string after appending + # + # source://redis//lib/redis/commands/strings.rb#255 + def append(key, value); end + + # Decrement the integer value of a key by one. + # + # @example + # redis.decr("value") + # # => 4 + # @param key [String] + # @return [Integer] value after decrementing it + # + # source://redis//lib/redis/commands/strings.rb#14 + def decr(key); end + + # Decrement the integer value of a key by the given number. + # + # @example + # redis.decrby("value", 5) + # # => 0 + # @param key [String] + # @param decrement [Integer] + # @return [Integer] value after decrementing it + # + # source://redis//lib/redis/commands/strings.rb#27 + def decrby(key, decrement); end + + # Get the value of a key. + # + # @param key [String] + # @return [String] + # + # source://redis//lib/redis/commands/strings.rb#190 + def get(key); end + + # Get the value of key and delete the key. This command is similar to GET, + # except for the fact that it also deletes the key on success. + # + # @param key [String] + # @return [String] the old value stored in the key, or `nil` if the key + # did not exist + # + # source://redis//lib/redis/commands/strings.rb#275 + def getdel(key); end + + # Get the value of key and optionally set its expiration. GETEX is similar to + # GET, but is a write command with additional options. When no options are + # provided, GETEX behaves like GET. + # + # @param key [String] + # @param options [Hash] - `:ex => Integer`: Set the specified expire time, in seconds. + # - `:px => Integer`: Set the specified expire time, in milliseconds. + # - `:exat => true`: Set the specified Unix time at which the key will + # expire, in seconds. + # - `:pxat => true`: Set the specified Unix time at which the key will + # expire, in milliseconds. + # - `:persist => true`: Remove the time to live associated with the key. + # @return [String] The value of key, or nil when key does not exist. + # + # source://redis//lib/redis/commands/strings.rb#293 + def getex(key, ex: T.unsafe(nil), px: T.unsafe(nil), exat: T.unsafe(nil), pxat: T.unsafe(nil), persist: T.unsafe(nil)); end + + # Get a substring of the string stored at a key. + # + # @param key [String] + # @param start [Integer] zero-based start offset + # @param stop [Integer] zero-based end offset. Use -1 for representing + # the end of the string + # @return [Integer] `0` or `1` + # + # source://redis//lib/redis/commands/strings.rb#246 + def getrange(key, start, stop); end + + # Set the string value of a key and return its old value. + # + # @param key [String] + # @param value [String] value to replace the current value with + # @return [String] the old value stored in the key, or `nil` if the key + # did not exist + # + # source://redis//lib/redis/commands/strings.rb#265 + def getset(key, value); end + + # Increment the integer value of a key by one. + # + # @example + # redis.incr("value") + # # => 6 + # @param key [String] + # @return [Integer] value after incrementing it + # + # source://redis//lib/redis/commands/strings.rb#39 + def incr(key); end + + # Increment the integer value of a key by the given integer number. + # + # @example + # redis.incrby("value", 5) + # # => 10 + # @param key [String] + # @param increment [Integer] + # @return [Integer] value after incrementing it + # + # source://redis//lib/redis/commands/strings.rb#52 + def incrby(key, increment); end + + # Increment the numeric value of a key by the given float number. + # + # @example + # redis.incrbyfloat("value", 1.23) + # # => 1.23 + # @param key [String] + # @param increment [Float] + # @return [Float] value after incrementing it + # + # source://redis//lib/redis/commands/strings.rb#65 + def incrbyfloat(key, increment); end + + # Get the values of all the given keys. + # + # @example + # redis.mapped_mget("key1", "key2") + # # => { "key1" => "v1", "key2" => "v2" } + # @param keys [Array] array of keys + # @return [Hash] a hash mapping the specified keys to their values + # @see #mget + # + # source://redis//lib/redis/commands/strings.rb#219 + def mapped_mget(*keys); end + + # Set one or more values. + # + # @example + # redis.mapped_mset({ "f1" => "v1", "f2" => "v2" }) + # # => "OK" + # @param hash [Hash] keys mapping to values + # @return [String] `"OK"` + # @see #mset + # + # source://redis//lib/redis/commands/strings.rb#154 + def mapped_mset(hash); end + + # Set one or more values, only if none of the keys exist. + # + # @example + # redis.mapped_msetnx({ "key1" => "v1", "key2" => "v2" }) + # # => true + # @param hash [Hash] keys mapping to values + # @return [Boolean] whether or not all values were set + # @see #msetnx + # + # source://redis//lib/redis/commands/strings.rb#182 + def mapped_msetnx(hash); end + + # Get the values of all the given keys. + # + # @example + # redis.mget("key1", "key2") + # # => ["v1", "v2"] + # @param keys [Array] + # @return [Array] an array of values for the specified keys + # @see #mapped_mget + # + # source://redis//lib/redis/commands/strings.rb#204 + def mget(*keys, &blk); end + + # Set one or more values. + # + # @example + # redis.mset("key1", "v1", "key2", "v2") + # # => "OK" + # @param args [Array] array of keys and values + # @return [String] `"OK"` + # @see #mapped_mset + # + # source://redis//lib/redis/commands/strings.rb#140 + def mset(*args); end + + # Set one or more values, only if none of the keys exist. + # + # @example + # redis.msetnx("key1", "v1", "key2", "v2") + # # => true + # @param args [Array] array of keys and values + # @return [Boolean] whether or not all values were set + # @see #mapped_msetnx + # + # source://redis//lib/redis/commands/strings.rb#168 + def msetnx(*args); end + + # Set the time to live in milliseconds of a key. + # + # @param key [String] + # @param ttl [Integer] + # @param value [String] + # @return [String] `"OK"` + # + # source://redis//lib/redis/commands/strings.rb#117 + def psetex(key, ttl, value); end + + # Set the string value of a key. + # + # @param key [String] + # @param value [String] + # @param options [Hash] - `:ex => Integer`: Set the specified expire time, in seconds. + # - `:px => Integer`: Set the specified expire time, in milliseconds. + # - `:exat => Integer` : Set the specified Unix time at which the key will expire, in seconds. + # - `:pxat => Integer` : Set the specified Unix time at which the key will expire, in milliseconds. + # - `:nx => true`: Only set the key if it does not already exist. + # - `:xx => true`: Only set the key if it already exist. + # - `:keepttl => true`: Retain the time to live associated with the key. + # - `:get => true`: Return the old string stored at key, or nil if key did not exist. + # @return [String, Boolean] `"OK"` or true, false if `:nx => true` or `:xx => true` + # + # source://redis//lib/redis/commands/strings.rb#83 + def set(key, value, ex: T.unsafe(nil), px: T.unsafe(nil), exat: T.unsafe(nil), pxat: T.unsafe(nil), nx: T.unsafe(nil), xx: T.unsafe(nil), keepttl: T.unsafe(nil), get: T.unsafe(nil)); end + + # Set the time to live in seconds of a key. + # + # @param key [String] + # @param ttl [Integer] + # @param value [String] + # @return [String] `"OK"` + # + # source://redis//lib/redis/commands/strings.rb#107 + def setex(key, ttl, value); end + + # Set the value of a key, only if the key does not exist. + # + # @param key [String] + # @param value [String] + # @return [Boolean] whether the key was set or not + # + # source://redis//lib/redis/commands/strings.rb#126 + def setnx(key, value); end + + # Overwrite part of a string at key starting at the specified offset. + # + # @param key [String] + # @param offset [Integer] byte offset + # @param value [String] + # @return [Integer] length of the string after it was modified + # + # source://redis//lib/redis/commands/strings.rb#235 + def setrange(key, offset, value); end + + # Get the length of the value stored in a key. + # + # @param key [String] + # @return [Integer] the length of the value stored in the key, or 0 + # if the key does not exist + # + # source://redis//lib/redis/commands/strings.rb#309 + def strlen(key); end +end + +# source://redis//lib/redis/commands/transactions.rb#5 +module Redis::Commands::Transactions + # Discard all commands issued after MULTI. + # + # @return [String] `"OK"` + # @see #multi + # @see #exec + # + # source://redis//lib/redis/commands/transactions.rb#110 + def discard; end + + # Execute all commands issued after MULTI. + # + # Only call this method when `#multi` was called **without** a block. + # + # @return [nil, Array<...>] - when commands were not executed, `nil` + # - when commands were executed, an array with their replies + # @see #multi + # @see #discard + # + # source://redis//lib/redis/commands/transactions.rb#100 + def exec; end + + # Mark the start of a transaction block. + # + # @example With a block + # redis.multi do |multi| + # multi.set("key", "value") + # multi.incr("counter") + # end # => ["OK", 6] + # @return [Array<...>] - an array with replies + # @see #watch + # @see #unwatch + # @yield [multi] the commands that are called inside this block are cached + # and written to the server upon returning from it + # @yieldparam multi [Redis] `self` + # + # source://redis//lib/redis/commands/transactions.rb#23 + def multi; end + + # Forget about all watched keys. + # + # @return [String] `OK` + # @see #watch + # @see #multi + # + # source://redis//lib/redis/commands/transactions.rb#86 + def unwatch; end + + # Watch the given keys to determine execution of the MULTI/EXEC block. + # + # Using a block is optional, but is necessary for thread-safety. + # + # An `#unwatch` is automatically issued if an exception is raised within the + # block that is a subclass of StandardError and is not a ConnectionError. + # + # @example With a block + # redis.watch("key") do + # if redis.get("key") == "some value" + # redis.multi do |multi| + # multi.set("key", "other value") + # multi.incr("counter") + # end + # else + # redis.unwatch + # end + # end + # # => ["OK", 6] + # @example Without a block + # redis.watch("key") + # # => "OK" + # @param keys [String, Array] one or more keys to watch + # @return [Object] if using a block, returns the return value of the block + # @return [String] if not using a block, returns `OK` + # @see #unwatch + # @see #multi + # + # source://redis//lib/redis/commands/transactions.rb#61 + def watch(*keys); end +end + +# soft-deprecated +# We added this back for older sidekiq releases +# +# source://redis//lib/redis.rb#27 +module Redis::Connection + class << self + # source://redis//lib/redis.rb#29 + def drivers; end + end +end + +# Raised when connection to a Redis server is lost. +# +# source://redis//lib/redis/errors.rb#41 +class Redis::ConnectionError < ::Redis::BaseConnectionError; end + +# source://redis//lib/redis.rb#9 +class Redis::Deprecated < ::StandardError; end + +# source://redis//lib/redis/pipeline.rb#80 +class Redis::Future < ::BasicObject + # @return [Future] a new instance of Future + # + # source://redis//lib/redis/pipeline.rb#83 + def initialize(command, coerce, exception); end + + # source://redis//lib/redis/pipeline.rb#94 + def _set(object); end + + # source://redis//lib/redis/pipeline.rb#108 + def class; end + + # source://redis//lib/redis/pipeline.rb#90 + def inspect; end + + # @return [Boolean] + # + # source://redis//lib/redis/pipeline.rb#104 + def is_a?(other); end + + # source://redis//lib/redis/pipeline.rb#99 + def value; end +end + +# source://redis//lib/redis/pipeline.rb#81 +Redis::Future::FutureNotReady = T.let(T.unsafe(nil), Redis::FutureNotReady) + +# source://redis//lib/redis/pipeline.rb#74 +class Redis::FutureNotReady < ::RuntimeError + # @return [FutureNotReady] a new instance of FutureNotReady + # + # source://redis//lib/redis/pipeline.rb#75 + def initialize; end +end + +# Raised when the connection was inherited by a child process. +# +# source://redis//lib/redis/errors.rb#49 +class Redis::InheritedError < ::Redis::BaseConnectionError; end + +# Raised when client options are invalid. +# +# source://redis//lib/redis/errors.rb#57 +class Redis::InvalidClientOptionError < ::Redis::BaseError; end + +# source://redis//lib/redis/pipeline.rb#59 +class Redis::MultiConnection < ::Redis::PipelinedConnection + # @raise [Redis::BaseError] + # + # source://redis//lib/redis/pipeline.rb#60 + def multi; end + + private + + # Blocking commands inside transaction behave like non-blocking. + # It shouldn't be done though. + # https://redis.io/commands/blpop/#blpop-inside-a-multi--exec-transaction + # + # source://redis//lib/redis/pipeline.rb#69 + def send_blocking_command(command, _timeout, &block); end +end + +# source://redis//lib/redis/pipeline.rb#113 +class Redis::MultiFuture < ::Redis::Future + # @return [MultiFuture] a new instance of MultiFuture + # + # source://redis//lib/redis/pipeline.rb#114 + def initialize(futures); end + + # source://redis//lib/redis/pipeline.rb#120 + def _set(replies); end +end + +# source://redis//lib/redis/errors.rb#29 +class Redis::OutOfMemoryError < ::Redis::CommandError; end + +# source://redis//lib/redis/errors.rb#23 +class Redis::PermissionError < ::Redis::CommandError; end + +# source://redis//lib/redis/pipeline.rb#6 +class Redis::PipelinedConnection + include ::Redis::Commands::Bitmaps + include ::Redis::Commands::Cluster + include ::Redis::Commands::Connection + include ::Redis::Commands::Geo + include ::Redis::Commands::Hashes + include ::Redis::Commands::HyperLogLog + include ::Redis::Commands::Keys + include ::Redis::Commands::Lists + include ::Redis::Commands::Pubsub + include ::Redis::Commands::Scripting + include ::Redis::Commands::Server + include ::Redis::Commands::Sets + include ::Redis::Commands::SortedSets + include ::Redis::Commands::Streams + include ::Redis::Commands::Strings + include ::Redis::Commands::Transactions + include ::Redis::Commands + + # @return [PipelinedConnection] a new instance of PipelinedConnection + # + # source://redis//lib/redis/pipeline.rb#9 + def initialize(pipeline, futures = T.unsafe(nil), exception: T.unsafe(nil)); end + + # Returns the value of attribute db. + # + # source://redis//lib/redis/pipeline.rb#7 + def db; end + + # Sets the attribute db + # + # @param value the value to set the attribute db to. + # + # source://redis//lib/redis/pipeline.rb#7 + def db=(_arg0); end + + # @yield [transaction] + # + # source://redis//lib/redis/pipeline.rb#21 + def multi; end + + # @yield [_self] + # @yieldparam _self [Redis::PipelinedConnection] the object that the method was called on + # + # source://redis//lib/redis/pipeline.rb#17 + def pipelined; end + + private + + # source://redis//lib/redis/pipeline.rb#49 + def send_blocking_command(command, timeout, &block); end + + # source://redis//lib/redis/pipeline.rb#40 + def send_command(command, &block); end + + # @yield [_self] + # @yieldparam _self [Redis::PipelinedConnection] the object that the method was called on + # + # source://redis//lib/redis/pipeline.rb#36 + def synchronize; end +end + +# Raised by the connection when a protocol error occurs. +# +# source://redis//lib/redis/errors.rb#9 +class Redis::ProtocolError < ::Redis::BaseError + # @return [ProtocolError] a new instance of ProtocolError + # + # source://redis//lib/redis/errors.rb#10 + def initialize(reply_type); end +end + +# Generally raised during Redis failover scenarios +# +# source://redis//lib/redis/errors.rb#53 +class Redis::ReadOnlyError < ::Redis::BaseConnectionError; end + +# source://redis//lib/redis.rb#37 +Redis::SERVER_URL_OPTIONS = T.let(T.unsafe(nil), Array) + +# source://redis//lib/redis/subscribe.rb#4 +class Redis::SubscribedClient + # @return [SubscribedClient] a new instance of SubscribedClient + # + # source://redis//lib/redis/subscribe.rb#5 + def initialize(client); end + + # source://redis//lib/redis/subscribe.rb#10 + def call_v(command); end + + # source://redis//lib/redis/subscribe.rb#52 + def close; end + + # source://redis//lib/redis/subscribe.rb#24 + def psubscribe(*channels, &block); end + + # source://redis//lib/redis/subscribe.rb#28 + def psubscribe_with_timeout(timeout, *channels, &block); end + + # source://redis//lib/redis/subscribe.rb#44 + def punsubscribe(*channels); end + + # source://redis//lib/redis/subscribe.rb#32 + def ssubscribe(*channels, &block); end + + # source://redis//lib/redis/subscribe.rb#36 + def ssubscribe_with_timeout(timeout, *channels, &block); end + + # source://redis//lib/redis/subscribe.rb#16 + def subscribe(*channels, &block); end + + # source://redis//lib/redis/subscribe.rb#20 + def subscribe_with_timeout(timeout, *channels, &block); end + + # source://redis//lib/redis/subscribe.rb#48 + def sunsubscribe(*channels); end + + # source://redis//lib/redis/subscribe.rb#40 + def unsubscribe(*channels); end + + protected + + # source://redis//lib/redis/subscribe.rb#58 + def subscription(start, stop, channels, block, timeout = T.unsafe(nil)); end +end + +# source://redis//lib/redis/subscribe.rb#82 +class Redis::Subscription + # @return [Subscription] a new instance of Subscription + # @yield [_self] + # @yieldparam _self [Redis::Subscription] the object that the method was called on + # + # source://redis//lib/redis/subscribe.rb#85 + def initialize; end + + # Returns the value of attribute callbacks. + # + # source://redis//lib/redis/subscribe.rb#83 + def callbacks; end + + # source://redis//lib/redis/subscribe.rb#98 + def message(&block); end + + # source://redis//lib/redis/subscribe.rb#110 + def pmessage(&block); end + + # source://redis//lib/redis/subscribe.rb#102 + def psubscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#106 + def punsubscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#122 + def smessage(&block); end + + # source://redis//lib/redis/subscribe.rb#114 + def ssubscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#90 + def subscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#118 + def sunsubscribe(&block); end + + # source://redis//lib/redis/subscribe.rb#94 + def unsubscribe(&block); end +end + +# source://redis//lib/redis/errors.rb#60 +class Redis::SubscriptionError < ::Redis::BaseError; end + +# Raised when performing I/O times out. +# +# source://redis//lib/redis/errors.rb#45 +class Redis::TimeoutError < ::Redis::BaseConnectionError; end + +# source://redis//lib/redis/version.rb#4 +Redis::VERSION = T.let(T.unsafe(nil), String) + +# source://redis//lib/redis/errors.rb#26 +class Redis::WrongTypeError < ::Redis::CommandError; end diff --git a/sorbet/rbi/gems/regexp_parser@2.9.2.rbi b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi new file mode 100644 index 0000000..35b1936 --- /dev/null +++ b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `regexp_parser` gem. +# Please instead update this file by running `bin/tapioca gem regexp_parser`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop-ast@1.36.1.rbi b/sorbet/rbi/gems/rubocop-ast@1.36.1.rbi new file mode 100644 index 0000000..1fa5113 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-ast@1.36.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-ast` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-ast`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop-espago@1.1.5.rbi b/sorbet/rbi/gems/rubocop-espago@1.1.5.rbi new file mode 100644 index 0000000..32f1e0b --- /dev/null +++ b/sorbet/rbi/gems/rubocop-espago@1.1.5.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-espago` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-espago`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rubocop@1.68.0.rbi b/sorbet/rbi/gems/rubocop@1.68.0.rbi new file mode 100644 index 0000000..753389f --- /dev/null +++ b/sorbet/rbi/gems/rubocop@1.68.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop` gem. +# Please instead update this file by running `bin/tapioca gem rubocop`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi new file mode 100644 index 0000000..c92481c --- /dev/null +++ b/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `ruby-progressbar` gem. +# Please instead update this file by running `bin/tapioca gem ruby-progressbar`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/spoom@1.5.0.rbi b/sorbet/rbi/gems/spoom@1.5.0.rbi new file mode 100644 index 0000000..57cf41d --- /dev/null +++ b/sorbet/rbi/gems/spoom@1.5.0.rbi @@ -0,0 +1,4932 @@ +# 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(::Gem::Version)) } + def gem_version_from_gemfile_lock(gem); end + + # source://spoom//lib/spoom/context/bundle.rb#51 + sig { returns(T::Hash[::String, ::Bundler::LazySpecification]) } + def gemfile_lock_specs; end + + # Read the contents of the Gemfile in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#15 + sig { returns(T.nilable(::String)) } + def read_gemfile; end + + # Read the contents of the Gemfile.lock in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#21 + sig { returns(T.nilable(::String)) } + def read_gemfile_lock; end + + # Set the `contents` of the Gemfile in this context directory + # + # source://spoom//lib/spoom/context/bundle.rb#27 + sig { params(contents: ::String, append: T::Boolean).void } + def write_gemfile!(contents, append: T.unsafe(nil)); end +end + +# Execution features for a context +# +# source://spoom//lib/spoom/context/exec.rb#27 +module Spoom::Context::Exec + requires_ancestor { Spoom::Context } + + # Run a command in this context directory + # + # source://spoom//lib/spoom/context/exec.rb#35 + sig { params(command: ::String, capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def exec(command, capture_err: T.unsafe(nil)); end +end + +# File System features for a context +# +# source://spoom//lib/spoom/context/file_system.rb#7 +module Spoom::Context::FileSystem + requires_ancestor { Spoom::Context } + + # Returns the absolute path to `relative_path` in the context's directory + # + # source://spoom//lib/spoom/context/file_system.rb#15 + sig { params(relative_path: ::String).returns(::String) } + def absolute_path_to(relative_path); end + + # source://spoom//lib/spoom/context/file_system.rb#53 + sig do + params( + allow_extensions: T::Array[::String], + allow_mime_types: T::Array[::String], + exclude_patterns: T::Array[::String] + ).returns(T::Array[::String]) + end + def collect_files(allow_extensions: T.unsafe(nil), allow_mime_types: T.unsafe(nil), exclude_patterns: T.unsafe(nil)); end + + # Delete this context and its content + # + # Warning: it will `rm -rf` the context directory on the file system. + # + # source://spoom//lib/spoom/context/file_system.rb#105 + sig { void } + def destroy!; end + + # Does the context directory at `absolute_path` exist and is a directory? + # + # source://spoom//lib/spoom/context/file_system.rb#21 + sig { returns(T::Boolean) } + def exist?; end + + # Does `relative_path` point to an existing file in this context directory? + # + # source://spoom//lib/spoom/context/file_system.rb#65 + sig { params(relative_path: ::String).returns(T::Boolean) } + def file?(relative_path); end + + # List all files in this context matching `pattern` + # + # source://spoom//lib/spoom/context/file_system.rb#34 + sig { params(pattern: ::String).returns(T::Array[::String]) } + def glob(pattern = T.unsafe(nil)); end + + # List all files at the top level of this context directory + # + # source://spoom//lib/spoom/context/file_system.rb#42 + sig { returns(T::Array[::String]) } + def list; end + + # Create the context directory at `absolute_path` + # + # source://spoom//lib/spoom/context/file_system.rb#27 + sig { void } + def mkdir!; end + + # Move the file or directory from `from_relative_path` to `to_relative_path` + # + # source://spoom//lib/spoom/context/file_system.rb#95 + sig { params(from_relative_path: ::String, to_relative_path: ::String).void } + def move!(from_relative_path, to_relative_path); end + + # Return the contents of the file at `relative_path` in this context directory + # + # Will raise if the file doesn't exist. + # + # source://spoom//lib/spoom/context/file_system.rb#73 + sig { params(relative_path: ::String).returns(::String) } + def read(relative_path); end + + # Remove the path at `relative_path` (recursive + force) in this context directory + # + # source://spoom//lib/spoom/context/file_system.rb#89 + sig { params(relative_path: ::String).void } + def remove!(relative_path); end + + # Write `contents` in the file at `relative_path` in this context directory + # + # Append to the file if `append` is true. + # + # source://spoom//lib/spoom/context/file_system.rb#81 + sig { params(relative_path: ::String, contents: ::String, append: T::Boolean).void } + def write!(relative_path, contents = T.unsafe(nil), append: T.unsafe(nil)); end +end + +# Git features for a context +# +# source://spoom//lib/spoom/context/git.rb#35 +module Spoom::Context::Git + requires_ancestor { Spoom::Context } + + # Run a command prefixed by `git` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#43 + sig { params(command: ::String).returns(::Spoom::ExecResult) } + def git(command); end + + # Run `git checkout` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#62 + sig { params(ref: ::String).returns(::Spoom::ExecResult) } + def git_checkout!(ref: T.unsafe(nil)); end + + # Run `git checkout -b ` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#68 + sig { params(branch_name: ::String, ref: T.nilable(::String)).returns(::Spoom::ExecResult) } + def git_checkout_new_branch!(branch_name, ref: T.unsafe(nil)); end + + # Run `git add . && git commit` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#78 + sig { params(message: ::String, time: ::Time, allow_empty: T::Boolean).returns(::Spoom::ExecResult) } + def git_commit!(message: T.unsafe(nil), time: T.unsafe(nil), allow_empty: T.unsafe(nil)); end + + # Get the current git branch in this context directory + # + # source://spoom//lib/spoom/context/git.rb#89 + sig { returns(T.nilable(::String)) } + def git_current_branch; end + + # Run `git diff` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#98 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_diff(*arg); end + + # Run `git init` in this context directory + # + # Warning: passing a branch will run `git init -b ` which is only available in git 2.28+. + # In older versions, use `git_init!` followed by `git("checkout -b ")`. + # + # source://spoom//lib/spoom/context/git.rb#52 + sig { params(branch: T.nilable(::String)).returns(::Spoom::ExecResult) } + def git_init!(branch: T.unsafe(nil)); end + + # Get the last commit in the currently checked out branch + # + # source://spoom//lib/spoom/context/git.rb#104 + sig { params(short_sha: T::Boolean).returns(T.nilable(::Spoom::Git::Commit)) } + def git_last_commit(short_sha: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/git.rb#115 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_log(*arg); end + + # Run `git push ` in this context directory + # + # source://spoom//lib/spoom/context/git.rb#121 + sig { params(remote: ::String, ref: ::String, force: T::Boolean).returns(::Spoom::ExecResult) } + def git_push!(remote, ref, force: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/git.rb#126 + sig { params(arg: ::String).returns(::Spoom::ExecResult) } + def git_show(*arg); end + + # Is there uncommitted changes in this context directory? + # + # source://spoom//lib/spoom/context/git.rb#132 + sig { params(path: ::String).returns(T::Boolean) } + def git_workdir_clean?(path: T.unsafe(nil)); end +end + +# Sorbet features for a context +# +# source://spoom//lib/spoom/context/sorbet.rb#7 +module Spoom::Context::Sorbet + requires_ancestor { Spoom::Context } + + # Does this context has a `sorbet/config` file? + # + # source://spoom//lib/spoom/context/sorbet.rb#119 + sig { returns(T::Boolean) } + def has_sorbet_config?; end + + # Read the strictness sigil from the file at `relative_path` (returns `nil` if no sigil) + # + # source://spoom//lib/spoom/context/sorbet.rb#142 + sig { params(relative_path: ::String).returns(T.nilable(::String)) } + def read_file_strictness(relative_path); end + + # Read the contents of `sorbet/config` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#130 + sig { returns(::String) } + def read_sorbet_config; end + + # source://spoom//lib/spoom/context/sorbet.rb#124 + sig { returns(::Spoom::Sorbet::Config) } + def sorbet_config; end + + # Get the commit introducing the `sorbet/config` file + # + # source://spoom//lib/spoom/context/sorbet.rb#148 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_intro_commit; end + + # Get the commit removing the `sorbet/config` file + # + # source://spoom//lib/spoom/context/sorbet.rb#160 + sig { returns(T.nilable(::Spoom::Git::Commit)) } + def sorbet_removal_commit; end + + # Run `bundle exec srb` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#15 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def srb(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # List all files typechecked by Sorbet from its `config` + # + # source://spoom//lib/spoom/context/sorbet.rb#65 + sig { params(with_config: T.nilable(::Spoom::Sorbet::Config), include_rbis: T::Boolean).returns(T::Array[::String]) } + def srb_files(with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end + + # List all files typechecked by Sorbet from its `config` that matches `strictness` + # + # source://spoom//lib/spoom/context/sorbet.rb#104 + sig do + params( + strictness: ::String, + with_config: T.nilable(::Spoom::Sorbet::Config), + include_rbis: T::Boolean + ).returns(T::Array[::String]) + end + def srb_files_with_strictness(strictness, with_config: T.unsafe(nil), include_rbis: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#45 + sig do + params( + arg: ::String, + sorbet_bin: T.nilable(::String), + capture_err: T::Boolean + ).returns(T.nilable(T::Hash[::String, ::Integer])) + end + def srb_metrics(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#33 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(::Spoom::ExecResult) } + def srb_tc(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # source://spoom//lib/spoom/context/sorbet.rb#110 + sig { params(arg: ::String, sorbet_bin: T.nilable(::String), capture_err: T::Boolean).returns(T.nilable(::String)) } + def srb_version(*arg, sorbet_bin: T.unsafe(nil), capture_err: T.unsafe(nil)); end + + # Set the `contents` of `sorbet/config` in this context directory + # + # source://spoom//lib/spoom/context/sorbet.rb#136 + sig { params(contents: ::String, append: T::Boolean).void } + def write_sorbet_config!(contents, append: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/snapshot.rb#5 +module Spoom::Coverage + class << self + # source://spoom//lib/spoom/coverage.rb#103 + sig { params(context: ::Spoom::Context).returns(::Spoom::FileTree) } + def file_tree(context); end + + # source://spoom//lib/spoom/coverage.rb#83 + sig do + params( + context: ::Spoom::Context, + snapshots: T::Array[::Spoom::Coverage::Snapshot], + palette: ::Spoom::Coverage::D3::ColorPalette + ).returns(::Spoom::Coverage::Report) + end + def report(context, snapshots, palette:); end + + # source://spoom//lib/spoom/coverage.rb#16 + sig do + params( + context: ::Spoom::Context, + rbi: T::Boolean, + sorbet_bin: T.nilable(::String) + ).returns(::Spoom::Coverage::Snapshot) + end + def snapshot(context, rbi: T.unsafe(nil), sorbet_bin: T.unsafe(nil)); end + end +end + +# source://spoom//lib/spoom/coverage/report.rb#88 +module Spoom::Coverage::Cards; end + +# source://spoom//lib/spoom/coverage/report.rb#89 +class Spoom::Coverage::Cards::Card < ::Spoom::Coverage::Template + # source://spoom//lib/spoom/coverage/report.rb#98 + sig { params(template: ::String, title: T.nilable(::String), body: T.nilable(::String)).void } + def initialize(template: T.unsafe(nil), title: T.unsafe(nil), body: T.unsafe(nil)); end + + # @return [String, nil] + # + # source://spoom//lib/spoom/coverage/report.rb#95 + def body; end + + # source://spoom//lib/spoom/coverage/report.rb#95 + sig { returns(T.nilable(::String)) } + def title; end +end + +# source://spoom//lib/spoom/coverage/report.rb#92 +Spoom::Coverage::Cards::Card::TEMPLATE = T.let(T.unsafe(nil), String) + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/report.rb#105 +class Spoom::Coverage::Cards::Erb < ::Spoom::Coverage::Cards::Card + abstract! + + # source://spoom//lib/spoom/coverage/report.rb#112 + sig { void } + def initialize; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/report.rb#120 + sig { abstract.returns(::String) } + def erb; end + + # source://spoom//lib/spoom/coverage/report.rb#115 + sig { override.returns(::String) } + def html; end +end + +# source://spoom//lib/spoom/coverage/report.rb#153 +class Spoom::Coverage::Cards::Map < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#164 + sig do + params( + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_strictness_scores: T::Hash[::Spoom::FileTree::Node, ::Float], + title: ::String + ).void + end + def initialize(file_tree:, nodes_strictnesses:, nodes_strictness_scores:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#123 +class Spoom::Coverage::Cards::Snapshot < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#132 + sig { params(snapshot: ::Spoom::Coverage::Snapshot, title: ::String).void } + def initialize(snapshot:, title: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#143 + sig { returns(::Spoom::Coverage::D3::Pie::Calls) } + def pie_calls; end + + # source://spoom//lib/spoom/coverage/report.rb#138 + sig { returns(::Spoom::Coverage::D3::Pie::Sigils) } + def pie_sigils; end + + # source://spoom//lib/spoom/coverage/report.rb#148 + sig { returns(::Spoom::Coverage::D3::Pie::Sigs) } + def pie_sigs; end + + # source://spoom//lib/spoom/coverage/report.rb#129 + sig { returns(::Spoom::Coverage::Snapshot) } + def snapshot; end +end + +# source://spoom//lib/spoom/coverage/report.rb#126 +Spoom::Coverage::Cards::Snapshot::TEMPLATE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/report.rb#240 +class Spoom::Coverage::Cards::SorbetIntro < ::Spoom::Coverage::Cards::Erb + # source://spoom//lib/spoom/coverage/report.rb#244 + sig { params(sorbet_intro_commit: T.nilable(::String), sorbet_intro_date: T.nilable(::Time)).void } + def initialize(sorbet_intro_commit: T.unsafe(nil), sorbet_intro_date: T.unsafe(nil)); end + + # source://spoom//lib/spoom/coverage/report.rb#250 + sig { override.returns(::String) } + def erb; end +end + +# source://spoom//lib/spoom/coverage/report.rb#177 +class Spoom::Coverage::Cards::Timeline < ::Spoom::Coverage::Cards::Card + # source://spoom//lib/spoom/coverage/report.rb#181 + sig { params(title: ::String, timeline: ::Spoom::Coverage::D3::Timeline).void } + def initialize(title:, timeline:); end +end + +# source://spoom//lib/spoom/coverage/report.rb#194 +class Spoom::Coverage::Cards::Timeline::Calls < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#198 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#212 +class Spoom::Coverage::Cards::Timeline::RBIs < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#216 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#230 +class Spoom::Coverage::Cards::Timeline::Runtimes < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#234 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#185 +class Spoom::Coverage::Cards::Timeline::Sigils < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#189 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#203 +class Spoom::Coverage::Cards::Timeline::Sigs < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#207 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/report.rb#221 +class Spoom::Coverage::Cards::Timeline::Versions < ::Spoom::Coverage::Cards::Timeline + # source://spoom//lib/spoom/coverage/report.rb#225 + sig { params(snapshots: T::Array[::Spoom::Coverage::Snapshot], title: ::String).void } + def initialize(snapshots:, title: T.unsafe(nil)); end +end + +# source://spoom//lib/spoom/coverage/d3/base.rb#6 +module Spoom::Coverage::D3 + class << self + # source://spoom//lib/spoom/coverage/d3.rb#61 + sig { params(palette: ::Spoom::Coverage::D3::ColorPalette).returns(::String) } + def header_script(palette); end + + # source://spoom//lib/spoom/coverage/d3.rb#21 + sig { returns(::String) } + def header_style; end + end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/coverage/d3/base.rb#7 +class Spoom::Coverage::D3::Base + abstract! + + # source://spoom//lib/spoom/coverage/d3/base.rb#17 + sig { params(id: ::String, data: T.untyped).void } + def initialize(id, data); end + + # source://spoom//lib/spoom/coverage/d3/base.rb#37 + sig { returns(::String) } + def html; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#14 + sig { returns(::String) } + def id; end + + # @abstract + # + # source://spoom//lib/spoom/coverage/d3/base.rb#50 + sig { abstract.returns(::String) } + def script; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#45 + sig { returns(::String) } + def tooltip; end + + class << self + # source://spoom//lib/spoom/coverage/d3/base.rb#31 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/base.rb#26 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3.rb#12 +Spoom::Coverage::D3::COLOR_FALSE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#11 +Spoom::Coverage::D3::COLOR_IGNORE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#14 +Spoom::Coverage::D3::COLOR_STRICT = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#15 +Spoom::Coverage::D3::COLOR_STRONG = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3.rb#13 +Spoom::Coverage::D3::COLOR_TRUE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/coverage/d3/circle_map.rb#9 +class Spoom::Coverage::D3::CircleMap < ::Spoom::Coverage::D3::Base + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#59 + sig { override.returns(::String) } + def script; end + + class << self + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#40 + sig { returns(::String) } + def header_script; end + + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#14 + sig { returns(::String) } + def header_style; end + end +end + +# source://spoom//lib/spoom/coverage/d3/circle_map.rb#148 +class Spoom::Coverage::D3::CircleMap::Sigils < ::Spoom::Coverage::D3::CircleMap + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#159 + sig do + params( + id: ::String, + file_tree: ::Spoom::FileTree, + nodes_strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], + nodes_scores: T::Hash[::Spoom::FileTree::Node, ::Float] + ).void + end + def initialize(id, file_tree, nodes_strictnesses, nodes_scores); end + + # source://spoom//lib/spoom/coverage/d3/circle_map.rb#166 + sig { params(node: ::Spoom::FileTree::Node).returns(T::Hash[::Symbol, T.untyped]) } + def tree_node_to_json(node); end +end + +# source://spoom//lib/spoom/coverage/d3.rb#103 +class Spoom::Coverage::D3::ColorPalette < ::T::Struct + prop :ignore, ::String + prop :false, ::String + prop :true, ::String + prop :strict, ::String + prop :strong, ::String + + class << self + # source://sorbet-runtime/0.5.11647/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.11647/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.11647/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#46 + 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] + # + # 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.11647/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.11647/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.11647/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.11647/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.11647/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.11647/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.11647/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.11647/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.11647/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.11647/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.11647/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.11647/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] + # + # 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] + # + # 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] + # + # 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] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def allowed_extensions; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def allowed_extensions=(_arg0); end + + # source://spoom//lib/spoom/sorbet/config.rb#46 + sig { returns(::Spoom::Sorbet::Config) } + def copy; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def ignore; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def ignore=(_arg0); end + + # source://spoom//lib/spoom/sorbet/config.rb#35 + sig { returns(T::Boolean) } + def no_stdlib; end + + # @return [Boolean] + # + # source://spoom//lib/spoom/sorbet/config.rb#35 + def no_stdlib=(_arg0); end + + # Returns self as a string of options that can be passed to Sorbet + # + # Example: + # ~~~rb + # config = Sorbet::Config.new + # config.paths << "/foo" + # config.paths << "/bar" + # config.ignore << "/baz" + # config.allowed_extensions << ".rb" + # + # puts config.options_string # "/foo /bar --ignore /baz --allowed-extension .rb" + # ~~~ + # + # source://spoom//lib/spoom/sorbet/config.rb#68 + sig { returns(::String) } + def options_string; end + + # source://spoom//lib/spoom/sorbet/config.rb#32 + sig { returns(T::Array[::String]) } + def paths; end + + # @return [Array] + # + # source://spoom//lib/spoom/sorbet/config.rb#32 + def paths=(_arg0); end + + class << self + # source://spoom//lib/spoom/sorbet/config.rb#81 + sig { params(sorbet_config_path: ::String).returns(::Spoom::Sorbet::Config) } + def parse_file(sorbet_config_path); end + + # source://spoom//lib/spoom/sorbet/config.rb#86 + sig { params(sorbet_config: ::String).returns(::Spoom::Sorbet::Config) } + def parse_string(sorbet_config); end + + private + + # source://spoom//lib/spoom/sorbet/config.rb#150 + sig { params(line: ::String).returns(::String) } + def parse_option(line); end + end +end + +# source://spoom//lib/spoom/sorbet/config.rb#29 +Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/sorbet.rb#14 +class Spoom::Sorbet::Error < ::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/sorbet/rbi/gems/tapioca@0.16.4.rbi b/sorbet/rbi/gems/tapioca@0.16.4.rbi new file mode 100644 index 0000000..35b6c79 --- /dev/null +++ b/sorbet/rbi/gems/tapioca@0.16.4.rbi @@ -0,0 +1,3597 @@ +# 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.1/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.1/lib/rbi/model.rb#128 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi/0.2.1/lib/rbi/rewriters/add_sig_templates.rb#66 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # source://rbi/0.2.1/lib/rbi/rewriters/annotate.rb#49 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # 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.1/lib/rbi/rewriters/deannotate.rb#41 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # source://rbi/0.2.1/lib/rbi/model.rb#134 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi/0.2.1/lib/rbi/rewriters/filter_versions.rb#118 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # source://rbi/0.2.1/lib/rbi/rewriters/flatten_singleton_methods.rb#60 + sig { void } + def flatten_singleton_methods!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/flatten_visibilities.rb#60 + sig { void } + def flatten_visibilities!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/group_nodes.rb#81 + sig { void } + def group_nodes!; end + + # source://rbi/0.2.1/lib/rbi/index.rb#68 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi/0.2.1/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.1/lib/rbi/rewriters/nest_non_public_members.rb#46 + sig { void } + def nest_non_public_members!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/nest_singleton_methods.rb#36 + sig { void } + def nest_singleton_methods!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/nest_top_level_members.rb#63 + sig { void } + def nest_top_level_members!; end + + # source://rbi/0.2.1/lib/rbi/model.rb#112 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi/0.2.1/lib/rbi/rewriters/attr_to_methods.rb#53 + sig { void } + def replace_attributes_with_methods!; end + + # source://rbi/0.2.1/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.11647/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.11647/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.11647/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#107 + 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#125 + sig { params(error: ::String).void } + def add_error(error); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#116 + 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#121 + 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#174 + 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#210 + 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#164 + 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#138 + 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#39 + sig { abstract.returns(T::Enumerable[::Module]) } + def gather_constants; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#34 + sig { params(constant: ::Module).returns(T::Boolean) } + def handles?(constant); end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#42 + sig { returns(T::Set[::Module]) } + def processable_constants; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#50 + sig { params(constants: T::Array[::Module]).void } + def requested_constants=(constants); end + + private + + # source://tapioca//lib/tapioca/dsl/compiler.rb#75 + sig { returns(T::Enumerable[T::Class[T.anything]]) } + def all_classes; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#87 + sig { returns(T::Enumerable[::Module]) } + def all_modules; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#61 + 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 + 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#224 + sig { void } + def abort_if_pending_migrations!; end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#169 + 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#198 + sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } + def rbi_for_constant(constant); end + + # source://tapioca//lib/tapioca/dsl/pipeline.rb#217 + 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.11647/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] + # + # 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] + # + # 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#114 + sig { params(name: ::String).returns(T::Boolean) } + def valid_parameter_name?(name); end + + class << self + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#23 + sig do + params( + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).returns(::String) + end + def serialize_type_variable(type, variance, fixed, upper, lower); end + end +end + +# source://tapioca//lib/tapioca/repo_index.rb#5 +class Tapioca::RepoIndex + # source://tapioca//lib/tapioca/repo_index.rb#26 + sig { void } + def initialize; end + + # source://tapioca//lib/tapioca/repo_index.rb#31 + sig { params(gem_name: ::String).void } + def <<(gem_name); end + + # source://tapioca//lib/tapioca/repo_index.rb#36 + sig { returns(T::Enumerable[::String]) } + def gems; end + + # source://tapioca//lib/tapioca/repo_index.rb#41 + sig { params(gem_name: ::String).returns(T::Boolean) } + def has_gem?(gem_name); end + + class << self + # source://tapioca//lib/tapioca/repo_index.rb#18 + sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(Tapioca::RepoIndex) } + def from_hash(hash); end + + # source://tapioca//lib/tapioca/repo_index.rb#13 + sig { params(json: ::String).returns(Tapioca::RepoIndex) } + def from_json(json); end + end +end + +# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#5 +module Tapioca::Runtime; end + +# This module should only be included when running versions of Ruby +# older than 3.2. Because the Class#attached_object method is not +# available, it implements finding the attached class of a singleton +# class by iterating through ObjectSpace. +module Tapioca::Runtime::AttachedClassOf + # source://tapioca//lib/tapioca/runtime/attached_class_of_32.rb#14 + sig { params(singleton_class: ::Class).returns(T.nilable(::Module)) } + def attached_class_of(singleton_class); end +end + +# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#6 +class Tapioca::Runtime::DynamicMixinCompiler + include ::Tapioca::Runtime::AttachedClassOf + include ::Tapioca::Runtime::Reflection + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#20 + sig { params(constant: ::Module).void } + def initialize(constant); end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + def class_attribute_predicates; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + sig { returns(T::Array[::Symbol]) } + def class_attribute_readers; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14 + def class_attribute_writers; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#137 + sig { params(tree: ::RBI::Tree).void } + def compile_class_attributes(tree); end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#180 + sig { params(tree: ::RBI::Tree).returns([T::Array[::Module], T::Array[::Module]]) } + def compile_mixes_in_class_methods(tree); end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 + sig { returns(T::Array[::Module]) } + def dynamic_extends; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11 + def dynamic_includes; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#132 + sig { returns(T::Boolean) } + def empty_attributes?; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#222 + sig { params(qualified_mixin_name: ::String).returns(T::Boolean) } + def filtered_mixin?(qualified_mixin_name); end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + def instance_attribute_predicates; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + sig { returns(T::Array[::Symbol]) } + def instance_attribute_readers; end + + # @return [Array] + # + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17 + def instance_attribute_writers; end + + # source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#215 + sig { params(mod: ::Module, dynamic_extends: T::Array[::Module]).returns(T::Boolean) } + def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end +end + +# This class is responsible for storing and looking up information related to generic types. +# +# The class stores 2 different kinds of data, in two separate lookup tables: +# 1. a lookup of generic type instances by name: `@generic_instances` +# 2. a lookup of type variable serializer by constant and type variable +# instance: `@type_variables` +# +# By storing the above data, we can cheaply query each constant against this registry +# to see if it declares any generic type variables. This becomes a simple lookup in the +# `@type_variables` hash table with the given constant. +# +# If there is no entry, then we can cheaply know that we can skip generic type +# information generation for this type. +# +# On the other hand, if we get a result, then the result will be a hash of type +# variable to type variable serializers. This allows us to associate type variables +# to the constant names that represent them, easily. +# +# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#23 +module Tapioca::Runtime::GenericTypeRegistry + class << self + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#80 + sig { params(instance: ::Object).returns(T::Boolean) } + def generic_type_instance?(instance); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#85 + sig { params(constant: ::Module).returns(T.nilable(T::Array[::Tapioca::TypeVariableModule])) } + def lookup_type_variables(constant); end + + # This method is responsible for building the name of the instantiated concrete type + # and cloning the given constant so that we can return a type that is the same + # as the current type but is a different instance and has a different name method. + # + # We cache those cloned instances by their name in `@generic_instances`, so that + # we don't keep instantiating a new type every single time it is referenced. + # For example, `[Foo[Integer], Foo[Integer], Foo[Integer], Foo[String]]` will only + # result in 2 clones (1 for `Foo[Integer]` and another for `Foo[String]`) and + # 2 hash lookups (for the other two `Foo[Integer]`s). + # + # This method returns the created or cached clone of the constant. + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#65 + sig { params(constant: T.untyped, types: T.untyped).returns(::Module) } + def register_type(constant, types); end + + # This method is called from intercepted calls to `type_member` and `type_template`. + # We get passed all the arguments to those methods, as well as the `T::Types::TypeVariable` + # instance generated by the Sorbet defined `type_member`/`type_template` call on `T::Generic`. + # + # This method creates a `String` with that data and stores it in the + # `@type_variables` lookup table, keyed by the `constant` and `type_variable`. + # + # Finally, the original `type_variable` is returned from this method, so that the caller + # can return it from the original methods as well. + # + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#104 + sig { params(constant: T.untyped, type_variable: ::Tapioca::TypeVariableModule).void } + def register_type_variable(constant, type_variable); end + + private + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#113 + sig { params(constant: ::Module, name: ::String).returns(::Module) } + def create_generic_type(constant, name); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#155 + sig { params(constant: T::Class[T.anything]).returns(T::Class[T.anything]) } + def create_safe_subclass(constant); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#182 + sig { params(constant: ::Module).returns(T::Array[::Tapioca::TypeVariableModule]) } + def lookup_or_initialize_type_variables(constant); end + end +end + +# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#34 +class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#38 + sig { params(raw_type: ::Module, underlying_type: ::Module).void } + def initialize(raw_type, underlying_type); end + + # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#45 + sig { 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#207 + 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#200 + sig { params(constant: ::Module).returns(T::Set[::String]) } + def file_candidates_for(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#213 + 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 "" or "block in " in the + # case of an ActiveSupport.on_load hook. If none is found, it returns the location + # labeled "
", which is the original call site. + # + # source://tapioca//lib/tapioca/runtime/reflection.rb#185 + sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } + def resolve_loc(locations); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#218 + 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#255 + 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#271 + sig { params(name: ::String).returns(T::Boolean) } + def has_aliased_namespace?(name); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#266 + sig { params(method: ::UnboundMethod).returns(T::Boolean) } + def method_defined_by_forwardable_module?(method); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#241 + sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } + def methods_for(constant); end + + # source://tapioca//lib/tapioca/runtime/reflection.rb#225 + 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] + # + # 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#65 + 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#32 + 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#58 + sig { params(v: T.nilable(::String)).void } + def set_path(v); end + + # source://tapioca//lib/tapioca/helpers/source_uri.rb#77 + sig { returns(::String) } + def to_s; end + + class << self + # source://tapioca//lib/tapioca/helpers/source_uri.rb#45 + 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) + +# `uri` for Ruby 3.4 switched the default parser from RFC2396 to RFC3986. The new parser emits a deprecation +# warning on a few methods and delegates them to RFC2396, namely `extract`/`make_regexp`/`escape`/`unescape`. +# On earlier versions of the uri gem, the RFC2396_PARSER constant doesn't exist, so it needs some special +# handling to select a parser that doesn't emit deprecations. While it was backported to Ruby 3.1, users may +# have the uri gem in their own bundle and thus not use a compatible version. +# +# source://tapioca//lib/tapioca/helpers/source_uri.rb#26 +URI::Source::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) diff --git a/sorbet/rbi/gems/thor@1.3.2.rbi b/sorbet/rbi/gems/thor@1.3.2.rbi new file mode 100644 index 0000000..10202a5 --- /dev/null +++ b/sorbet/rbi/gems/thor@1.3.2.rbi @@ -0,0 +1,4378 @@ +# 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:: :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: 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:: 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 + # command_name + # + # 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:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_command(meth = T.unsafe(nil)); end + + # Sets the default command when thor is executed without an explicit command to be called. + # + # ==== Parameters + # meth:: name of the default command + # + # source://thor//lib/thor.rb#21 + def default_task(meth = T.unsafe(nil)); end + + # source://thor//lib/thor/base.rb#26 + def deprecation_warning(message); end + + # Defines the usage and the description of the next command. + # + # ==== Parameters + # usage + # description + # options + # + # source://thor//lib/thor.rb#54 + def desc(usage, description, options = T.unsafe(nil)); end + + # Disable the check for required options for the given commands. + # This is useful if you have a command that does not need the required options + # to work, like help. + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#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:: :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 + # + # 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 + # options + # + # 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:: :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:: :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:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#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:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :default - Default value for this argument. It cannot be required and have default values. + # :aliases - Aliases for this option. + # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner - String to show on usage notes. + # :hide - If you want to hide this option from the help. + # + # source://thor//lib/thor.rb#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 + # options + # + # source://thor//lib/thor.rb#12 + def package_name(name, _ = T.unsafe(nil)); end + + # Returns commands ready to be printed. + # + # source://thor//lib/thor.rb#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:: Thor subclass to register + # command:: Subcommand name to use + # usage:: Short usage for the subcommand + # description:: Description for the subcommand + # + # source://thor//lib/thor.rb#37 + def register(klass, subcommand_name, usage, description, options = T.unsafe(nil)); end + + # Stop parsing of options as soon as an unknown option or a regular + # argument is encountered. All remaining arguments are passed to the command. + # This is useful if you have a command that can receive arbitrary additional + # options, and where those additional options should not be handled by + # Thor. + # + # ==== Example + # + # To better understand how this is useful, let's consider a command that calls + # an external command. A user may want to pass arbitrary options and + # arguments to that command. The command itself also accepts some options, + # which should be handled by Thor. + # + # class_option "verbose", :type => :boolean + # stop_on_unknown_option! :exec + # check_unknown_options! :except => :exec + # + # desc "exec", "Run a shell command" + # def exec(*args) + # puts "diagnostic output" if options[:verbose] + # Kernel.exec(*args) + # end + # + # Here +exec+ can be called with +--verbose+ to get diagnostic output, + # e.g.: + # + # $ thor exec --verbose echo foo + # diagnostic output + # foo + # + # But if +--verbose+ is given after +echo+, it is passed to +echo+ instead: + # + # $ thor exec echo --verbose foo + # --verbose foo + # + # ==== Parameters + # Symbol ...:: A list of commands that should be affected. + # + # source://thor//lib/thor.rb#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 + # command_name + # + # 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:: The actions default behavior. Can be :invoke or :revoke. + # It also accepts :force, :skip and :pretend to set the behavior + # and the respective option. + # + # destination_root:: The root directory needed for some actions. + # + # source://thor//lib/thor/actions.rb#72 + def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Wraps an action object and call it accordingly to the thor class behavior. + # + # source://thor//lib/thor/actions.rb#89 + def action(instance); end + + # Create a new file relative to the destination root with the given data, + # which is the return value of a block or a data string. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # data:: the data to append to the file. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def add_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # source:: the relative path to the source root. + # config:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def add_link(destination, *args); end + + # Append text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to append to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#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:: path of the file to be changed + # data:: the data to append to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # append_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # append_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#192 + def append_to_file(path, *args, &block); end + + # Loads an external file and execute it in the instance binding. + # + # ==== Parameters + # path:: The path to the file to execute. Can be a web address or + # a relative path from the source root. + # + # ==== Examples + # + # apply "http://gist.github.com/103208" + # + # apply "recipes/jquery.rb" + # + # source://thor//lib/thor/actions.rb#216 + def apply(path, config = T.unsafe(nil)); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions.rb#10 + def behavior; end + + # Sets the attribute behavior + # + # @param value the value to set the attribute behavior to. + # + # source://thor//lib/thor/actions.rb#10 + def behavior=(_arg0); end + + # Changes the mode of the given file or directory. + # + # ==== Parameters + # mode:: the file mode + # path:: the name of the file to change mode + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # chmod "script/server", 0755 + # + # source://thor//lib/thor/actions/file_manipulation.rb#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:: path of the file to be changed + # flag:: the regexp or string used to decide which lines to comment + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # comment_lines 'config/initializers/session_store.rb', /cookie_store/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#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:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: 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:: the relative path to the destination root. + # data:: the data to append to the file. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # create_file "lib/fun_party.rb" do + # hostname = ask("What is the virtual hostname I should use?") + # "vhost.name = #{hostname}" + # end + # + # create_file "config/apache.conf", "your apache config" + # + # source://thor//lib/thor/actions/create_file.rb#22 + def create_file(destination, *args, &block); end + + # Create a new file relative to the destination root from the given source. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # source:: the relative path to the source root. + # config:: give :verbose => false to not log the status. + # :: give :symbolic => false for hard link. + # + # ==== Examples + # + # create_link "config/apache.conf", "/etc/apache.conf" + # + # source://thor//lib/thor/actions/create_link.rb#17 + def create_link(destination, *args); end + + # Returns the root for this thor class (also aliased as destination root). + # + # source://thor//lib/thor/actions.rb#99 + def destination_root; end + + # Sets the root for this thor class. Relatives path are added to the + # directory where the script was invoked and expanded. + # + # source://thor//lib/thor/actions.rb#106 + def destination_root=(root); end + + # Copies recursively the files from source directory to root directory. + # If any of the files finishes with .tt, it's considered to be a template + # and is placed in the destination without the extension .tt. If any + # empty directory is found, it's copied and all .empty_directory files are + # ignored. If any file name is wrapped within % signs, the text within + # the % signs will be executed as a method and replaced with the returned + # value. Let's suppose a doc directory with the following files: + # + # doc/ + # components/.empty_directory + # README + # rdoc.rb.tt + # %app_name%.rb + # + # When invoked as: + # + # directory "doc" + # + # It will create a doc directory in the destination with the following + # files (assuming that the `app_name` method returns the value "blog"): + # + # doc/ + # components/ + # README + # rdoc.rb + # blog.rb + # + # Encoded path note: Since Thor internals use Object#respond_to? to check if it can + # expand %something%, this `something` should be a public method in the class calling + # #directory. If a method is private, Thor stack raises PrivateMethodEncodedError. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # If :recursive => false, does not look for paths recursively. + # If :mode => :preserve, preserve the file mode from the source. + # If :exclude_pattern => /regexp/, prevents copying files that match that regexp. + # + # ==== Examples + # + # directory "doc" + # directory "doc", "docs", :recursive => false + # + # source://thor//lib/thor/actions/directory.rb#49 + def directory(source, *args, &block); end + + # Creates an empty directory. + # + # ==== Parameters + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # empty_directory "doc" + # + # source://thor//lib/thor/actions/empty_directory.rb#13 + def empty_directory(destination, config = T.unsafe(nil)); end + + # Receives a file or directory and search for it in the source paths. + # + # @raise [Error] + # + # source://thor//lib/thor/actions.rb#133 + def find_in_source_paths(file); end + + # Gets the content at the given address and places it at the given relative + # destination. If a block is given instead of destination, the content of + # the url is yielded and used as location. + # + # +get+ relies on open-uri, so passing application user input would provide + # a command injection attack vector. + # + # ==== Parameters + # source:: the address of the given content. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status, and + # :http_headers => 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:: path of the file to be changed + # flag:: the regexp or string to be replaced + # replacement:: the replacement, can be also given as a block + # config:: give :verbose => false to not log the status, and + # :force => true, to force the replacement 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:: path of the file to be changed + # klass:: the class to be manipulated + # data:: the data to append to the class, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController", " filter_parameter :password\n" + # + # inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do + # " filter_parameter :password\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#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:: path of the file to be changed + # module_name:: the module to be manipulated + # data:: the data to append to the class, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", " def help; 'help'; end\n" + # + # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do + # " def help; 'help'; end\n" + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#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:: the directory to move to. + # config:: give :verbose => true to log and use padding. + # + # source://thor//lib/thor/actions.rb#170 + def inside(dir = T.unsafe(nil), config = T.unsafe(nil), &block); end + + # Links the file from the relative source to the relative destination. If + # the destination is not given it's assumed to be equal to the source. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # link_file "README", "doc/README" + # + # link_file "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#50 + def link_file(source, *args); end + + # Prepend text to a file. Since it depends on insert_into_file, it's reversible. + # + # ==== Parameters + # path:: path of the file to be changed + # data:: the data to prepend to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#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:: path of the file to be changed + # data:: the data to prepend to the file, can be also given as a block. + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"' + # + # prepend_to_file 'config/environments/test.rb' do + # 'config.gem "rspec"' + # end + # + # source://thor//lib/thor/actions/file_manipulation.rb#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:: path of the file to be changed + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#325 + def remove_dir(path, config = T.unsafe(nil)); end + + # Removes a file at the given location. + # + # ==== Parameters + # path:: path of the file to be changed + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # remove_file 'README' + # remove_file 'app/controllers/application_controller.rb' + # + # source://thor//lib/thor/actions/file_manipulation.rb#325 + def remove_file(path, config = T.unsafe(nil)); end + + # Executes a command returning the contents of the command. + # + # ==== Parameters + # command:: the command to be executed. + # config:: give :verbose => false to not log the status, :capture => true to hide to output. Specify :with + # to append an executable to command execution. + # + # ==== Example + # + # inside('vendor') do + # run('ln -s ~/edge rails') + # end + # + # source://thor//lib/thor/actions.rb#248 + def run(command, config = T.unsafe(nil)); end + + # Executes a ruby script (taking into account WIN32 platform quirks). + # + # ==== Parameters + # command:: the command to be executed. + # config:: give :verbose => false to not log the status. + # + # source://thor//lib/thor/actions.rb#285 + def run_ruby_script(command, config = T.unsafe(nil)); end + + # Holds source paths in instance so they can be manipulated. + # + # source://thor//lib/thor/actions.rb#127 + def source_paths; end + + # Gets an ERB template at the relative source, executes it and makes a copy + # at the relative destination. If the destination is not given it's assumed + # to be equal to the source removing .tt from the filename. + # + # ==== Parameters + # source:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: give :verbose => false to not log the status. + # + # ==== Examples + # + # template "README", "doc/README" + # + # template "doc/README" + # + # source://thor//lib/thor/actions/file_manipulation.rb#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:: the command to be invoked + # args:: arguments to the command + # config:: give :verbose => false to not log the status, :capture => true to hide to output. + # Other options are given as parameter to Thor. + # + # + # ==== Examples + # + # thor :install, "http://gist.github.com/103208" + # #=> thor install http://gist.github.com/103208 + # + # thor :list, :all => true, :substring => 'rails' + # #=> thor list --all --substring=rails + # + # source://thor//lib/thor/actions.rb#308 + def thor(command, *args); end + + # Uncomment all lines matching a given regex. Preserves indentation before + # the comment hash and removes the hash and any immediate following space. + # + # ==== Parameters + # path:: path of the file to be changed + # flag:: the regexp or string used to decide which lines to uncomment + # config:: give :verbose => false to not log the status. + # + # ==== Example + # + # uncomment_lines 'config/initializers/session_store.rb', /active_record/ + # + # source://thor//lib/thor/actions/file_manipulation.rb#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:: A Thor::Base instance + # source:: Relative path to the source of this file + # destination:: Relative path to the destination of this file + # config:: give :verbose => false to not log the status. + # + # @return [EmptyDirectory] a new instance of EmptyDirectory + # + # source://thor//lib/thor/actions/empty_directory.rb#34 + def initialize(base, destination, config = T.unsafe(nil)); end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def base; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def config; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def destination; end + + # Checks if the destination file already exists. + # + # ==== Returns + # Boolean:: true if the file exists, false otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#45 + def exists?; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def given_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#49 + def invoke!; end + + # source://thor//lib/thor/actions/empty_directory.rb#24 + def relative_destination; end + + # source://thor//lib/thor/actions/empty_directory.rb#56 + def revoke!; end + + protected + + # Filenames in the encoded form are converted. If you have a file: + # + # %file_name%.rb + # + # It calls #file_name from the base and replaces %-string with the + # return value (should be String) of #file_name: + # + # user.rb + # + # The method referenced can be either public or private. + # + # source://thor//lib/thor/actions/empty_directory.rb#103 + def convert_encoded_instructions(filename); end + + # Sets the absolute destination value from a relative destination value. + # It also stores the given and relative destination. Let's suppose our + # script is being executed on "dest", it sets the destination root to + # "dest". The destination, given_destination and relative_destination + # are related in the following way: + # + # inside "bar" do + # empty_directory "baz" + # end + # + # destination #=> dest/bar/baz + # relative_destination #=> bar/baz + # given_destination #=> baz + # + # source://thor//lib/thor/actions/empty_directory.rb#85 + def destination=(destination); end + + # Receives a hash of options and just execute the block if some + # conditions are met. + # + # source://thor//lib/thor/actions/empty_directory.rb#113 + def invoke_with_conflict_check(&block); end + + # What to do when the destination file already exists. + # + # source://thor//lib/thor/actions/empty_directory.rb#132 + def on_conflict_behavior; end + + # source://thor//lib/thor/actions/empty_directory.rb#126 + def on_file_clash_behavior; end + + # Shortcut for pretend. + # + # @return [Boolean] + # + # source://thor//lib/thor/actions/empty_directory.rb#67 + def pretend?; end + + # Shortcut to say_status shell method. + # + # source://thor//lib/thor/actions/empty_directory.rb#138 + def say_status(status, color); end +end + +# source://thor//lib/thor/actions/inject_into_file.rb#36 +class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory + # @return [InjectIntoFile] a new instance of InjectIntoFile + # + # source://thor//lib/thor/actions/inject_into_file.rb#39 + def initialize(base, destination, data, config); end + + # Returns the value of attribute behavior. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def behavior; end + + # Returns the value of attribute flag. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def flag; end + + # source://thor//lib/thor/actions/inject_into_file.rb#52 + def invoke!; end + + # Returns the value of attribute replacement. + # + # source://thor//lib/thor/actions/inject_into_file.rb#37 + def replacement; end + + # source://thor//lib/thor/actions/inject_into_file.rb#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:: Relative path to the destination root +# data:: Data to add to the file. Can be given as a block. +# config:: give :verbose => false to not log the status and the flag +# for injection (:after or :before) or :force => true for +# insert two or more times the same content. +# +# ==== Examples +# +# insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n" +# +# insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do +# gems = ask "Which gems would you like to add?" +# gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n") +# end +# +# source://thor//lib/thor/actions/inject_into_file.rb#24 +Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) + +# source://thor//lib/thor/error.rb#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:: An array of objects. The objects are applied to their + # respective accessors declared with argument. + # + # options:: An options hash that will be available as self.options. + # The hash given is converted to a hash with indifferent + # access, magic predicates (options.skip?) and then frozen. + # + # config:: Configuration for this Thor class. + # + # source://thor//lib/thor/base.rb#53 + def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end + + # Returns the value of attribute args. + # + # source://thor//lib/thor/base.rb#35 + def args; end + + # Sets the attribute args + # + # @param value the value to set the attribute args to. + # + # source://thor//lib/thor/base.rb#35 + def args=(_arg0); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/base.rb#35 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://thor//lib/thor/base.rb#35 + def options=(_arg0); end + + # Returns the value of attribute parent_options. + # + # source://thor//lib/thor/base.rb#35 + def parent_options; end + + # Sets the attribute parent_options + # + # @param value the value to set the attribute parent_options to. + # + # source://thor//lib/thor/base.rb#35 + def parent_options=(_arg0); end + + class << self + # source://thor//lib/thor/base.rb#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 => 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:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc - Description for the argument. + # :required - If the argument is required or not. + # :optional - If the argument is optional or not. + # :type - The type of the argument, can be :string, :hash, :array, :numeric. + # :default - Default value for this argument. It cannot be required and have default values. + # :banner - String to show on usage notes. + # + # ==== Errors + # ArgumentError:: Raised if you supply a required argument after a non required one. + # + # source://thor//lib/thor/base.rb#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:: The name of the argument. + # options:: Described below. + # + # ==== Options + # :desc:: -- Description for the argument. + # :required:: -- If the argument is required or not. + # :default:: -- Default value for this argument. + # :group:: -- The group for this options. Use by class options to output options in different levels. + # :aliases:: -- Aliases for this option. Note: Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead. + # :type:: -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean. + # :banner:: -- String to show on usage notes. + # :hide:: -- If you want to hide this option from the help. + # + # source://thor//lib/thor/base.rb#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 + # + # 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:: 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:: 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:: 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:: 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:: The name of the command to be removed + # options:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#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:: The name of the command to be removed + # options:: You can give :undefine => true if you want commands the method + # to be undefined from the class as well. + # + # source://thor//lib/thor/base.rb#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:: The name of the argument. + # options:: Described in both class_option and method_option. + # scope:: Options hash that is being built up + # + # source://thor//lib/thor/base.rb#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:: 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:: 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) + +# Adds a compatibility layer to your Thor classes which allows you to use +# rake package tasks. For example, to use rspec rake tasks, one can do: +# +# require 'thor/rake_compat' +# require 'rspec/core/rake_task' +# +# class Default < Thor +# include Thor::RakeCompat +# +# RSpec::Core::RakeTask.new(:spec) do |t| +# t.spec_opts = ['--options', './.rspec'] +# t.spec_files = FileList['spec/**/*_spec.rb'] +# end +# end +# +# source://thor//lib/thor/rake_compat.rb#20 +module Thor::RakeCompat + include ::FileUtils::StreamUtils_ + include ::FileUtils + include ::Rake::FileUtilsExt + include ::Rake::DSL + + class << self + # @private + # + # source://thor//lib/thor/rake_compat.rb#27 + def included(base); end + + # source://thor//lib/thor/rake_compat.rb#23 + def rake_classes; end + end +end + +# source://thor//lib/thor/error.rb#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:: 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:: the destination file to solve conflicts + # block:: an optional block that returns the value to be used in diff and merge + # + # source://thor//lib/thor/shell/basic.rb#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:: Indent the first column by indent value. + # colwidth:: Force the first column to colwidth spaces wide. + # borders:: 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:: 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>" + # + # ==== 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:: The namespace to search for. + # + # source://thor//lib/thor/util.rb#24 + def find_by_namespace(namespace); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Receives a namespace and tries to retrieve a Thor or Thor::Group class + # from it. It first searches for a class using the all the given namespace, + # if it's not found, removes the highest entry and searches for the class + # again. If found, returns the highest entry as the class name. + # + # ==== Examples + # + # class Foo::Bar < Thor + # def baz + # end + # end + # + # class Baz::Foo < Thor::Group + # end + # + # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command + # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil + # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz" + # + # ==== Parameters + # namespace + # + # source://thor//lib/thor/util.rb#131 + def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end + + # Where to look for Thor files. + # + # source://thor//lib/thor/util.rb#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:: The constant to be converted to the thor path. + # + # ==== Returns + # String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz" + # + # source://thor//lib/thor/util.rb#43 + def namespace_from_thor_class(constant); end + + # Given the contents, evaluate it inside the sandbox and returns the + # namespaces defined in the sandbox. + # + # ==== Parameters + # contents + # + # ==== Returns + # Array[Object] + # + # source://thor//lib/thor/util.rb#58 + def namespaces_in_content(contents, file = T.unsafe(nil)); end + + # Return the path to the ruby interpreter taking into account multiple + # installations and windows extensions. + # + # source://thor//lib/thor/util.rb#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/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi b/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi new file mode 100644 index 0000000..66f95df --- /dev/null +++ b/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `unicode-display_width` gem. +# Please instead update this file by running `bin/tapioca gem unicode-display_width`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi new file mode 100644 index 0000000..d47b85e --- /dev/null +++ b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi @@ -0,0 +1,435 @@ +# 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.11647/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/sorbet/rbi/gems/yard@0.9.37.rbi b/sorbet/rbi/gems/yard@0.9.37.rbi new file mode 100644 index 0000000..b7622a2 --- /dev/null +++ b/sorbet/rbi/gems/yard@0.9.37.rbi @@ -0,0 +1,18379 @@ +# 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 Config.options[:safe_mode] 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] 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] 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] 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] 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] 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] 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] 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] 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] a list of scripts to load + # @since 0.6.2 + # + # source://yard//lib/yard/cli/server.rb#22 + def scripts; end + + # @return [Array] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] a list of APIs + # @since 0.8.1 + # + # source://yard//lib/yard/cli/yardoc.rb#180 + def apis=(_arg0); end + + # @return [Array] 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] 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] list of excluded paths (regexp matches) + # @since 0.5.3 + # + # source://yard//lib/yard/cli/yardoc.rb#155 + def excluded; end + + # @return [Array] 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] list of Ruby source files to process + # @since 0.2.1 + # + # source://yard//lib/yard/cli/yardoc.rb#151 + def files; end + + # @return [Array] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] a list of code objects + # @return [Array] 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] 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] the list of code objects to render + # the templates with. + # + # source://yard//lib/yard/cli/yardoc.rb#36 + def objects; end + + # @return [Array] 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] 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] 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] 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') # => # + # @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, '' should be used to associate code that comes form standard input. + # + # @param file [String] the filename ('' 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, 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 => #, + # :write => nil + # }, + # :object => { + # :read => #, + # :write => # + # }, + # ... + # } + # } + # @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) + # # => # + # @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] 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] 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] 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] a list of class variable objects + # + # source://yard//lib/yard/code_objects/namespace_object.rb#186 + def cvars; end + + # @return [Array] 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] 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] 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] 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) + # # => [#, #] + # @option opts + # @option opts + # @option opts + # @param opts [Hash] a customizable set of options + # @return [Array] 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] a list of scopes (:class, :instance) to + # return mixins for. If this is empty, all scopes will be returned. + # @return [Array] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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, 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] the list of objects to post-process. + # @return [CodeObjects::Base, Array] 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] 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] 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] a list of the parameters + # in the attr call. + # @raise [Parser::UndocumentableError] if the arguments are not valid. + # @return [Array] 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] 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] 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>>] 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>, 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>] passed to {#tokval} + # @return [Array] the list of tokvalues in the list. + # @return [Array] 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] 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] 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] 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] 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] 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] 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 (opts[:key]), 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] 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] the list of remaining files to parse + # + # source://yard//lib/yard/parser/source_parser.rb#22 + def files; end + + # @return [Array] 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] 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] 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] 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 here document diversion. 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 < 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] 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] 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] 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] 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] 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] 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] 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] a path, glob, or list of paths to + # parse + # @param excluded [Array] 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, 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] 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 rake task to run {CLI::Yardoc} and generate documentation. +# +# source://yard//lib/yard/rake/yardoc_task.rb#8 +class YARD::Rake::YardocTask < ::Rake::TaskLib + # Creates a new task with name +name+. + # + # @param name [String, Symbol] the name of the rake task + # @return [YardocTask] a new instance of YardocTask + # @yield a block to allow any options to be modified on the task + # @yieldparam _self [YardocTask] the task object to allow any parameters + # to be changed. + # + # source://yard//lib/yard/rake/yardoc_task.rb#50 + def initialize(name = T.unsafe(nil)); end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after; end + + # Runs a +Proc+ after the task + # + # @return [Proc] a proc to call after running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#36 + def after=(_arg0); end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before; end + + # Runs a +Proc+ before the task + # + # @return [Proc] a proc to call before running the task + # + # source://yard//lib/yard/rake/yardoc_task.rb#32 + def before=(_arg0); end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files; end + + # The Ruby source files (and any extra documentation files separated by '-') + # to process. + # + # @example Task files assignment + # YARD::Rake::YardocTask.new do |t| + # t.files = ['app/**/*.rb', 'lib/**/*.rb', '-', 'doc/FAQ.md', 'doc/Changes.md'] + # end + # @return [Array] a list of files + # + # source://yard//lib/yard/rake/yardoc_task.rb#28 + def files=(_arg0); end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name; end + + # The name of the task + # + # @return [String] the task name + # + # source://yard//lib/yard/rake/yardoc_task.rb#11 + def name=(_arg0); end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options; end + + # Options to pass to {CLI::Yardoc} + # + # @return [Array] the options passed to the commandline utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#15 + def options=(_arg0); end + + # Options to pass to {CLI::Stats} + # + # @return [Array] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options; end + + # Options to pass to {CLI::Stats} + # + # @return [Array] the options passed to the stats utility + # + # source://yard//lib/yard/rake/yardoc_task.rb#19 + def stats_options=(_arg0); end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier; end + + # @return [Verifier, Proc] an optional {Verifier} to run against all objects + # being generated. Any object that the verifier returns false for will be + # excluded from documentation. This attribute can also be a lambda. + # @see Verifier + # + # source://yard//lib/yard/rake/yardoc_task.rb#42 + def verifier=(_arg0); end + + protected + + # Defines the rake task + # + # @return [void] + # + # source://yard//lib/yard/rake/yardoc_task.rb#68 + def define; end +end + +# The +Registry+ is the centralized data store for all {CodeObjects} created +# during parsing. The storage is a key value store with the object's path +# (see {CodeObjects::Base#path}) as the key and the object itself as the value. +# 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] 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] 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] 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) # => # + # @example Looks for a complex path from a namespace + # Registry.resolve(P('A::B'), '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] 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] 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] 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] 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}] 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}] 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}] 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)] 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] 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)] 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] 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)] 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] path components (split by '/') + # @return [Array(Numeric,Hash,Array)] 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)] 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] path components (split by '/') + # @return [Array(Numeric,Hash,Array)] 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] path components (split by '/') + # @return [Array(Numeric,Hash,Array)] 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, nil]') # => [nil, ['String', 'Array', 'nil'], ""] + # obj.parse_types('b A string') # => ['b', ['String'], 'A string'] + # @return [Array(String, Array, 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 + # 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] 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] 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, 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, 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, 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] 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] 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] 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] 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 +# @!macro the_name 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 ${N-M}. 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 foo(a, b, c) 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 $1 $2 $3 $4 .... Note that +# if the token cannot be expanded, it will return the empty string (not an error), +# so it would be safe to list $1 $2 ... $10, 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] 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] 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] 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] 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] 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] 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] 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] 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] the list of registered template paths + # + # source://yard//lib/yard/templates/engine.rb#14 + def template_paths; end + + # @return [Array] 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] 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] 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] a list of code objects + # @return [Array] 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, 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}") # => "MyClass#method" + # @example Linking to a class with a title + # resolve_links("{A::B::C the C class}") # => "the c class" + # @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] a list of methods + # @param hide_attributes [Boolean] whether to prune attribute methods from the list + # @return [Array] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] a list of code objects + # @return [Array] 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/sorbet/rbi/todo.rbi b/sorbet/rbi/todo.rbi new file mode 100644 index 0000000..32ac193 --- /dev/null +++ b/sorbet/rbi/todo.rbi @@ -0,0 +1,7 @@ +# DO NOT EDIT MANUALLY +# This is an autogenerated file for unresolved constants. +# Please instead update this file by running `bin/tapioca todo`. + +# typed: false + +module ::Rails; end diff --git a/sorbet/tapioca/config.yml b/sorbet/tapioca/config.yml new file mode 100644 index 0000000..886ae58 --- /dev/null +++ b/sorbet/tapioca/config.yml @@ -0,0 +1,13 @@ +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/sorbet/tapioca/require.rb b/sorbet/tapioca/require.rb new file mode 100644 index 0000000..80f31f8 --- /dev/null +++ b/sorbet/tapioca/require.rb @@ -0,0 +1,4 @@ +# typed: true +# frozen_string_literal: true + +# Add your extra requires here (`bin/tapioca require` can be used to bootstrap this list) diff --git a/test/simple_feature_flags/ram_storage_test.rb b/test/simple_feature_flags/ram_storage_test.rb index d955d3f..b35eabf 100644 --- a/test/simple_feature_flags/ram_storage_test.rb +++ b/test/simple_feature_flags/ram_storage_test.rb @@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true require 'test_helper' @@ -5,58 +6,62 @@ module SimpleFeatureFlags class RamStorageTest < Minitest::Test + extend T::Sig + def setup flags = { mandatory: [ { - 'name' => 'feature_one', - 'active' => 'true', - 'description' => 'Some description' + 'name' => 'feature_one', + 'active' => 'true', + 'description' => 'Some description', }, { - 'name' => 'feature_two', - 'description' => 'Some description 2' - } + 'name' => 'feature_two', + 'description' => 'Some description 2', + }, ], - remove: %w[feature_remove] + remove: %w[feature_remove], } file = Tempfile.new("feature_flags_#{Time.now.to_i}") - File.write(file.path, flags.to_yaml) + File.write(T.must(file.path), T.unsafe(flags).to_yaml) - @feature_flags = SimpleFeatureFlags::RamStorage.new(file.path) - assert @feature_flags.add('feature_remain', 'Remain description', true) + @feature_flags = SimpleFeatureFlags::RamStorage.new(T.must(file.path)) + assert feature_flags.add('feature_remain', 'Remain description', true) end + sig { override.returns(SimpleFeatureFlags::RamStorage) } + attr_reader :feature_flags + include ::Support::UniversalStorageTests def test_should_not_throw_errors_on_non_mandatory_flags - assert_equal SimpleFeatureFlags::RamStorage, @feature_flags.class - assert @feature_flags.redis.nil? - assert @feature_flags.active?('feature_one') - assert !@feature_flags.active?('feature_two') - assert !@feature_flags.active?('feature_three') - assert !@feature_flags.active?('feature_remove') - assert !@feature_flags.exists?('feature_remove') - assert @feature_flags.active?('feature_remain') - assert @feature_flags.exists?('feature_remain') + assert_equal SimpleFeatureFlags::RamStorage, feature_flags.class + assert feature_flags.active?('feature_one') + assert !feature_flags.active?('feature_two') + assert !feature_flags.active?('feature_three') + assert !feature_flags.active?('feature_remove') + assert !feature_flags.exists?('feature_remove') + assert feature_flags.active?('feature_remain') + assert feature_flags.exists?('feature_remain') number = 2 - @feature_flags.when_active('feature_one') do + feature_flags.when_active('feature_one') do number += 1 end assert_equal 3, number - @feature_flags.when_active('feature_two') do + feature_flags.when_active('feature_two') do number += 1 end assert_equal 3, number - @feature_flags.when_active('feature_three') do + feature_flags.when_active('feature_three') do number += 1 end assert_equal 3, number - @feature_flags.when_active('feature_three') do + feature_flags.when_active('feature_three') do number += 1 end assert_equal 3, number diff --git a/test/simple_feature_flags/redis_storage_test.rb b/test/simple_feature_flags/redis_storage_test.rb index a607a07..52d6d10 100644 --- a/test/simple_feature_flags/redis_storage_test.rb +++ b/test/simple_feature_flags/redis_storage_test.rb @@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true require 'test_helper' @@ -8,69 +9,73 @@ module SimpleFeatureFlags class RedisStorageTest < Minitest::Test + extend T::Sig + def setup flags = { mandatory: [ { - 'name' => 'feature_one', - 'active' => 'true', - 'description' => 'Some description mandatory' + 'name' => 'feature_one', + 'active' => 'true', + 'description' => 'Some description mandatory', }, { - 'name' => 'feature_two', - 'description' => 'Some description 2' - } + 'name' => 'feature_two', + 'description' => 'Some description 2', + }, ], - remove: %w[feature_remove] + remove: %w[feature_remove], } empty_file = Tempfile.new("empty_feature_flags_#{Time.now.to_i}") file = Tempfile.new("feature_flags_#{Time.now.to_i}") - File.write(file.path, flags.to_yaml) + File.write(T.must(file.path), T.unsafe(flags).to_yaml) redis = Redis.new(db: 14) redis_namespaced = Redis::Namespace.new(:feature_flags, redis: redis) # clean redis before each test - init_feature_flags = SimpleFeatureFlags::RedisStorage.new(redis_namespaced, empty_file.path) - init_feature_flags.namespaced_redis.redis.flushdb + init_feature_flags = SimpleFeatureFlags::RedisStorage.new(redis_namespaced, T.must(empty_file.path)) + T.must(init_feature_flags.namespaced_redis).redis.flushdb assert init_feature_flags.add('feature_remove', 'Remove description', true) assert init_feature_flags.add('feature_remain', 'Remain description', true) assert init_feature_flags.add('feature_one', 'Some description', true) - init_feature_flags = nil - @feature_flags = SimpleFeatureFlags::RedisStorage.new(redis_namespaced, file.path) + @feature_flags = SimpleFeatureFlags::RedisStorage.new(redis_namespaced, T.must(file.path)) end + sig { override.returns(SimpleFeatureFlags::RedisStorage) } + attr_reader :feature_flags + include ::Support::UniversalStorageTests def test_should_not_throw_errors_on_non_mandatory_flags assert_equal SimpleFeatureFlags::RedisStorage, @feature_flags.class - assert !@feature_flags.redis.nil? - assert @feature_flags.active?('feature_one') - assert !@feature_flags.active?('feature_two') - assert !@feature_flags.active?('feature_three') - assert !@feature_flags.active?('feature_remove') - assert !@feature_flags.exists?('feature_remove') - assert @feature_flags.active?('feature_remain') - assert @feature_flags.exists?('feature_remain') + assert !feature_flags.redis.nil? + assert feature_flags.active?('feature_one') + assert !feature_flags.active?('feature_two') + assert !feature_flags.active?('feature_three') + assert !feature_flags.active?('feature_remove') + assert !feature_flags.exists?('feature_remove') + assert feature_flags.active?('feature_remain') + assert feature_flags.exists?('feature_remain') number = 2 - @feature_flags.when_active('feature_one') do + feature_flags.when_active('feature_one') do number += 1 end assert_equal 3, number - @feature_flags.when_active('feature_two') do + feature_flags.when_active('feature_two') do number += 1 end assert_equal 3, number - @feature_flags.when_active('feature_three') do + feature_flags.when_active('feature_three') do number += 1 end assert_equal 3, number - @feature_flags.when_active('feature_three') do + feature_flags.when_active('feature_three') do number += 1 end assert_equal 3, number diff --git a/test/simple_feature_flags/test_ram_storage_test.rb b/test/simple_feature_flags/test_ram_storage_test.rb index c223395..6d8f519 100644 --- a/test/simple_feature_flags/test_ram_storage_test.rb +++ b/test/simple_feature_flags/test_ram_storage_test.rb @@ -1,3 +1,4 @@ +# typed: true # frozen_string_literal: true require 'test_helper' @@ -5,63 +6,67 @@ module SimpleFeatureFlags class TestRamStorageTest < Minitest::Test + extend T::Sig + def setup flags = { mandatory: [ { - 'name' => 'feature_one', - 'active' => 'true', - 'description' => 'Some description' + 'name' => 'feature_one', + 'active' => 'true', + 'description' => 'Some description', }, { - 'name' => 'feature_two', - 'description' => 'Some description 2' - } + 'name' => 'feature_two', + 'description' => 'Some description 2', + }, ], - remove: %w[feature_remove] + remove: %w[feature_remove], } file = Tempfile.new("feature_flags_#{Time.now.to_i}") - File.write(file.path, flags.to_yaml) + File.write(T.must(file.path), T.unsafe(flags).to_yaml) - @feature_flags = SimpleFeatureFlags::TestRamStorage.new(file.path) - assert @feature_flags.add('feature_remain', 'Remain description', true) + @feature_flags = SimpleFeatureFlags::TestRamStorage.new(T.must(file.path)) + assert feature_flags.add('feature_remain', 'Remain description', true) end + sig { returns(SimpleFeatureFlags::TestRamStorage) } + attr_reader :feature_flags + def test_correctly_throw_errors_on_non_mandatory_flags - assert_equal SimpleFeatureFlags::TestRamStorage, @feature_flags.class - assert_nil @feature_flags.redis - assert @feature_flags.active?('feature_one') - assert !@feature_flags.active?('feature_two') + assert_equal SimpleFeatureFlags::TestRamStorage, feature_flags.class + assert feature_flags.active?('feature_one') + assert !feature_flags.active?('feature_two') assert_raises FlagNotDefinedError do - @feature_flags.active?('feature_three') + feature_flags.active?('feature_three') end assert_raises FlagNotDefinedError do - @feature_flags.active?('feature_remove') + feature_flags.active?('feature_remove') end - assert !@feature_flags.exists?('feature_remove') + assert !feature_flags.exists?('feature_remove') assert_raises FlagNotDefinedError do - @feature_flags.active?('feature_remain') + feature_flags.active?('feature_remain') end - assert @feature_flags.exists?('feature_remain') + assert feature_flags.exists?('feature_remain') number = 2 - @feature_flags.when_active('feature_one') do + feature_flags.when_active('feature_one') do number += 1 end assert_equal 3, number - @feature_flags.when_active('feature_two') do + feature_flags.when_active('feature_two') do number += 1 end assert_equal 3, number assert_raises FlagNotDefinedError do - @feature_flags.when_active('feature_three') do + feature_flags.when_active('feature_three') do number += 1 end end diff --git a/test/simple_feature_flags_test.rb b/test/simple_feature_flags_test.rb index 4e16075..741901a 100644 --- a/test/simple_feature_flags_test.rb +++ b/test/simple_feature_flags_test.rb @@ -1,6 +1,7 @@ +# typed: true # frozen_string_literal: true -require "test_helper" +require 'test_helper' class SimpleFeatureFlagsTest < Minitest::Test def test_that_it_has_a_version_number diff --git a/test/support/universal_storage_tests.rb b/test/support/universal_storage_tests.rb index 8651508..f55548d 100644 --- a/test/support/universal_storage_tests.rb +++ b/test/support/universal_storage_tests.rb @@ -1,149 +1,169 @@ +# typed: true +# frozen_string_literal: true + module Support module UniversalStorageTests class TestObject - alias id object_id + extend T::Sig + + sig { returns Integer } + def id + __id__ + end end + extend T::Sig + extend T::Helpers + + abstract! + + sig { abstract.params(val: T.anything).void } + def assert(val); end + sig { abstract.params(val1: T.anything, val2: T.anything).void } + def assert_equal(val1, val2); end + sig { abstract.returns(SimpleFeatureFlags::BaseStorage) } + def feature_flags; end + def test_correctly_import_flags_from_yaml - assert @feature_flags.active?('feature_one') - assert !@feature_flags.inactive?('feature_one') + assert feature_flags.active?('feature_one') + assert !feature_flags.inactive?('feature_one') - assert !@feature_flags.active?('feature_two') - assert @feature_flags.inactive?('feature_two') + assert !feature_flags.active?('feature_two') + assert feature_flags.inactive?('feature_two') - assert !@feature_flags.exists?('feature_remove') + assert !feature_flags.exists?('feature_remove') - assert @feature_flags.exists?('feature_remain') + assert feature_flags.exists?('feature_remain') number = 2 - @feature_flags.when_active('feature_one') do + feature_flags.when_active('feature_one') do number += 1 end assert_equal 3, number - @feature_flags.when_inactive('feature_one') do + feature_flags.when_inactive('feature_one') do number += 1 end assert_equal 3, number - @feature_flags.when_active('feature_two') do + feature_flags.when_active('feature_two') do number += 1 end assert_equal 3, number - @feature_flags.when_inactive('feature_two') do + feature_flags.when_inactive('feature_two') do number += 1 end assert_equal 4, number assert_equal 4, number - @feature_flags.when_active('feature_three') do + feature_flags.when_active('feature_three') do number += 1 end assert_equal 4, number - @feature_flags.when_inactive('feature_three') do + feature_flags.when_inactive('feature_three') do number += 1 end assert_equal 5, number end def test_add_a_new_feature - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size - assert @feature_flags.add('feature_three', 'Some new description') - assert !@feature_flags.active?('feature_three') - assert @feature_flags.inactive?('feature_three') + assert feature_flags.add('feature_three', 'Some new description') + assert !feature_flags.active?('feature_three') + assert feature_flags.inactive?('feature_three') - assert_equal 'Some new description', @feature_flags.description('feature_three') + assert_equal 'Some new description', feature_flags.description('feature_three') - assert_equal 4, @feature_flags.all.size + assert_equal 4, feature_flags.all.size - assert @feature_flags.add('feature_four', 'Some other new description', true) - assert @feature_flags.active?('feature_four') - assert !@feature_flags.inactive?('feature_four') + assert feature_flags.add('feature_four', 'Some other new description', true) + assert feature_flags.active?('feature_four') + assert !feature_flags.inactive?('feature_four') - assert_equal 'Some other new description', @feature_flags.description('feature_four') + assert_equal 'Some other new description', feature_flags.description('feature_four') - assert_equal 5, @feature_flags.all.size + assert_equal 5, feature_flags.all.size end def test_not_add_a_new_feature_when_it_exists - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size - assert !@feature_flags.add('feature_one', 'Some new description') - assert @feature_flags.active?('feature_one') - assert !@feature_flags.inactive?('feature_one') - assert_equal 'Some description', @feature_flags.description('feature_one') + assert !feature_flags.add('feature_one', 'Some new description') + assert feature_flags.active?('feature_one') + assert !feature_flags.inactive?('feature_one') + assert_equal 'Some description', feature_flags.description('feature_one') - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size end def test_remove_a_feature - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size - assert @feature_flags.remove(:feature_one) - assert !@feature_flags.active?('feature_one') - assert !@feature_flags.active?(:feature_one) - assert @feature_flags.inactive?('feature_one') - assert @feature_flags.inactive?(:feature_one) - assert !@feature_flags.exists?(:feature_one) - assert !@feature_flags.exists?('feature_one') + assert feature_flags.remove(:feature_one) + assert !feature_flags.active?('feature_one') + assert !feature_flags.active?(:feature_one) + assert feature_flags.inactive?('feature_one') + assert feature_flags.inactive?(:feature_one) + assert !feature_flags.exists?(:feature_one) + assert !feature_flags.exists?('feature_one') - assert_equal 2, @feature_flags.all.size + assert_equal 2, feature_flags.all.size end def test_not_remove_a_feature_when_it_does_not_exist - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size - assert !@feature_flags.remove('feature_three') - assert !@feature_flags.active?('feature_three') - assert @feature_flags.inactive?('feature_three') + assert !feature_flags.remove('feature_three') + assert !feature_flags.active?('feature_three') + assert feature_flags.inactive?('feature_three') - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size end def test_activate_a_feature - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size - @feature_flags.activate(:feature_two) - assert @feature_flags.active?('feature_two') - assert @feature_flags.active?(:feature_two) - assert !@feature_flags.inactive?('feature_two') - assert !@feature_flags.inactive?(:feature_two) + feature_flags.activate(:feature_two) + assert feature_flags.active?('feature_two') + assert feature_flags.active?(:feature_two) + assert !feature_flags.inactive?('feature_two') + assert !feature_flags.inactive?(:feature_two) - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size end def test_not_activate_a_feature_when_it_does_not_exist - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size - assert !@feature_flags.activate('feature_three') - assert !@feature_flags.active?('feature_three') - assert @feature_flags.inactive?('feature_three') + assert !feature_flags.activate('feature_three') + assert !feature_flags.active?('feature_three') + assert feature_flags.inactive?('feature_three') - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size end def test_deactivate_a_feature - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size - assert @feature_flags.deactivate(:feature_one) - assert !@feature_flags.active?('feature_one') - assert @feature_flags.inactive?('feature_one') + assert feature_flags.deactivate(:feature_one) + assert !feature_flags.active?('feature_one') + assert feature_flags.inactive?('feature_one') - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size end def test_not_deactivate_a_feature_when_it_does_not_exist - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size - assert !@feature_flags.deactivate('feature_three') - assert !@feature_flags.active?('feature_three') - assert @feature_flags.inactive?('feature_three') + assert !feature_flags.deactivate('feature_three') + assert !feature_flags.active?('feature_three') + assert feature_flags.inactive?('feature_three') - assert_equal 3, @feature_flags.all.size + assert_equal 3, feature_flags.all.size end # FEATURE FLAGS PER MODEL @@ -154,52 +174,52 @@ def test_activate_an_active_flag_for_a_model test_value = 1 - assert @feature_flags.activate_partially(:feature_one) + assert feature_flags.activate_partially(:feature_one) - assert @feature_flags.active?(:feature_one) - assert !@feature_flags.inactive?(:feature_one) + assert feature_flags.active?(:feature_one) + assert !feature_flags.inactive?(:feature_one) - assert !@feature_flags.active_globally?(:feature_one) - assert @feature_flags.inactive_globally?(:feature_one) - assert @feature_flags.active_partially?(:feature_one) - assert !@feature_flags.inactive_partially?(:feature_one) + assert !feature_flags.active_globally?(:feature_one) + assert feature_flags.inactive_globally?(:feature_one) + assert feature_flags.active_partially?(:feature_one) + assert !feature_flags.inactive_partially?(:feature_one) - assert !@feature_flags.active_for?(:feature_one, test_object) - assert !@feature_flags.active_for?(:feature_one, test_object_two) - assert @feature_flags.inactive_for?(:feature_one, test_object) - assert @feature_flags.inactive_for?(:feature_one, test_object_two) + assert !feature_flags.active_for?(:feature_one, test_object) + assert !feature_flags.active_for?(:feature_one, test_object_two) + assert feature_flags.inactive_for?(:feature_one, test_object) + assert feature_flags.inactive_for?(:feature_one, test_object_two) - @feature_flags.when_active_for(:feature_one, test_object) do + feature_flags.when_active_for(:feature_one, test_object) do test_value += 1 end assert_equal 1, test_value - @feature_flags.when_inactive_for(:feature_one, test_object) do + feature_flags.when_inactive_for(:feature_one, test_object) do test_value += 1 end assert_equal 2, test_value - assert @feature_flags.activate_for(:feature_one, test_object) + assert feature_flags.activate_for(:feature_one, test_object) - assert @feature_flags.active?(:feature_one) - assert !@feature_flags.inactive?(:feature_one) + assert feature_flags.active?(:feature_one) + assert !feature_flags.inactive?(:feature_one) - assert !@feature_flags.active_globally?(:feature_one) - assert @feature_flags.active_partially?(:feature_one) - assert @feature_flags.inactive_globally?(:feature_one) - assert !@feature_flags.inactive_partially?(:feature_one) + assert !feature_flags.active_globally?(:feature_one) + assert feature_flags.active_partially?(:feature_one) + assert feature_flags.inactive_globally?(:feature_one) + assert !feature_flags.inactive_partially?(:feature_one) - assert @feature_flags.active_for?(:feature_one, test_object) - assert !@feature_flags.active_for?(:feature_one, test_object_two) - assert !@feature_flags.inactive_for?(:feature_one, test_object) - assert @feature_flags.inactive_for?(:feature_one, test_object_two) + assert feature_flags.active_for?(:feature_one, test_object) + assert !feature_flags.active_for?(:feature_one, test_object_two) + assert !feature_flags.inactive_for?(:feature_one, test_object) + assert feature_flags.inactive_for?(:feature_one, test_object_two) - @feature_flags.when_active_for(:feature_one, test_object) do + feature_flags.when_active_for(:feature_one, test_object) do test_value += 1 end assert_equal 3, test_value - @feature_flags.when_inactive_for(:feature_one, test_object) do + feature_flags.when_inactive_for(:feature_one, test_object) do test_value += 1 end assert_equal 3, test_value @@ -211,62 +231,62 @@ def test_not_activate_a_deactivated_flag_for_a_model test_value = 1 - assert !@feature_flags.active?(:feature_two) - assert @feature_flags.inactive?(:feature_two) + assert !feature_flags.active?(:feature_two) + assert feature_flags.inactive?(:feature_two) - assert !@feature_flags.active_for?(:feature_two, test_object) - assert !@feature_flags.active_for?(:feature_two, test_object_two) - assert @feature_flags.inactive_for?(:feature_two, test_object) - assert @feature_flags.inactive_for?(:feature_two, test_object_two) + assert !feature_flags.active_for?(:feature_two, test_object) + assert !feature_flags.active_for?(:feature_two, test_object_two) + assert feature_flags.inactive_for?(:feature_two, test_object) + assert feature_flags.inactive_for?(:feature_two, test_object_two) - @feature_flags.when_active_for(:feature_two, test_object) do + feature_flags.when_active_for(:feature_two, test_object) do test_value += 1 end assert_equal 1, test_value - @feature_flags.when_inactive_for(:feature_two, test_object) do + feature_flags.when_inactive_for(:feature_two, test_object) do test_value += 1 end assert_equal 2, test_value - assert @feature_flags.activate_for(:feature_two, test_object) - assert !@feature_flags.active?(:feature_two) - assert !@feature_flags.active_for?(:feature_two, test_object) - assert !@feature_flags.active_for?(:feature_two, test_object_two) + assert feature_flags.activate_for(:feature_two, test_object) + assert !feature_flags.active?(:feature_two) + assert !feature_flags.active_for?(:feature_two, test_object) + assert !feature_flags.active_for?(:feature_two, test_object_two) - @feature_flags.when_active_for(:feature_two, test_object) do + feature_flags.when_active_for(:feature_two, test_object) do test_value += 1 end assert_equal 2, test_value - @feature_flags.when_inactive_for(:feature_two, test_object) do + feature_flags.when_inactive_for(:feature_two, test_object) do test_value += 1 end assert_equal 3, test_value - assert @feature_flags.activate_partially(:feature_two) - assert @feature_flags.active?(:feature_two) - assert @feature_flags.active_partially?(:feature_two) - assert !@feature_flags.active_globally?(:feature_two) - assert @feature_flags.active_for?(:feature_two, test_object) - assert !@feature_flags.active_for?(:feature_two, test_object_two) + assert feature_flags.activate_partially(:feature_two) + assert feature_flags.active?(:feature_two) + assert feature_flags.active_partially?(:feature_two) + assert !feature_flags.active_globally?(:feature_two) + assert feature_flags.active_for?(:feature_two, test_object) + assert !feature_flags.active_for?(:feature_two, test_object_two) - @feature_flags.when_active_for(:feature_two, test_object) do + feature_flags.when_active_for(:feature_two, test_object) do test_value += 1 end assert_equal 4, test_value - @feature_flags.when_inactive_for(:feature_two, test_object) do + feature_flags.when_inactive_for(:feature_two, test_object) do test_value += 1 end assert_equal 4, test_value - @feature_flags.when_active_partially(:feature_two) do + feature_flags.when_active_partially(:feature_two) do test_value += 1 end assert_equal 5, test_value - @feature_flags.when_inactive_partially(:feature_two) do + feature_flags.when_inactive_partially(:feature_two) do test_value += 1 end assert_equal 5, test_value @@ -276,27 +296,27 @@ def test_activate_a_flag_globally test_object = TestObject.new test_object_two = TestObject.new - assert !@feature_flags.active?(:feature_two) - assert !@feature_flags.active_for?(:feature_two, test_object) - assert !@feature_flags.active_for?(:feature_two, test_object_two) + assert !feature_flags.active?(:feature_two) + assert !feature_flags.active_for?(:feature_two, test_object) + assert !feature_flags.active_for?(:feature_two, test_object_two) - assert @feature_flags.inactive?(:feature_two) - assert @feature_flags.inactive_for?(:feature_two, test_object) - assert @feature_flags.inactive_for?(:feature_two, test_object_two) + assert feature_flags.inactive?(:feature_two) + assert feature_flags.inactive_for?(:feature_two, test_object) + assert feature_flags.inactive_for?(:feature_two, test_object_two) - assert @feature_flags.activate(:feature_two) + assert feature_flags.activate(:feature_two) - assert @feature_flags.active?(:feature_two) - assert @feature_flags.active_globally?(:feature_two) - assert !@feature_flags.active_partially?(:feature_two) - assert @feature_flags.active_for?(:feature_two, test_object) - assert @feature_flags.active_for?(:feature_two, test_object_two) + assert feature_flags.active?(:feature_two) + assert feature_flags.active_globally?(:feature_two) + assert !feature_flags.active_partially?(:feature_two) + assert feature_flags.active_for?(:feature_two, test_object) + assert feature_flags.active_for?(:feature_two, test_object_two) - assert !@feature_flags.inactive?(:feature_two) - assert !@feature_flags.inactive_globally?(:feature_two) - assert @feature_flags.inactive_partially?(:feature_two) - assert !@feature_flags.inactive_for?(:feature_two, test_object) - assert !@feature_flags.inactive_for?(:feature_two, test_object_two) + assert !feature_flags.inactive?(:feature_two) + assert !feature_flags.inactive_globally?(:feature_two) + assert feature_flags.inactive_partially?(:feature_two) + assert !feature_flags.inactive_for?(:feature_two, test_object) + assert !feature_flags.inactive_for?(:feature_two, test_object_two) end def test_activate_an_active_flag_for_model_with_custom_id_method @@ -304,27 +324,27 @@ def test_activate_an_active_flag_for_model_with_custom_id_method test_object_two = ::Object.new assert !test_object.respond_to?(:id) - assert @feature_flags.activate_partially(:feature_one) + assert feature_flags.activate_partially(:feature_one) - assert @feature_flags.active?(:feature_one) - assert @feature_flags.active_partially?(:feature_one) - assert !@feature_flags.active_for?(:feature_one, test_object, :object_id) - assert !@feature_flags.active_for?(:feature_one, test_object_two, :object_id) + assert feature_flags.active?(:feature_one) + assert feature_flags.active_partially?(:feature_one) + assert !feature_flags.active_for?(:feature_one, test_object, object_id_method: :object_id) + assert !feature_flags.active_for?(:feature_one, test_object_two, object_id_method: :object_id) - assert !@feature_flags.inactive?(:feature_one) - assert !@feature_flags.inactive_partially?(:feature_one) - assert @feature_flags.inactive_for?(:feature_one, test_object, :object_id) - assert @feature_flags.inactive_for?(:feature_one, test_object_two, :object_id) + assert !feature_flags.inactive?(:feature_one) + assert !feature_flags.inactive_partially?(:feature_one) + assert feature_flags.inactive_for?(:feature_one, test_object, object_id_method: :object_id) + assert feature_flags.inactive_for?(:feature_one, test_object_two, object_id_method: :object_id) - assert @feature_flags.activate_for(:feature_one, test_object, :object_id) + assert feature_flags.activate_for(:feature_one, test_object, object_id_method: :object_id) - assert @feature_flags.active?(:feature_one) - assert @feature_flags.active_for?(:feature_one, test_object, :object_id) - assert !@feature_flags.active_for?(:feature_one, test_object_two, :object_id) + assert feature_flags.active?(:feature_one) + assert feature_flags.active_for?(:feature_one, test_object, object_id_method: :object_id) + assert !feature_flags.active_for?(:feature_one, test_object_two, object_id_method: :object_id) - assert !@feature_flags.inactive?(:feature_one) - assert !@feature_flags.inactive_for?(:feature_one, test_object, :object_id) - assert @feature_flags.inactive_for?(:feature_one, test_object_two, :object_id) + assert !feature_flags.inactive?(:feature_one) + assert !feature_flags.inactive_for?(:feature_one, test_object, object_id_method: :object_id) + assert feature_flags.inactive_for?(:feature_one, test_object_two, object_id_method: :object_id) end def test_activate_a_flag_for_multiple_models @@ -332,53 +352,53 @@ def test_activate_a_flag_for_multiple_models test_object_two = TestObject.new test_object_three = TestObject.new - assert @feature_flags.activate_partially(:feature_one) + assert feature_flags.activate_partially(:feature_one) - assert @feature_flags.active?(:feature_one) - assert !@feature_flags.active_for?(:feature_one, test_object) - assert !@feature_flags.active_for?(:feature_one, test_object_two) - assert !@feature_flags.active_for?(:feature_one, test_object_three) + assert feature_flags.active?(:feature_one) + assert !feature_flags.active_for?(:feature_one, test_object) + assert !feature_flags.active_for?(:feature_one, test_object_two) + assert !feature_flags.active_for?(:feature_one, test_object_three) - assert @feature_flags.inactive_for?(:feature_one, test_object) - assert @feature_flags.inactive_for?(:feature_one, test_object_two) - assert @feature_flags.inactive_for?(:feature_one, test_object_three) + assert feature_flags.inactive_for?(:feature_one, test_object) + assert feature_flags.inactive_for?(:feature_one, test_object_two) + assert feature_flags.inactive_for?(:feature_one, test_object_three) - assert @feature_flags.activate_for(:feature_one, [test_object, test_object_two]) + assert feature_flags.activate_for(:feature_one, test_object, test_object_two) - assert @feature_flags.active_for?(:feature_one, test_object) - assert @feature_flags.active_for?(:feature_one, test_object_two) - assert !@feature_flags.active_for?(:feature_one, test_object_three) + assert feature_flags.active_for?(:feature_one, test_object) + assert feature_flags.active_for?(:feature_one, test_object_two) + assert !feature_flags.active_for?(:feature_one, test_object_three) - assert !@feature_flags.inactive_for?(:feature_one, test_object) - assert !@feature_flags.inactive_for?(:feature_one, test_object_two) - assert @feature_flags.inactive_for?(:feature_one, test_object_three) + assert !feature_flags.inactive_for?(:feature_one, test_object) + assert !feature_flags.inactive_for?(:feature_one, test_object_two) + assert feature_flags.inactive_for?(:feature_one, test_object_three) end def test_deactivate_a_flag_for_a_model test_object = TestObject.new test_object_two = TestObject.new - assert @feature_flags.activate_partially(:feature_one) + assert feature_flags.activate_partially(:feature_one) - assert @feature_flags.activate_for(:feature_one, test_object) + assert feature_flags.activate_for(:feature_one, test_object) - assert @feature_flags.active?(:feature_one) - assert @feature_flags.active_for?(:feature_one, test_object) - assert !@feature_flags.active_for?(:feature_one, test_object_two) + assert feature_flags.active?(:feature_one) + assert feature_flags.active_for?(:feature_one, test_object) + assert !feature_flags.active_for?(:feature_one, test_object_two) - assert !@feature_flags.inactive?(:feature_one) - assert !@feature_flags.inactive_for?(:feature_one, test_object) - assert @feature_flags.inactive_for?(:feature_one, test_object_two) + assert !feature_flags.inactive?(:feature_one) + assert !feature_flags.inactive_for?(:feature_one, test_object) + assert feature_flags.inactive_for?(:feature_one, test_object_two) - assert @feature_flags.deactivate_for(:feature_one, test_object) + assert feature_flags.deactivate_for(:feature_one, test_object) - assert @feature_flags.active?(:feature_one) - assert !@feature_flags.active_for?(:feature_one, test_object) - assert !@feature_flags.active_for?(:feature_one, test_object_two) + assert feature_flags.active?(:feature_one) + assert !feature_flags.active_for?(:feature_one, test_object) + assert !feature_flags.active_for?(:feature_one, test_object_two) - assert !@feature_flags.inactive?(:feature_one) - assert @feature_flags.inactive_for?(:feature_one, test_object) - assert @feature_flags.inactive_for?(:feature_one, test_object_two) + assert !feature_flags.inactive?(:feature_one) + assert feature_flags.inactive_for?(:feature_one, test_object) + assert feature_flags.inactive_for?(:feature_one, test_object_two) end def test_deactivate_a_flag_for_multiple_models @@ -386,31 +406,31 @@ def test_deactivate_a_flag_for_multiple_models test_object_two = TestObject.new test_object_three = TestObject.new - assert @feature_flags.activate_partially(:feature_one) + assert feature_flags.activate_partially(:feature_one) - assert @feature_flags.activate_for(:feature_one, [test_object, test_object_two]) + assert feature_flags.activate_for(:feature_one, test_object, test_object_two) - assert @feature_flags.active?(:feature_one) - assert @feature_flags.active_for?(:feature_one, test_object) - assert @feature_flags.active_for?(:feature_one, test_object_two) - assert !@feature_flags.active_for?(:feature_one, test_object_three) + assert feature_flags.active?(:feature_one) + assert feature_flags.active_for?(:feature_one, test_object) + assert feature_flags.active_for?(:feature_one, test_object_two) + assert !feature_flags.active_for?(:feature_one, test_object_three) - assert !@feature_flags.inactive?(:feature_one) - assert !@feature_flags.inactive_for?(:feature_one, test_object) - assert !@feature_flags.inactive_for?(:feature_one, test_object_two) - assert @feature_flags.inactive_for?(:feature_one, test_object_three) + assert !feature_flags.inactive?(:feature_one) + assert !feature_flags.inactive_for?(:feature_one, test_object) + assert !feature_flags.inactive_for?(:feature_one, test_object_two) + assert feature_flags.inactive_for?(:feature_one, test_object_three) - assert @feature_flags.deactivate_for(:feature_one, [test_object, test_object_two]) + assert feature_flags.deactivate_for(:feature_one, test_object, test_object_two) - assert @feature_flags.active?(:feature_one) - assert !@feature_flags.active_for?(:feature_one, test_object) - assert !@feature_flags.active_for?(:feature_one, test_object_two) - assert !@feature_flags.active_for?(:feature_one, test_object_three) + assert feature_flags.active?(:feature_one) + assert !feature_flags.active_for?(:feature_one, test_object) + assert !feature_flags.active_for?(:feature_one, test_object_two) + assert !feature_flags.active_for?(:feature_one, test_object_three) - assert !@feature_flags.inactive?(:feature_one) - assert @feature_flags.inactive_for?(:feature_one, test_object) - assert @feature_flags.inactive_for?(:feature_one, test_object_two) - assert @feature_flags.inactive_for?(:feature_one, test_object_three) + assert !feature_flags.inactive?(:feature_one) + assert feature_flags.inactive_for?(:feature_one, test_object) + assert feature_flags.inactive_for?(:feature_one, test_object_two) + assert feature_flags.inactive_for?(:feature_one, test_object_three) end def test_deactivate_globally @@ -418,39 +438,39 @@ def test_deactivate_globally test_object_two = TestObject.new test_object_three = TestObject.new - assert @feature_flags.activate_partially(:feature_one) - - assert @feature_flags.activate_for(:feature_one, [test_object, test_object_two]) - - assert @feature_flags.active?(:feature_one) - assert @feature_flags.active_partially?(:feature_one) - assert !@feature_flags.active_globally?(:feature_one) - assert @feature_flags.active_for?(:feature_one, test_object) - assert @feature_flags.active_for?(:feature_one, test_object_two) - assert !@feature_flags.active_for?(:feature_one, test_object_three) - - assert !@feature_flags.inactive?(:feature_one) - assert !@feature_flags.inactive_partially?(:feature_one) - assert @feature_flags.inactive_globally?(:feature_one) - assert !@feature_flags.inactive_for?(:feature_one, test_object) - assert !@feature_flags.inactive_for?(:feature_one, test_object_two) - assert @feature_flags.inactive_for?(:feature_one, test_object_three) - - assert @feature_flags.deactivate(:feature_one) - - assert !@feature_flags.active?(:feature_one) - assert !@feature_flags.active_partially?(:feature_one) - assert !@feature_flags.active_globally?(:feature_one) - assert !@feature_flags.active_for?(:feature_one, test_object) - assert !@feature_flags.active_for?(:feature_one, test_object_two) - assert !@feature_flags.active_for?(:feature_one, test_object_three) - - assert @feature_flags.inactive?(:feature_one) - assert @feature_flags.inactive_partially?(:feature_one) - assert @feature_flags.inactive_globally?(:feature_one) - assert @feature_flags.inactive_for?(:feature_one, test_object) - assert @feature_flags.inactive_for?(:feature_one, test_object_two) - assert @feature_flags.inactive_for?(:feature_one, test_object_three) + assert feature_flags.activate_partially(:feature_one) + + assert feature_flags.activate_for(:feature_one, test_object, test_object_two) + + assert feature_flags.active?(:feature_one) + assert feature_flags.active_partially?(:feature_one) + assert !feature_flags.active_globally?(:feature_one) + assert feature_flags.active_for?(:feature_one, test_object) + assert feature_flags.active_for?(:feature_one, test_object_two) + assert !feature_flags.active_for?(:feature_one, test_object_three) + + assert !feature_flags.inactive?(:feature_one) + assert !feature_flags.inactive_partially?(:feature_one) + assert feature_flags.inactive_globally?(:feature_one) + assert !feature_flags.inactive_for?(:feature_one, test_object) + assert !feature_flags.inactive_for?(:feature_one, test_object_two) + assert feature_flags.inactive_for?(:feature_one, test_object_three) + + assert feature_flags.deactivate(:feature_one) + + assert !feature_flags.active?(:feature_one) + assert !feature_flags.active_partially?(:feature_one) + assert !feature_flags.active_globally?(:feature_one) + assert !feature_flags.active_for?(:feature_one, test_object) + assert !feature_flags.active_for?(:feature_one, test_object_two) + assert !feature_flags.active_for?(:feature_one, test_object_three) + + assert feature_flags.inactive?(:feature_one) + assert feature_flags.inactive_partially?(:feature_one) + assert feature_flags.inactive_globally?(:feature_one) + assert feature_flags.inactive_for?(:feature_one, test_object) + assert feature_flags.inactive_for?(:feature_one, test_object_two) + assert feature_flags.inactive_for?(:feature_one, test_object_three) end end -end \ No newline at end of file +end diff --git a/test/test_helper.rb b/test/test_helper.rb index c1309ec..db1f5cf 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,5 +1,8 @@ -$LOAD_PATH.unshift File.expand_path("../lib", __dir__) -require "simple_feature_flags" +# typed: true +# frozen_string_literal: true -require "minitest/autorun" +$LOAD_PATH.unshift File.expand_path('../lib', __dir__) +require 'simple_feature_flags' + +require 'minitest/autorun' require 'byebug'